Index: src/x64/stub-cache-x64.cc |
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc |
index 811b20c32d24a1d167523ea1815044fa9000e01d..54939d11208b3eb6c8a524c0117ba55f27d7ba9a 100644 |
--- a/src/x64/stub-cache-x64.cc |
+++ b/src/x64/stub-cache-x64.cc |
@@ -437,47 +437,6 @@ static void GenerateFastApiCallBody(MacroAssembler* masm, |
} |
-// 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); |
- |
- // Move holder to a register |
- Register holder_reg = rax; |
- switch (holder_lookup) { |
- case CallOptimization::kHolderIsReceiver: |
- { |
- ASSERT(map_to_holder.is_null()); |
- StackArgumentsAccessor args(rsp, argc); |
- __ movp(holder_reg, args.GetReceiverOperand()); |
- } |
- break; |
- case CallOptimization::kHolderIsPrototypeOfMap: |
- { |
- Handle<JSObject> holder(JSObject::cast(map_to_holder->prototype())); |
- if (!masm->isolate()->heap()->InNewSpace(*holder)) { |
- __ Move(holder_reg, holder); |
- } else { |
- __ Move(holder_reg, map_to_holder); |
- __ movp(holder_reg, FieldOperand(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, |
@@ -585,35 +544,8 @@ class CallInterceptorCompiler BASE_EMBEDDED { |
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> fun = optimization.constant_function(); |
- stub_compiler_->GenerateJumpFunction(object, fun); |
- } |
+ Handle<JSFunction> fun = optimization.constant_function(); |
+ stub_compiler_->GenerateJumpFunction(object, fun); |
// Invoke a regular function. |
__ bind(®ular_invoke); |
@@ -1401,54 +1333,6 @@ Handle<Code> CallStubCompiler::CompileCallField(Handle<JSObject> object, |
} |
-Handle<Code> CallStubCompiler::CompileFastApiCall( |
- const CallOptimization& optimization, |
- Handle<Object> object, |
- Handle<JSObject> holder, |
- Handle<Cell> cell, |
- Handle<JSFunction> function, |
- Handle<String> name) { |
- 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(); |
- StackArgumentsAccessor args(rsp, argc); |
- __ movp(rdx, args.GetReceiverOperand()); |
- |
- // Check that the receiver isn't a smi. |
- __ JumpIfSmi(rdx, &miss); |
- |
- Counters* counters = isolate()->counters(); |
- __ IncrementCounter(counters->call_const(), 1); |
- |
- // Check that the maps haven't changed and find a Holder as a side effect. |
- CheckPrototypes(IC::CurrentTypeOf(object, isolate()), rdx, holder, |
- rbx, rax, rdi, 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. |
@@ -1599,14 +1483,6 @@ Handle<Code> CallStubCompiler::CompileCallGlobal( |
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 |