Chromium Code Reviews| Index: src/arm/lithium-codegen-arm.cc |
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
| index 2919eb072aa852b92e11282f7a0cbdad057a68f2..f5bb1b2b3aa895b2aba062e846db0923968d84a2 100644 |
| --- a/src/arm/lithium-codegen-arm.cc |
| +++ b/src/arm/lithium-codegen-arm.cc |
| @@ -3670,17 +3670,6 @@ void LCodeGen::CallKnownFunction(Handle<JSFunction> function, |
| } |
| -void LCodeGen::DoCallConstantFunction(LCallConstantFunction* instr) { |
| - ASSERT(ToRegister(instr->result()).is(r0)); |
| - CallKnownFunction(instr->hydrogen()->function(), |
| - instr->hydrogen()->formal_parameter_count(), |
| - instr->arity(), |
| - instr, |
| - CALL_AS_METHOD, |
| - R1_UNINITIALIZED); |
| -} |
| - |
| - |
| void LCodeGen::DoDeferredMathAbsTaggedHeapNumber(LMathAbs* instr) { |
| ASSERT(instr->context() != NULL); |
| ASSERT(ToRegister(instr->context()).is(cp)); |
| @@ -3966,27 +3955,48 @@ void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { |
| } |
| -void LCodeGen::DoCallKeyed(LCallKeyed* instr) { |
| - ASSERT(ToRegister(instr->context()).is(cp)); |
| +void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) { |
| ASSERT(ToRegister(instr->result()).is(r0)); |
| - int arity = instr->arity(); |
| - Handle<Code> ic = |
| - isolate()->stub_cache()->ComputeKeyedCallInitialize(arity); |
| - CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); |
| + LPointerMap* pointers = instr->pointer_map(); |
| + SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt); |
| + |
| + if (instr->target()->IsConstantOperand()) { |
| + LConstantOperand* target = LConstantOperand::cast(instr->target()); |
| + Handle<Code> code = Handle<Code>::cast(ToHandle(target)); |
| + generator.BeforeCall(__ CallSize(code, RelocInfo::CODE_TARGET)); |
| + PlatformCallInterfaceDescriptor* armCallDesc = |
|
Toon Verwaest
2014/01/03 07:14:07
What about just "call_descriptor ="? It's quite ob
|
| + instr->descriptor()->platform_specific_descriptor(); |
|
Toon Verwaest
2014/01/03 07:14:07
4-space indent
|
| + __ Call(code, RelocInfo::CODE_TARGET, TypeFeedbackId::None(), al, |
| + armCallDesc->storage_mode()); |
| + } else { |
| + ASSERT(instr->target()->IsRegister()); |
| + Register target = ToRegister(instr->target()); |
| + generator.BeforeCall(__ CallSize(target)); |
| + __ add(target, target, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| + __ Call(target); |
| + } |
| + generator.AfterCall(); |
| } |
| -void LCodeGen::DoCallNamed(LCallNamed* instr) { |
| - ASSERT(ToRegister(instr->context()).is(cp)); |
| +void LCodeGen::DoCallJSFunction(LCallJSFunction* instr) { |
| + ASSERT(ToRegister(instr->function()).is(r1)); |
| + ASSERT(ToRegister(instr->call_kind()).is(r5)); |
| ASSERT(ToRegister(instr->result()).is(r0)); |
| - int arity = instr->arity(); |
| - RelocInfo::Mode mode = RelocInfo::CODE_TARGET; |
| - Handle<Code> ic = |
| - isolate()->stub_cache()->ComputeCallInitialize(arity, mode); |
| - __ mov(r2, Operand(instr->name())); |
| - CallCode(ic, mode, instr, NEVER_INLINE_TARGET_ADDRESS); |
| + if (instr->hydrogen()->pass_argument_count()) { |
| + __ mov(r0, Operand(instr->arity())); |
| + } |
| + |
| + // Change context. |
| + __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); |
| + |
| + // Load the code entry address |
| + __ ldr(ip, FieldMemOperand(r1, JSFunction::kCodeEntryOffset)); |
| + __ Call(ip); |
| + |
| + RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT); |
| } |
| @@ -4019,17 +4029,6 @@ void LCodeGen::DoCallGlobal(LCallGlobal* instr) { |
| } |
| -void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) { |
| - ASSERT(ToRegister(instr->result()).is(r0)); |
| - CallKnownFunction(instr->hydrogen()->target(), |
| - instr->hydrogen()->formal_parameter_count(), |
| - instr->arity(), |
| - instr, |
| - CALL_AS_FUNCTION, |
| - R1_UNINITIALIZED); |
| -} |
| - |
| - |
| void LCodeGen::DoCallNew(LCallNew* instr) { |
| ASSERT(ToRegister(instr->context()).is(cp)); |
| ASSERT(ToRegister(instr->constructor()).is(r1)); |