Index: src/x64/stub-cache-x64.cc |
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc |
index 9090516ce103351b9b76e551e34cd326366bc33a..4a5d4979d3af7aa454700ba463c9b49f1eb37801 100644 |
--- a/src/x64/stub-cache-x64.cc |
+++ b/src/x64/stub-cache-x64.cc |
@@ -184,7 +184,7 @@ void StubCache::GenerateProbe(MacroAssembler* masm, |
Register scratch, |
Register extra, |
Register extra2) { |
- Isolate* isolate = Isolate::Current(); |
+ Isolate* isolate = masm->isolate(); |
Label miss; |
USE(extra); // The register extra is not used on the X64 platform. |
USE(extra2); // The register extra2 is not used on the X64 platform. |
@@ -255,14 +255,15 @@ void StubCompiler::GenerateLoadGlobalFunctionPrototype(MacroAssembler* masm, |
void StubCompiler::GenerateDirectLoadGlobalFunctionPrototype( |
MacroAssembler* masm, int index, Register prototype, Label* miss) { |
+ Isolate* isolate = masm->isolate(); |
// Check we're still in the same context. |
- __ Move(prototype, Isolate::Current()->global()); |
+ __ Move(prototype, isolate->global()); |
__ cmpq(Operand(rsi, Context::SlotOffset(Context::GLOBAL_INDEX)), |
prototype); |
__ j(not_equal, miss); |
// Get the global function with the given index. |
- JSFunction* function = JSFunction::cast( |
- Isolate::Current()->global_context()->get(index)); |
+ JSFunction* function = |
+ JSFunction::cast(isolate->global_context()->get(index)); |
// Load its initial map. The global functions all have initial maps. |
__ Move(prototype, Handle<Map>(function->initial_map())); |
// Load the prototype from the initial map. |
@@ -734,9 +735,9 @@ void StubCompiler::GenerateLoadMiss(MacroAssembler* masm, Code::Kind kind) { |
ASSERT(kind == Code::LOAD_IC || kind == Code::KEYED_LOAD_IC); |
Code* code = NULL; |
if (kind == Code::LOAD_IC) { |
- code = Isolate::Current()->builtins()->builtin(Builtins::LoadIC_Miss); |
+ code = masm->isolate()->builtins()->builtin(Builtins::kLoadIC_Miss); |
} else { |
- code = Isolate::Current()->builtins()->builtin(Builtins::KeyedLoadIC_Miss); |
+ code = masm->isolate()->builtins()->builtin(Builtins::kKeyedLoadIC_Miss); |
} |
Handle<Code> ic(code); |
@@ -1322,7 +1323,7 @@ void CallStubCompiler::GenerateLoadFunctionFromCell(JSGlobalPropertyCell* cell, |
MaybeObject* CallStubCompiler::GenerateMissBranch() { |
- MaybeObject* maybe_obj = Isolate::Current()->stub_cache()->ComputeCallMiss( |
+ MaybeObject* maybe_obj = masm()->isolate()->stub_cache()->ComputeCallMiss( |
arguments().immediate(), kind_); |
Object* obj; |
if (!maybe_obj->ToObject(&obj)) return maybe_obj; |
@@ -2330,8 +2331,7 @@ MaybeObject* StoreStubCompiler::CompileStoreField(JSObject* object, |
// Handle store cache miss. |
__ bind(&miss); |
- Handle<Code> ic(Isolate::Current()->builtins()->builtin( |
- Builtins::StoreIC_Miss)); |
+ Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss(); |
__ Jump(ic, RelocInfo::CODE_TARGET); |
// Return the generated code. |
@@ -2382,8 +2382,7 @@ MaybeObject* StoreStubCompiler::CompileStoreCallback(JSObject* object, |
// Handle store cache miss. |
__ bind(&miss); |
- Handle<Code> ic(Isolate::Current()->builtins()->builtin( |
- Builtins::StoreIC_Miss)); |
+ Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss(); |
__ Jump(ic, RelocInfo::CODE_TARGET); |
// Return the generated code. |
@@ -2433,8 +2432,7 @@ MaybeObject* StoreStubCompiler::CompileStoreInterceptor(JSObject* receiver, |
// Handle store cache miss. |
__ bind(&miss); |
- Handle<Code> ic(Isolate::Current()->builtins()->builtin( |
- Builtins::StoreIC_Miss)); |
+ Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss(); |
__ Jump(ic, RelocInfo::CODE_TARGET); |
// Return the generated code. |
@@ -2477,8 +2475,7 @@ MaybeObject* StoreStubCompiler::CompileStoreGlobal(GlobalObject* object, |
// Handle store cache miss. |
__ bind(&miss); |
__ IncrementCounter(COUNTERS->named_store_global_inline_miss(), 1); |
- Handle<Code> ic(Isolate::Current()->builtins()->builtin( |
- Builtins::StoreIC_Miss)); |
+ Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss(); |
__ Jump(ic, RelocInfo::CODE_TARGET); |
// Return the generated code. |
@@ -2515,8 +2512,7 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreField(JSObject* object, |
// Handle store cache miss. |
__ bind(&miss); |
__ DecrementCounter(COUNTERS->keyed_store_field(), 1); |
- Handle<Code> ic(Isolate::Current()->builtins()->builtin( |
- Builtins::KeyedStoreIC_Miss)); |
+ Handle<Code> ic = masm()->isolate()->builtins()->KeyedStoreIC_Miss(); |
__ Jump(ic, RelocInfo::CODE_TARGET); |
// Return the generated code. |
@@ -2573,8 +2569,7 @@ MaybeObject* KeyedStoreStubCompiler::CompileStoreSpecialized( |
// Handle store cache miss. |
__ bind(&miss); |
- Handle<Code> ic(Isolate::Current()->builtins()->builtin( |
- Builtins::KeyedStoreIC_Miss)); |
+ Handle<Code> ic = masm()->isolate()->builtins()->KeyedStoreIC_Miss(); |
__ jmp(ic, RelocInfo::CODE_TARGET); |
// Return the generated code. |
@@ -3143,8 +3138,8 @@ MaybeObject* ConstructStubCompiler::CompileConstructStub(JSFunction* function) { |
// Jump to the generic stub in case the specialized code cannot handle the |
// construction. |
__ bind(&generic_stub_call); |
- Code* code = Isolate::Current()->builtins()->builtin( |
- Builtins::JSConstructStubGeneric); |
+ Code* code = |
+ masm()->isolate()->builtins()->builtin(Builtins::kJSConstructStubGeneric); |
Handle<Code> generic_construct_stub(code); |
__ Jump(generic_construct_stub, RelocInfo::CODE_TARGET); |