Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Unified Diff: src/crankshaft/hydrogen-instructions.cc

Issue 1473683004: Lazily initialize fast_sqrt() and pass an Isolate parameter to it (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/codegen.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/codegen.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698