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

Unified Diff: src/assembler.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/assembler.h ('k') | src/codegen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.cc
diff --git a/src/assembler.cc b/src/assembler.cc
index a9e56576767fdb6d72a70fcffe77626903b32e29..45db5bc4fe76ba3e5ca616545fcc33ac0eea5217 100644
--- a/src/assembler.cc
+++ b/src/assembler.cc
@@ -1469,17 +1469,20 @@ ExternalReference ExternalReference::runtime_function_table_address(
}
-double power_helper(double x, double y) {
+double power_helper(Isolate* isolate, double x, double y) {
int y_int = static_cast<int>(y);
if (y == y_int) {
return power_double_int(x, y_int); // Returns 1 if exponent is 0.
}
if (y == 0.5) {
+ lazily_initialize_fast_sqrt(isolate);
return (std::isinf(x)) ? V8_INFINITY
- : fast_sqrt(x + 0.0); // Convert -0 to +0.
+ : fast_sqrt(x + 0.0, isolate); // Convert -0 to +0.
}
if (y == -0.5) {
- return (std::isinf(x)) ? 0 : 1.0 / fast_sqrt(x + 0.0); // Convert -0 to +0.
+ lazily_initialize_fast_sqrt(isolate);
+ return (std::isinf(x)) ? 0 : 1.0 / fast_sqrt(x + 0.0,
+ isolate); // Convert -0 to +0.
}
return power_double_double(x, y);
}
« no previous file with comments | « src/assembler.h ('k') | src/codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698