| Index: src/x64/codegen-x64.cc
|
| diff --git a/src/x64/codegen-x64.cc b/src/x64/codegen-x64.cc
|
| index 5baf1a8e1bf4894d06991da097dd8f8e9035c3d0..82052301d4b079c7785182983c66e59dc1a62e29 100644
|
| --- a/src/x64/codegen-x64.cc
|
| +++ b/src/x64/codegen-x64.cc
|
| @@ -64,14 +64,14 @@ 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;
|
| + if (buffer == nullptr) return nullptr;
|
|
|
| - MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size),
|
| + MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size),
|
| CodeObjectRequired::kNo);
|
| // xmm0: raw double input.
|
| // Move double input into registers.
|
| @@ -82,9 +82,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);
|
| }
|
|
|
|
|
|
|