| Index: src/ia32/codegen-ia32.cc
|
| diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc
|
| index 91b0eb6de57a554a725008246c3aa00b1ab4bdba..edc2d240f24d12e456b8d21fe2b82c75ecd1e0e6 100644
|
| --- a/src/ia32/codegen-ia32.cc
|
| +++ b/src/ia32/codegen-ia32.cc
|
| @@ -71,13 +71,13 @@ UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate) {
|
| }
|
|
|
|
|
| -UnaryMathFunction CreateSqrtFunction() {
|
| +UnaryMathFunctionWithIsolate CreateSqrtFunction(Isolate* isolate) {
|
| size_t actual_size;
|
| // Allocate buffer in executable space.
|
| byte* buffer =
|
| static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true));
|
| - if (buffer == NULL) return &std::sqrt;
|
| - MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size),
|
| + if (buffer == nullptr) return nullptr;
|
| + MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
|
| CodeObjectRequired::kNo);
|
| // esp[1 * kPointerSize]: raw double input
|
| // esp[0 * kPointerSize]: return address
|
| @@ -95,9 +95,9 @@ UnaryMathFunction CreateSqrtFunction() {
|
| 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);
|
| }
|
|
|
|
|
|
|