From b08fcc54a07bfdc7656e7ce708d1a689fa92dc8b Mon Sep 17 00:00:00 2001 From: "svenpanne@chromium.org" Date: Wed, 24 Apr 2013 12:43:33 +0000 Subject: [PATCH] MathSqrt and MathPowHalf do not cause any promotion. Review URL: https://codereview.chromium.org/13829009 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/hydrogen-instructions.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h index a8e1e1c..5ca0ae2 100644 --- a/src/hydrogen-instructions.h +++ b/src/hydrogen-instructions.h @@ -2609,18 +2609,21 @@ class HUnaryMathOperation: public HTemplateInstruction<2> { case kMathAbs: // Not setting representation here: it is None intentionally. SetFlag(kFlexibleRepresentation); + // TODO(svenpanne) This flag is actually only needed if representation() + // is tagged, and not when it is an unboxed double or unboxed integer. SetGVNFlag(kChangesNewSpacePromotion); break; - case kMathSqrt: - case kMathPowHalf: case kMathLog: case kMathSin: case kMathCos: case kMathTan: set_representation(Representation::Double()); + // These operations use the TranscendentalCache, so they may allocate. SetGVNFlag(kChangesNewSpacePromotion); break; case kMathExp: + case kMathSqrt: + case kMathPowHalf: set_representation(Representation::Double()); break; default: -- 2.7.4