Index: src/crankshaft/hydrogen-instructions.cc |
diff --git a/src/crankshaft/hydrogen-instructions.cc b/src/crankshaft/hydrogen-instructions.cc |
index a864c0c6cc726e9c45735d591276c24603e2fc17..791194cfbb143983f683e4a3b47c9c053e02e9b3 100644 |
--- a/src/crankshaft/hydrogen-instructions.cc |
+++ b/src/crankshaft/hydrogen-instructions.cc |
@@ -4084,7 +4084,8 @@ HInstruction* HUnaryMathOperation::New(Isolate* isolate, Zone* zone, |
case kMathLog: |
return H_CONSTANT_DOUBLE(std::log(d)); |
case kMathSqrt: |
- return H_CONSTANT_DOUBLE(fast_sqrt(d)); |
+ lazily_initialize_fast_sqrt(isolate); |
+ return H_CONSTANT_DOUBLE(fast_sqrt(d, isolate)); |
case kMathPowHalf: |
return H_CONSTANT_DOUBLE(power_double_double(d, 0.5)); |
case kMathAbs: |
@@ -4156,8 +4157,8 @@ HInstruction* HPower::New(Isolate* isolate, Zone* zone, HValue* context, |
HConstant* c_left = HConstant::cast(left); |
HConstant* c_right = HConstant::cast(right); |
if (c_left->HasNumberValue() && c_right->HasNumberValue()) { |
- double result = power_helper(c_left->DoubleValue(), |
- c_right->DoubleValue()); |
+ double result = |
+ power_helper(isolate, c_left->DoubleValue(), c_right->DoubleValue()); |
return H_CONSTANT_DOUBLE(std::isnan(result) |
? std::numeric_limits<double>::quiet_NaN() |
: result); |