| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 3783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3794 isolate()->stub_cache()->ComputeKeyedCallInitialize(arity); | 3794 isolate()->stub_cache()->ComputeKeyedCallInitialize(arity); |
| 3795 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3795 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 3796 } | 3796 } |
| 3797 | 3797 |
| 3798 | 3798 |
| 3799 void LCodeGen::DoCallNamed(LCallNamed* instr) { | 3799 void LCodeGen::DoCallNamed(LCallNamed* instr) { |
| 3800 ASSERT(ToRegister(instr->context()).is(rsi)); | 3800 ASSERT(ToRegister(instr->context()).is(rsi)); |
| 3801 ASSERT(ToRegister(instr->result()).is(rax)); | 3801 ASSERT(ToRegister(instr->result()).is(rax)); |
| 3802 | 3802 |
| 3803 int arity = instr->arity(); | 3803 int arity = instr->arity(); |
| 3804 Handle<Code> ic = | 3804 Handle<Code> ic = isolate()->stub_cache()->ComputeCallInitialize(arity); |
| 3805 isolate()->stub_cache()->ComputeCallInitialize(arity, NOT_CONTEXTUAL); | |
| 3806 __ Move(rcx, instr->name()); | 3805 __ Move(rcx, instr->name()); |
| 3807 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3806 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 3808 } | 3807 } |
| 3809 | 3808 |
| 3810 | 3809 |
| 3811 void LCodeGen::DoCallFunction(LCallFunction* instr) { | 3810 void LCodeGen::DoCallFunction(LCallFunction* instr) { |
| 3812 ASSERT(ToRegister(instr->context()).is(rsi)); | 3811 ASSERT(ToRegister(instr->context()).is(rsi)); |
| 3813 ASSERT(ToRegister(instr->function()).is(rdi)); | 3812 ASSERT(ToRegister(instr->function()).is(rdi)); |
| 3814 ASSERT(ToRegister(instr->result()).is(rax)); | 3813 ASSERT(ToRegister(instr->result()).is(rax)); |
| 3815 | 3814 |
| 3816 int arity = instr->arity(); | 3815 int arity = instr->arity(); |
| 3817 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); | 3816 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); |
| 3818 if (instr->hydrogen()->IsTailCall()) { | 3817 if (instr->hydrogen()->IsTailCall()) { |
| 3819 if (NeedsEagerFrame()) __ leave(); | 3818 if (NeedsEagerFrame()) __ leave(); |
| 3820 __ jmp(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); | 3819 __ jmp(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); |
| 3821 } else { | 3820 } else { |
| 3822 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 3821 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 3823 } | 3822 } |
| 3824 } | 3823 } |
| 3825 | 3824 |
| 3826 | 3825 |
| 3827 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { | 3826 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { |
| 3828 ASSERT(ToRegister(instr->context()).is(rsi)); | 3827 ASSERT(ToRegister(instr->context()).is(rsi)); |
| 3829 ASSERT(ToRegister(instr->result()).is(rax)); | 3828 ASSERT(ToRegister(instr->result()).is(rax)); |
| 3830 int arity = instr->arity(); | 3829 int arity = instr->arity(); |
| 3831 Handle<Code> ic = | 3830 Handle<Code> ic = isolate()->stub_cache()->ComputeCallInitialize(arity); |
| 3832 isolate()->stub_cache()->ComputeCallInitialize(arity, CONTEXTUAL); | |
| 3833 __ Move(rcx, instr->name()); | 3831 __ Move(rcx, instr->name()); |
| 3834 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3832 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 3835 } | 3833 } |
| 3836 | 3834 |
| 3837 | 3835 |
| 3838 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) { | 3836 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) { |
| 3839 ASSERT(ToRegister(instr->result()).is(rax)); | 3837 ASSERT(ToRegister(instr->result()).is(rax)); |
| 3840 CallKnownFunction(instr->hydrogen()->target(), | 3838 CallKnownFunction(instr->hydrogen()->target(), |
| 3841 instr->hydrogen()->formal_parameter_count(), | 3839 instr->hydrogen()->formal_parameter_count(), |
| 3842 instr->arity(), | 3840 instr->arity(), |
| (...skipping 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5626 FixedArray::kHeaderSize - kPointerSize)); | 5624 FixedArray::kHeaderSize - kPointerSize)); |
| 5627 __ bind(&done); | 5625 __ bind(&done); |
| 5628 } | 5626 } |
| 5629 | 5627 |
| 5630 | 5628 |
| 5631 #undef __ | 5629 #undef __ |
| 5632 | 5630 |
| 5633 } } // namespace v8::internal | 5631 } } // namespace v8::internal |
| 5634 | 5632 |
| 5635 #endif // V8_TARGET_ARCH_X64 | 5633 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |