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

Unified Diff: src/runtime/runtime-maths.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/ppc/simulator-ppc.cc ('k') | src/v8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-maths.cc
diff --git a/src/runtime/runtime-maths.cc b/src/runtime/runtime-maths.cc
index 5005a850d89aebb49d5aa1df579199c3485839f0..427d2b868a639df4f52a47cb384eb6fa49cdf862 100644
--- a/src/runtime/runtime-maths.cc
+++ b/src/runtime/runtime-maths.cc
@@ -150,7 +150,7 @@ RUNTIME_FUNCTION(Runtime_MathPow) {
}
CONVERT_DOUBLE_ARG_CHECKED(y, 1);
- double result = power_helper(x, y);
+ double result = power_helper(isolate, x, y);
if (std::isnan(result)) return isolate->heap()->nan_value();
return *isolate->factory()->NewNumber(result);
}
@@ -224,7 +224,8 @@ RUNTIME_FUNCTION(Runtime_MathSqrt) {
isolate->counters()->math_sqrt()->Increment();
CONVERT_DOUBLE_ARG_CHECKED(x, 0);
- return *isolate->factory()->NewNumber(fast_sqrt(x));
+ lazily_initialize_fast_sqrt(isolate);
+ return *isolate->factory()->NewNumber(fast_sqrt(x, isolate));
}
« no previous file with comments | « src/ppc/simulator-ppc.cc ('k') | src/v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698