| Index: src/ia32/stub-cache-ia32.cc
|
| diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
|
| index 49b9857a263271d4f59858602459be5e19ffd2c7..df983e9a0b6355854e2bc89111bbf7a1e94ab15e 100644
|
| --- a/src/ia32/stub-cache-ia32.cc
|
| +++ b/src/ia32/stub-cache-ia32.cc
|
| @@ -462,46 +462,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 = ecx;
|
| - switch (holder_lookup) {
|
| - case CallOptimization::kHolderIsReceiver:
|
| - {
|
| - ASSERT(map_to_holder.is_null());
|
| - __ mov(holder_reg, Operand(esp, (argc + 1)* kPointerSize));
|
| - }
|
| - break;
|
| - case CallOptimization::kHolderIsPrototypeOfMap:
|
| - {
|
| - Handle<JSObject> holder(JSObject::cast(map_to_holder->prototype()));
|
| - if (!masm->isolate()->heap()->InNewSpace(*holder)) {
|
| - __ mov(holder_reg, holder);
|
| - } else {
|
| - __ mov(holder_reg, map_to_holder);
|
| - __ mov(holder_reg, FieldOperand(holder_reg, Map::kPrototypeOffset));
|
| - }
|
| - }
|
| - break;
|
| - case CallOptimization::kHolderNotFound:
|
| - UNREACHABLE();
|
| - }
|
| - GenerateFastApiCallBody(masm,
|
| - optimization,
|
| - argc,
|
| - holder_reg,
|
| - false);
|
| -}
|
| -
|
| -
|
| // Generate call to api function.
|
| // This function uses push() to generate smaller, faster code than
|
| // the version above. It is an optimization that should will be removed
|
| @@ -612,35 +572,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);
|
| @@ -1510,54 +1443,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);
|
| -
|
| - // Get the receiver from the stack.
|
| - const int argc = arguments().immediate();
|
| - __ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
|
| -
|
| - // Check that the receiver isn't a smi.
|
| - __ JumpIfSmi(edx, &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()), edx, holder,
|
| - ebx, eax, edi, 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.
|
| @@ -1712,14 +1597,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
|
|
|