Index: src/a64/stub-cache-a64.cc |
diff --git a/src/a64/stub-cache-a64.cc b/src/a64/stub-cache-a64.cc |
index 7a106e8fdfa3ae8f97ff086530b08623fe31fe8b..fa3fa37063106cc591aa369a5135d61782e186ee 100644 |
--- a/src/a64/stub-cache-a64.cc |
+++ b/src/a64/stub-cache-a64.cc |
@@ -248,13 +248,18 @@ void StubCompiler::GenerateDirectLoadGlobalFunctionPrototype( |
Register prototype, |
Label* miss) { |
Isolate* isolate = masm->isolate(); |
- // Check we're still in the same context. |
- __ Ldr(prototype, GlobalObjectMemOperand()); |
- __ Cmp(prototype, Operand(isolate->global_object())); |
- __ B(ne, miss); |
// Get the global function with the given index. |
Handle<JSFunction> function( |
JSFunction::cast(isolate->native_context()->get(index))); |
+ |
+ // Check we're still in the same context. |
+ Register scratch = prototype; |
+ __ Ldr(scratch, GlobalObjectMemOperand()); |
+ __ Ldr(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset)); |
+ __ Ldr(scratch, ContextMemOperand(scratch, index)); |
+ __ Cmp(scratch, Operand(function)); |
+ __ B(ne, miss); |
+ |
// Load its initial map. The global functions all have initial maps. |
__ Mov(prototype, Operand(Handle<Map>(function->initial_map()))); |
// Load the prototype from the initial map. |
@@ -748,10 +753,9 @@ static void GenerateFastApiCallBody(MacroAssembler* masm, |
// Abi for CallApiFunctionStub. |
Register callee = x0; |
- Register thunk_arg = x1; |
- Register holder = x2; |
- Register api_function_address = x3; |
Register call_data = x4; |
+ Register holder = x2; |
+ Register api_function_address = x1; |
// Put holder in place. |
__ Mov(holder, holder_in); |
@@ -784,56 +788,12 @@ static void GenerateFastApiCallBody(MacroAssembler* masm, |
masm->isolate()); |
__ Mov(api_function_address, Operand(ref)); |
- // Put thunk_arg in place. |
- __ Mov(thunk_arg, Operand(reinterpret_cast<intptr_t>(function_address))); |
- |
// Jump to stub. |
CallApiFunctionStub stub(restore_context, call_data_undefined, argc); |
__ TailCallStub(&stub); |
} |
-// Generates call to API function. |
-static void GenerateFastApiCall(MacroAssembler* masm, |
- const CallOptimization& optimization, |
- int argc, |
- Handle<Map> map_to_holder, |
- CallOptimization::HolderLookup holder_lookup) { |
- Counters* counters = masm->isolate()->counters(); |
- __ IncrementCounter(counters->call_const_fast_api(), 1, x0, x1); |
- |
- // Move holder to a register |
- Register holder_reg = x2; |
- switch (holder_lookup) { |
- case CallOptimization::kHolderIsReceiver: |
- { |
- ASSERT(map_to_holder.is_null()); |
- __ Peek(holder_reg, argc * kPointerSize); |
- } |
- break; |
- case CallOptimization::kHolderIsPrototypeOfMap: |
- { |
- Handle<JSObject> holder(JSObject::cast(map_to_holder->prototype())); |
- if (!masm->isolate()->heap()->InNewSpace(*holder)) { |
- __ LoadObject(holder_reg, holder); |
- } else { |
- __ LoadObject(holder_reg, map_to_holder); |
- __ Ldr(holder_reg, |
- FieldMemOperand(holder_reg, Map::kPrototypeOffset)); |
- } |
- } |
- break; |
- case CallOptimization::kHolderNotFound: |
- UNREACHABLE(); |
- } |
- GenerateFastApiCallBody(masm, |
- optimization, |
- argc, |
- holder_reg, |
- false); |
-} |
- |
- |
// Generate call to api function. |
static void GenerateFastApiCall(MacroAssembler* masm, |
const CallOptimization& optimization, |
@@ -861,180 +821,6 @@ static void GenerateFastApiCall(MacroAssembler* masm, |
} |
-class CallInterceptorCompiler BASE_EMBEDDED { |
- public: |
- CallInterceptorCompiler(CallStubCompiler* stub_compiler, |
- const ParameterCount& arguments, |
- Register name) |
- : stub_compiler_(stub_compiler), |
- arguments_(arguments), |
- name_(name) { } |
- |
- void Compile(MacroAssembler* masm, |
- Handle<JSObject> object, |
- Handle<JSObject> holder, |
- Handle<Name> name, |
- LookupResult* lookup, |
- Register receiver, |
- Register scratch1, |
- Register scratch2, |
- Register scratch3, |
- Label* miss) { |
- ASSERT(holder->HasNamedInterceptor()); |
- ASSERT(!holder->GetNamedInterceptor()->getter()->IsUndefined()); |
- |
- // Check that the receiver isn't a smi. |
- __ JumpIfSmi(receiver, miss); |
- |
- CallOptimization optimization(lookup); |
- if (optimization.is_constant_call()) { |
- CompileCacheable(masm, object, receiver, scratch1, scratch2, scratch3, |
- holder, lookup, name, optimization, miss); |
- } else { |
- CompileRegular(masm, object, receiver, scratch1, scratch2, scratch3, |
- name, holder, miss); |
- } |
- } |
- |
- private: |
- void CompileCacheable(MacroAssembler* masm, |
- Handle<JSObject> object, |
- Register receiver, |
- Register scratch1, |
- Register scratch2, |
- Register scratch3, |
- Handle<JSObject> interceptor_holder, |
- LookupResult* lookup, |
- Handle<Name> name, |
- const CallOptimization& optimization, |
- Label* miss_label) { |
- ASSERT(optimization.is_constant_call()); |
- ASSERT(!lookup->holder()->IsGlobalObject()); |
- |
- Counters* counters = masm->isolate()->counters(); |
- __ IncrementCounter(counters->call_const_interceptor(), 1, |
- scratch1, scratch2); |
- |
- // Check that the maps from receiver to interceptor's holder |
- // haven't changed and thus we can invoke interceptor. |
- Label miss_cleanup; |
- Register holder = |
- stub_compiler_->CheckPrototypes( |
- IC::CurrentTypeOf(object, masm->isolate()), receiver, |
- interceptor_holder, scratch1, scratch2, scratch3, |
- name, miss_label); |
- |
- // Invoke an interceptor and if it provides a value, |
- // branch to |regular_invoke|. |
- Label regular_invoke; |
- LoadWithInterceptor(masm, receiver, holder, interceptor_holder, scratch2, |
- ®ular_invoke); |
- |
- // Interceptor returned nothing for this property. Try to use cached |
- // constant function. |
- |
- // Check that the maps from interceptor's holder to constant function's |
- // holder haven't changed and thus we can use cached constant function. |
- if (*interceptor_holder != lookup->holder()) { |
- stub_compiler_->CheckPrototypes( |
- IC::CurrentTypeOf(interceptor_holder, masm->isolate()), holder, |
- handle(lookup->holder()), scratch1, scratch2, scratch3, |
- name, miss_label); |
- } |
- |
- Handle<Map> lookup_map; |
- CallOptimization::HolderLookup holder_lookup = |
- CallOptimization::kHolderNotFound; |
- if (optimization.is_simple_api_call() && |
- !lookup->holder()->IsGlobalObject()) { |
- lookup_map = optimization.LookupHolderOfExpectedType( |
- object, object, interceptor_holder, &holder_lookup); |
- if (holder_lookup == CallOptimization::kHolderNotFound) { |
- lookup_map = |
- optimization.LookupHolderOfExpectedType( |
- object, |
- interceptor_holder, |
- Handle<JSObject>(lookup->holder()), |
- &holder_lookup); |
- } |
- } |
- |
- // Invoke function. |
- if (holder_lookup != CallOptimization::kHolderNotFound) { |
- int argc = arguments_.immediate(); |
- GenerateFastApiCall(masm, |
- optimization, |
- argc, |
- lookup_map, |
- holder_lookup); |
- } else { |
- Handle<JSFunction> function = optimization.constant_function(); |
- __ Mov(x0, receiver); |
- stub_compiler_->GenerateJumpFunction(object, function); |
- } |
- |
- // Invoke a regular function. |
- __ Bind(®ular_invoke); |
- } |
- |
- void CompileRegular(MacroAssembler* masm, |
- Handle<JSObject> object, |
- Register receiver, |
- Register scratch1, |
- Register scratch2, |
- Register scratch3, |
- Handle<Name> name, |
- Handle<JSObject> interceptor_holder, |
- Label* miss_label) { |
- Register holder = |
- stub_compiler_->CheckPrototypes( |
- IC::CurrentTypeOf(object, masm->isolate()), receiver, |
- interceptor_holder, scratch1, scratch2, scratch3, name, miss_label); |
- |
- // Call a runtime function to load the interceptor property. |
- FrameScope scope(masm, StackFrame::INTERNAL); |
- // The name_ register must be preserved across the call. |
- __ Push(name_); |
- |
- CompileCallLoadPropertyWithInterceptor( |
- masm, receiver, holder, name_, interceptor_holder, |
- IC::kLoadPropertyWithInterceptorForCall); |
- |
- __ Pop(name_); |
- } |
- |
- |
- void LoadWithInterceptor(MacroAssembler* masm, |
- Register receiver, |
- Register holder, |
- Handle<JSObject> holder_obj, |
- Register scratch, |
- Label* interceptor_succeeded) { |
- { |
- FrameScope scope(masm, StackFrame::INTERNAL); |
- __ Push(receiver, holder, name_); |
- CompileCallLoadPropertyWithInterceptor( |
- masm, receiver, holder, name_, holder_obj, |
- IC::kLoadPropertyWithInterceptorOnly); |
- // TODO(jbramley): We need two pops because holder and receiver can be |
- // the same. In that case, we only need to preserve it once, but this is |
- // fixed on ARM later anyway so I've left it alone for now. |
- __ Pop(name_, holder); |
- __ Pop(receiver); |
- } |
- |
- // If interceptor returns no-result sentinel, call the constant function. |
- __ JumpIfNotRoot(x0, |
- Heap::kNoInterceptorResultSentinelRootIndex, |
- interceptor_succeeded); |
- } |
- |
- CallStubCompiler* stub_compiler_; |
- const ParameterCount& arguments_; |
- Register name_; |
-}; |
- |
- |
void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) { |
__ Jump(code, RelocInfo::CODE_TARGET); |
} |
@@ -1308,60 +1094,18 @@ void LoadStubCompiler::GenerateLoadCallback( |
// args_addr -> sp[8] reg |
// sp[0] name |
- // Pass the Handle<Name> of the property name to the runtime. |
- __ Mov(x0, __ StackPointer()); |
- |
- FrameScope frame_scope(masm(), StackFrame::MANUAL); |
- const int kApiStackSpace = 1; |
- __ EnterExitFrame(false, scratch4(), |
- kApiStackSpace + MacroAssembler::kCallApiFunctionSpillSpace); |
- |
- // Create PropertyAccessorInfo instance on the stack above the exit frame |
- // (before the return address) with args_addr as the data. |
- __ Poke(args_addr, 1 * kPointerSize); |
- |
- // Get the address of ExecutableAccessorInfo instance and pass it to the |
- // runtime. |
- __ Add(x1, __ StackPointer(), 1 * kPointerSize); |
- |
- // CallApiFunctionAndReturn can spill registers inside the exit frame, after |
- // the return address and the ExecutableAccessorInfo instance. |
- const int spill_offset = 1 + kApiStackSpace; |
- |
- // After the call to the API function we need to free memory used for: |
- // - the holder |
- // - the callback data |
- // - the isolate |
- // - the property name |
- // - the receiver. |
- // |
- // The memory allocated inside the ExitFrame will be freed when we'll leave |
- // the ExitFrame in CallApiFunctionAndReturn. |
- const int kStackUnwindSpace = PropertyCallbackArguments::kArgsLength + 1; |
+ // Abi for CallApiGetter. |
+ Register getter_address_reg = x2; |
// Set up the call. |
Address getter_address = v8::ToCData<Address>(callback->getter()); |
ApiFunction fun(getter_address); |
ExternalReference::Type type = ExternalReference::DIRECT_GETTER_CALL; |
ExternalReference ref = ExternalReference(&fun, type, isolate()); |
- Register getter_address_reg = x3; |
- Register thunk_last_arg = x2; |
__ Mov(getter_address_reg, Operand(ref)); |
- __ Mov(thunk_last_arg, Operand(reinterpret_cast<intptr_t>(getter_address))); |
- |
- Address thunk_address = FUNCTION_ADDR(&InvokeAccessorGetterCallback); |
- ExternalReference::Type thunk_type = ExternalReference::PROFILING_GETTER_CALL; |
- ApiFunction thunk_fun(thunk_address); |
- ExternalReference thunk_ref = |
- ExternalReference(&thunk_fun, thunk_type, isolate()); |
- |
- __ CallApiFunctionAndReturn(getter_address_reg, |
- thunk_ref, |
- thunk_last_arg, |
- kStackUnwindSpace, |
- spill_offset, |
- MemOperand(fp, 6 * kPointerSize), |
- NULL); |
+ |
+ CallApiGetterStub stub; |
+ __ TailCallStub(&stub); |
} |
@@ -1453,139 +1197,6 @@ void LoadStubCompiler::GenerateLoadInterceptor( |
} |
-void CallStubCompiler::GenerateNameCheck(Handle<Name> name, Label* miss) { |
- Register name_reg = x2; |
- |
- if (kind_ == Code::KEYED_CALL_IC) { |
- __ Cmp(name_reg, Operand(name)); |
- __ B(ne, miss); |
- } |
-} |
- |
- |
-void CallStubCompiler::GenerateFunctionCheck(Register function, |
- Register scratch, |
- Label* miss) { |
- __ JumpIfSmi(function, miss); |
- __ JumpIfNotObjectType(function, scratch, scratch, JS_FUNCTION_TYPE, miss); |
-} |
- |
- |
-// Load the function object into x1 register. |
-void CallStubCompiler::GenerateLoadFunctionFromCell( |
- Handle<Cell> cell, |
- Handle<JSFunction> function, |
- Label* miss) { |
- // Get the value from the cell. |
- __ Mov(x3, Operand(cell)); |
- Register function_reg = x1; |
- __ Ldr(function_reg, FieldMemOperand(x3, Cell::kValueOffset)); |
- |
- // Check that the cell contains the same function. |
- if (heap()->InNewSpace(*function)) { |
- // We can't embed a pointer to a function in new space so we have |
- // to verify that the shared function info is unchanged. This has |
- // the nice side effect that multiple closures based on the same |
- // function can all use this call IC. Before we load through the |
- // function, we have to verify that it still is a function. |
- GenerateFunctionCheck(function_reg, x3, miss); |
- |
- // Check the shared function info. Make sure it hasn't changed. |
- __ Mov(x3, Operand(Handle<SharedFunctionInfo>(function->shared()))); |
- __ Ldr(x4, |
- FieldMemOperand(function_reg, JSFunction::kSharedFunctionInfoOffset)); |
- __ Cmp(x4, x3); |
- } else { |
- __ Cmp(function_reg, Operand(function)); |
- } |
- __ B(ne, miss); |
-} |
- |
- |
-void CallStubCompiler::GenerateMissBranch() { |
- Handle<Code> code = |
- isolate()->stub_cache()->ComputeCallMiss(arguments().immediate(), |
- kind_, |
- extra_state()); |
- __ Jump(code, RelocInfo::CODE_TARGET); |
-} |
- |
- |
-Handle<Code> CallStubCompiler::CompileCallField(Handle<JSObject> object, |
- Handle<JSObject> holder, |
- PropertyIndex index, |
- Handle<Name> name) { |
- Label miss; |
- Register function = x1; |
- |
- Register holder_reg = HandlerFrontendHeader( |
- object, holder, name, RECEIVER_MAP_CHECK, &miss); |
- |
- GenerateFastPropertyLoad(masm(), function, holder_reg, |
- index.is_inobject(holder), |
- index.translate(holder), |
- Representation::Tagged()); |
- GenerateJumpFunction(object, function, &miss); |
- |
- HandlerFrontendFooter(&miss); |
- |
- // Return the generated code. |
- return GetCode(Code::FAST, name); |
-} |
- |
- |
-Handle<Code> CallStubCompiler::CompileFastApiCall( |
- const CallOptimization& optimization, |
- Handle<Object> object, |
- Handle<JSObject> holder, |
- Handle<Cell> cell, |
- Handle<JSFunction> function, |
- Handle<String> name) { |
- Counters* counters = isolate()->counters(); |
- |
- ASSERT(optimization.is_simple_api_call()); |
- // Bail out if object is a global object as we don't want to |
- // repatch it to global receiver. |
- if (object->IsGlobalObject()) return Handle<Code>::null(); |
- if (!cell.is_null()) return Handle<Code>::null(); |
- if (!object->IsJSObject()) return Handle<Code>::null(); |
- Handle<JSObject> receiver = Handle<JSObject>::cast(object); |
- CallOptimization::HolderLookup holder_lookup = |
- CallOptimization::kHolderNotFound; |
- Handle<Map> lookup_map = optimization.LookupHolderOfExpectedType( |
- receiver, receiver, holder, &holder_lookup); |
- if (holder_lookup == CallOptimization::kHolderNotFound) { |
- return Handle<Code>::null(); |
- } |
- |
- Label miss; |
- GenerateNameCheck(name, &miss); |
- |
- const int argc = arguments().immediate(); |
- |
- // Get the receiver from the stack. |
- Register receiver_reg = x1; |
- __ Peek(receiver_reg, argc * kPointerSize); |
- |
- // Check that the receiver isn't a smi. |
- __ JumpIfSmi(receiver_reg, &miss); |
- |
- __ IncrementCounter(counters->call_const(), 1, x0, x3); |
- |
- // Check that the maps haven't changed and find a Holder as a side effect. |
- CheckPrototypes(IC::CurrentTypeOf(object, isolate()), |
- receiver_reg, holder, x0, x3, x4, name, &miss); |
- |
- GenerateFastApiCall( |
- masm(), optimization, argc, lookup_map, holder_lookup); |
- |
- HandlerFrontendFooter(&miss); |
- |
- // Return the generated code. |
- return GetCode(function); |
-} |
- |
- |
void StubCompiler::GenerateBooleanCheck(Register object, Label* miss) { |
Label success; |
// Check that the object is a boolean. |
@@ -1596,185 +1207,6 @@ void StubCompiler::GenerateBooleanCheck(Register object, Label* miss) { |
} |
-void CallStubCompiler::PatchImplicitReceiver(Handle<Object> object) { |
- // TODO(all): Is the use of x3 significant? |
- if (object->IsGlobalObject()) { |
- const int argc = arguments().immediate(); |
- const int receiver_offset = argc * kPointerSize; |
- __ LoadRoot(x3, Heap::kUndefinedValueRootIndex); |
- __ Poke(x3, receiver_offset); |
- } |
-} |
- |
- |
-Register CallStubCompiler::HandlerFrontendHeader(Handle<Object> object, |
- Handle<JSObject> holder, |
- Handle<Name> name, |
- CheckType check, |
- Label* miss) { |
- // ----------- S t a t e ------------- |
- // -- x2 : name |
- // -- lr : return address |
- // ----------------------------------- |
- GenerateNameCheck(name, miss); |
- |
- Register receiver = x0; |
- Register prototype_reg = x1; |
- |
- // Get the receiver from the stack. |
- const int argc = arguments().immediate(); |
- const int receiver_offset = argc * kPointerSize; |
- __ Peek(receiver, receiver_offset); |
- |
- // Check that the receiver isn't a smi. |
- if (check != NUMBER_CHECK) { |
- __ JumpIfSmi(receiver, miss); |
- } |
- |
- // Make sure that it's okay not to patch the on stack receiver |
- // unless we're doing a receiver map check. |
- ASSERT(!object->IsGlobalObject() || check == RECEIVER_MAP_CHECK); |
- |
- switch (check) { |
- case RECEIVER_MAP_CHECK: { |
- __ IncrementCounter(isolate()->counters()->call_const(), 1, x1, x3); |
- |
- // Check that the maps haven't changed. |
- receiver = CheckPrototypes(IC::CurrentTypeOf(object, isolate()), |
- receiver, holder, x1, x3, x4, name, miss); |
- break; |
- } |
- case STRING_CHECK: { |
- // Check that the object is a string. |
- __ JumpIfObjectType(receiver, x3, x3, FIRST_NONSTRING_TYPE, miss, ge); |
- // Check that the maps starting from the prototype_reg haven't changed. |
- GenerateDirectLoadGlobalFunctionPrototype( |
- masm(), Context::STRING_FUNCTION_INDEX, prototype_reg, miss); |
- break; |
- } |
- case SYMBOL_CHECK: { |
- // Check that the object is a symbol. |
- __ JumpIfNotObjectType(receiver, x3, x3, SYMBOL_TYPE, miss); |
- // Check that the maps starting from the prototype_reg haven't changed. |
- GenerateDirectLoadGlobalFunctionPrototype( |
- masm(), Context::SYMBOL_FUNCTION_INDEX, prototype_reg, miss); |
- break; |
- } |
- case NUMBER_CHECK: { |
- Label fast; |
- // Check that the object is a smi or a heap number. |
- __ JumpIfSmi(receiver, &fast); |
- __ JumpIfNotObjectType(receiver, x3, x3, HEAP_NUMBER_TYPE, miss); |
- |
- __ Bind(&fast); |
- // Check that the maps starting from the prototype_reg haven't changed. |
- GenerateDirectLoadGlobalFunctionPrototype( |
- masm(), Context::NUMBER_FUNCTION_INDEX, prototype_reg, miss); |
- break; |
- } |
- case BOOLEAN_CHECK: { |
- GenerateBooleanCheck(receiver, miss); |
- |
- // Check that the maps starting from the prototype_reg haven't changed. |
- GenerateDirectLoadGlobalFunctionPrototype( |
- masm(), Context::BOOLEAN_FUNCTION_INDEX, prototype_reg, miss); |
- break; |
- } |
- } |
- |
- if (check != RECEIVER_MAP_CHECK) { |
- Handle<Object> prototype(object->GetPrototype(isolate()), isolate()); |
- receiver = CheckPrototypes( |
- IC::CurrentTypeOf(prototype, isolate()), |
- prototype_reg, holder, x1, x3, x4, name, miss); |
- } |
- |
- return receiver; |
-} |
- |
- |
-void CallStubCompiler::GenerateJumpFunction(Handle<Object> object, |
- Register function, |
- Label* miss) { |
- ASSERT(function.Is(x1)); |
- // Check that the function really is a function. |
- GenerateFunctionCheck(function, x3, miss); |
- PatchImplicitReceiver(object); |
- |
- // Invoke the function. |
- __ InvokeFunction(function, arguments(), JUMP_FUNCTION, NullCallWrapper()); |
-} |
- |
- |
-Handle<Code> CallStubCompiler::CompileCallInterceptor(Handle<JSObject> object, |
- Handle<JSObject> holder, |
- Handle<Name> name) { |
- Label miss; |
- Register name_reg = x2; |
- |
- GenerateNameCheck(name, &miss); |
- |
- const int argc = arguments().immediate(); |
- LookupResult lookup(isolate()); |
- LookupPostInterceptor(holder, name, &lookup); |
- |
- // Get the receiver from the stack. |
- Register receiver = x5; |
- __ Peek(receiver, argc * kPointerSize); |
- |
- CallInterceptorCompiler compiler(this, arguments(), name_reg); |
- compiler.Compile( |
- masm(), object, holder, name, &lookup, receiver, x3, x4, x0, &miss); |
- |
- // Move returned value, the function to call, to x1 (this is required by |
- // GenerateCallFunction). |
- Register function = x1; |
- __ Mov(function, x0); |
- |
- // Restore receiver. |
- __ Peek(receiver, argc * kPointerSize); |
- |
- GenerateJumpFunction(object, x1, &miss); |
- |
- HandlerFrontendFooter(&miss); |
- |
- // Return the generated code. |
- return GetCode(Code::FAST, name); |
-} |
- |
- |
-Handle<Code> CallStubCompiler::CompileCallGlobal( |
- Handle<JSObject> object, |
- Handle<GlobalObject> holder, |
- Handle<PropertyCell> cell, |
- Handle<JSFunction> function, |
- Handle<Name> name) { |
- if (HasCustomCallGenerator(function)) { |
- Handle<Code> code = CompileCustomCall( |
- object, holder, cell, function, Handle<String>::cast(name), |
- Code::NORMAL); |
- // A null handle means bail out to the regular compiler code below. |
- if (!code.is_null()) return code; |
- } |
- |
- Label miss; |
- HandlerFrontendHeader(object, holder, name, RECEIVER_MAP_CHECK, &miss); |
- // Potentially loads a closure that matches the shared function info of the |
- // function, rather than function. |
- GenerateLoadFunctionFromCell(cell, function, &miss); |
- // After these two calls the receiver is left in x0 and the function in x1. |
- Register function_reg = x1; |
- |
- Counters* counters = isolate()->counters(); |
- __ IncrementCounter(counters->call_global_inline(), 1, x3, x4); |
- GenerateJumpFunction(object, function_reg, function); |
- HandlerFrontendFooter(&miss); |
- |
- // Return the generated code. |
- return GetCode(Code::NORMAL, name); |
-} |
- |
- |
Handle<Code> StoreStubCompiler::CompileStoreCallback( |
Handle<JSObject> object, |
Handle<JSObject> holder, |
@@ -1978,7 +1410,6 @@ Handle<Code> LoadStubCompiler::CompileLoadGlobal( |
Handle<Name> name, |
bool is_dont_delete) { |
Label miss; |
- |
HandlerFrontendHeader(type, receiver(), global, name, &miss); |
// Get the value from the cell. |
@@ -1990,13 +1421,13 @@ Handle<Code> LoadStubCompiler::CompileLoadGlobal( |
__ JumpIfRoot(x4, Heap::kTheHoleValueRootIndex, &miss); |
} |
- HandlerFrontendFooter(name, &miss); |
- |
Counters* counters = isolate()->counters(); |
__ IncrementCounter(counters->named_load_global_stub(), 1, x1, x3); |
__ Mov(x0, x4); |
__ Ret(); |
+ HandlerFrontendFooter(name, &miss); |
+ |
// Return the generated code. |
return GetCode(kind(), Code::NORMAL, name); |
} |