Index: src/ppc/codegen-ppc.cc |
diff --git a/src/ppc/codegen-ppc.cc b/src/ppc/codegen-ppc.cc |
index b313d11bb319c359b8dbb30d0fd2f0992952c9d3..26914f7585a7a90ed904e2579382012f5d752e74 100644 |
--- a/src/ppc/codegen-ppc.cc |
+++ b/src/ppc/codegen-ppc.cc |
@@ -18,23 +18,22 @@ namespace internal { |
#if defined(USE_SIMULATOR) |
-byte* fast_exp_ppc_machine_code = NULL; |
-double fast_exp_simulator(double x) { |
- return Simulator::current(Isolate::Current()) |
+byte* fast_exp_ppc_machine_code = nullptr; |
+double fast_exp_simulator(double x, Isolate* isolate) { |
+ return Simulator::current(isolate) |
->CallFPReturnsDouble(fast_exp_ppc_machine_code, x, 0); |
} |
#endif |
-UnaryMathFunction CreateExpFunction() { |
- if (!FLAG_fast_math) return &std::exp; |
+UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate) { |
size_t actual_size; |
byte* buffer = |
static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true)); |
- if (buffer == NULL) return &std::exp; |
+ if (buffer == nullptr) return nullptr; |
ExternalReference::InitializeMathExpData(); |
- MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size)); |
+ MacroAssembler masm(nullptr, buffer, static_cast<int>(actual_size)); |
{ |
DoubleRegister input = d1; |
@@ -62,11 +61,11 @@ UnaryMathFunction CreateExpFunction() { |
DCHECK(!RelocInfo::RequiresRelocation(desc)); |
#endif |
- Assembler::FlushICacheWithoutIsolate(buffer, actual_size); |
+ Assembler::FlushICache(isolate, buffer, actual_size); |
base::OS::ProtectCode(buffer, actual_size); |
#if !defined(USE_SIMULATOR) |
- return FUNCTION_CAST<UnaryMathFunction>(buffer); |
+ return FUNCTION_CAST<UnaryMathFunctionWithIsolate>(buffer); |
#else |
fast_exp_ppc_machine_code = buffer; |
return &fast_exp_simulator; |