Index: src/ia32/codegen-ia32.cc |
diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc |
index 93f4cee636698567805955e11b33eba0336358f4..8e068f6a7e6d84f59722228c73bcc9a9be066fbd 100644 |
--- a/src/ia32/codegen-ia32.cc |
+++ b/src/ia32/codegen-ia32.cc |
@@ -34,15 +34,14 @@ void StubRuntimeCallHelper::AfterCall(MacroAssembler* masm) const { |
#define __ masm. |
-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)); |
// esp[1 * kPointerSize]: raw double input |
// esp[0 * kPointerSize]: return address |
{ |
@@ -65,9 +64,9 @@ UnaryMathFunction CreateExpFunction() { |
masm.GetCode(&desc); |
DCHECK(!RelocInfo::RequiresRelocation(desc)); |
- Assembler::FlushICacheWithoutIsolate(buffer, actual_size); |
+ Assembler::FlushICache(isolate, buffer, actual_size); |
base::OS::ProtectCode(buffer, actual_size); |
- return FUNCTION_CAST<UnaryMathFunction>(buffer); |
+ return FUNCTION_CAST<UnaryMathFunctionWithIsolate>(buffer); |
} |