diff options
Diffstat (limited to 'deps/v8/src/ia32/codegen-ia32.cc')
-rw-r--r-- | deps/v8/src/ia32/codegen-ia32.cc | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/deps/v8/src/ia32/codegen-ia32.cc b/deps/v8/src/ia32/codegen-ia32.cc index 2a66676c9c..78790b75d0 100644 --- a/deps/v8/src/ia32/codegen-ia32.cc +++ b/deps/v8/src/ia32/codegen-ia32.cc @@ -7,7 +7,6 @@ #include "src/codegen.h" #include "src/heap/factory-inl.h" #include "src/heap/heap.h" -#include "src/isolate.h" #include "src/macro-assembler.h" namespace v8 { @@ -15,13 +14,14 @@ namespace internal { #define __ masm. -UnaryMathFunctionWithIsolate CreateSqrtFunction(Isolate* isolate) { +UnaryMathFunction CreateSqrtFunction() { + v8::PageAllocator* page_allocator = GetPlatformPageAllocator(); size_t allocated = 0; - byte* buffer = AllocatePage(isolate->heap()->GetRandomMmapAddr(), &allocated); + byte* buffer = AllocatePage(page_allocator, + page_allocator->GetRandomMmapAddr(), &allocated); if (buffer == nullptr) return nullptr; - MacroAssembler masm(isolate, buffer, static_cast<int>(allocated), - CodeObjectRequired::kNo); + MacroAssembler masm(AssemblerOptions{}, buffer, static_cast<int>(allocated)); // esp[1 * kPointerSize]: raw double input // esp[0 * kPointerSize]: return address // Move double input into registers. @@ -35,12 +35,13 @@ UnaryMathFunctionWithIsolate CreateSqrtFunction(Isolate* isolate) { } CodeDesc desc; - masm.GetCode(isolate, &desc); + masm.GetCode(nullptr, &desc); DCHECK(!RelocInfo::RequiresRelocationAfterCodegen(desc)); Assembler::FlushICache(buffer, allocated); - CHECK(SetPermissions(buffer, allocated, PageAllocator::kReadExecute)); - return FUNCTION_CAST<UnaryMathFunctionWithIsolate>(buffer); + CHECK(SetPermissions(page_allocator, buffer, allocated, + PageAllocator::kReadExecute)); + return FUNCTION_CAST<UnaryMathFunction>(buffer); } @@ -129,14 +130,14 @@ class LabelConverter { byte* buffer_; }; - -MemMoveFunction CreateMemMoveFunction(Isolate* isolate) { +MemMoveFunction CreateMemMoveFunction() { + v8::PageAllocator* page_allocator = GetPlatformPageAllocator(); size_t allocated = 0; - byte* buffer = AllocatePage(isolate->heap()->GetRandomMmapAddr(), &allocated); + byte* buffer = AllocatePage(page_allocator, + page_allocator->GetRandomMmapAddr(), &allocated); if (buffer == nullptr) return nullptr; - MacroAssembler masm(isolate, buffer, static_cast<int>(allocated), - CodeObjectRequired::kNo); + MacroAssembler masm(AssemblerOptions{}, buffer, static_cast<int>(allocated)); LabelConverter conv(buffer); // Generated code is put into a fixed, unmovable buffer, and not into @@ -447,10 +448,11 @@ MemMoveFunction CreateMemMoveFunction(Isolate* isolate) { MemMoveEmitPopAndReturn(&masm); CodeDesc desc; - masm.GetCode(isolate, &desc); + masm.GetCode(nullptr, &desc); DCHECK(!RelocInfo::RequiresRelocationAfterCodegen(desc)); Assembler::FlushICache(buffer, allocated); - CHECK(SetPermissions(buffer, allocated, PageAllocator::kReadExecute)); + CHECK(SetPermissions(page_allocator, buffer, allocated, + PageAllocator::kReadExecute)); // TODO(jkummerow): It would be nice to register this code creation event // with the PROFILE / GDBJIT system. return FUNCTION_CAST<MemMoveFunction>(buffer); |