| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 3969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3980 isolate()->stub_cache()->ComputeKeyedCallInitialize(arity); | 3980 isolate()->stub_cache()->ComputeKeyedCallInitialize(arity); |
| 3981 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); | 3981 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); |
| 3982 } | 3982 } |
| 3983 | 3983 |
| 3984 | 3984 |
| 3985 void LCodeGen::DoCallNamed(LCallNamed* instr) { | 3985 void LCodeGen::DoCallNamed(LCallNamed* instr) { |
| 3986 ASSERT(ToRegister(instr->context()).is(cp)); | 3986 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3987 ASSERT(ToRegister(instr->result()).is(r0)); | 3987 ASSERT(ToRegister(instr->result()).is(r0)); |
| 3988 | 3988 |
| 3989 int arity = instr->arity(); | 3989 int arity = instr->arity(); |
| 3990 Handle<Code> ic = | 3990 Handle<Code> ic = isolate()->stub_cache()->ComputeCallInitialize(arity); |
| 3991 isolate()->stub_cache()->ComputeCallInitialize(arity, NOT_CONTEXTUAL); | |
| 3992 __ mov(r2, Operand(instr->name())); | 3991 __ mov(r2, Operand(instr->name())); |
| 3993 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); | 3992 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); |
| 3994 } | 3993 } |
| 3995 | 3994 |
| 3996 | 3995 |
| 3997 void LCodeGen::DoCallFunction(LCallFunction* instr) { | 3996 void LCodeGen::DoCallFunction(LCallFunction* instr) { |
| 3998 ASSERT(ToRegister(instr->context()).is(cp)); | 3997 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3999 ASSERT(ToRegister(instr->function()).is(r1)); | 3998 ASSERT(ToRegister(instr->function()).is(r1)); |
| 4000 ASSERT(ToRegister(instr->result()).is(r0)); | 3999 ASSERT(ToRegister(instr->result()).is(r0)); |
| 4001 | 4000 |
| 4002 int arity = instr->arity(); | 4001 int arity = instr->arity(); |
| 4003 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); | 4002 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); |
| 4004 if (instr->hydrogen()->IsTailCall()) { | 4003 if (instr->hydrogen()->IsTailCall()) { |
| 4005 if (NeedsEagerFrame()) __ mov(sp, fp); | 4004 if (NeedsEagerFrame()) __ mov(sp, fp); |
| 4006 __ Jump(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); | 4005 __ Jump(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); |
| 4007 } else { | 4006 } else { |
| 4008 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 4007 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 4009 } | 4008 } |
| 4010 } | 4009 } |
| 4011 | 4010 |
| 4012 | 4011 |
| 4013 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { | 4012 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { |
| 4014 ASSERT(ToRegister(instr->context()).is(cp)); | 4013 ASSERT(ToRegister(instr->context()).is(cp)); |
| 4015 ASSERT(ToRegister(instr->result()).is(r0)); | 4014 ASSERT(ToRegister(instr->result()).is(r0)); |
| 4016 | 4015 |
| 4017 int arity = instr->arity(); | 4016 int arity = instr->arity(); |
| 4018 Handle<Code> ic = | 4017 Handle<Code> ic = isolate()->stub_cache()->ComputeCallInitialize(arity); |
| 4019 isolate()->stub_cache()->ComputeCallInitialize(arity, CONTEXTUAL); | |
| 4020 __ mov(r2, Operand(instr->name())); | 4018 __ mov(r2, Operand(instr->name())); |
| 4021 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); | 4019 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); |
| 4022 } | 4020 } |
| 4023 | 4021 |
| 4024 | 4022 |
| 4025 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) { | 4023 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) { |
| 4026 ASSERT(ToRegister(instr->result()).is(r0)); | 4024 ASSERT(ToRegister(instr->result()).is(r0)); |
| 4027 CallKnownFunction(instr->hydrogen()->target(), | 4025 CallKnownFunction(instr->hydrogen()->target(), |
| 4028 instr->hydrogen()->formal_parameter_count(), | 4026 instr->hydrogen()->formal_parameter_count(), |
| 4029 instr->arity(), | 4027 instr->arity(), |
| (...skipping 1784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5814 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5812 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
| 5815 __ ldr(result, FieldMemOperand(scratch, | 5813 __ ldr(result, FieldMemOperand(scratch, |
| 5816 FixedArray::kHeaderSize - kPointerSize)); | 5814 FixedArray::kHeaderSize - kPointerSize)); |
| 5817 __ bind(&done); | 5815 __ bind(&done); |
| 5818 } | 5816 } |
| 5819 | 5817 |
| 5820 | 5818 |
| 5821 #undef __ | 5819 #undef __ |
| 5822 | 5820 |
| 5823 } } // namespace v8::internal | 5821 } } // namespace v8::internal |
| OLD | NEW |