OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2135 | 2135 |
2136 int arity = instr->arity(); | 2136 int arity = instr->arity(); |
2137 Handle<Code> ic = StubCache::ComputeCallInitialize(arity, NOT_IN_LOOP); | 2137 Handle<Code> ic = StubCache::ComputeCallInitialize(arity, NOT_IN_LOOP); |
2138 __ Move(rcx, instr->name()); | 2138 __ Move(rcx, instr->name()); |
2139 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2139 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2140 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 2140 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
2141 } | 2141 } |
2142 | 2142 |
2143 | 2143 |
2144 void LCodeGen::DoCallFunction(LCallFunction* instr) { | 2144 void LCodeGen::DoCallFunction(LCallFunction* instr) { |
2145 ASSERT(ToRegister(instr->context()).is(rsi)); | |
2146 ASSERT(ToRegister(instr->result()).is(rax)); | 2145 ASSERT(ToRegister(instr->result()).is(rax)); |
2147 | 2146 |
2148 int arity = instr->arity(); | 2147 int arity = instr->arity(); |
2149 CallFunctionStub stub(arity, NOT_IN_LOOP, RECEIVER_MIGHT_BE_VALUE); | 2148 CallFunctionStub stub(arity, NOT_IN_LOOP, RECEIVER_MIGHT_BE_VALUE); |
2150 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 2149 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 2150 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
2151 __ Drop(1); | 2151 __ Drop(1); |
2152 } | 2152 } |
2153 | 2153 |
2154 | 2154 |
2155 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { | 2155 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { |
2156 ASSERT(ToRegister(instr->result()).is(rax)); | 2156 ASSERT(ToRegister(instr->result()).is(rax)); |
2157 int arity = instr->arity(); | 2157 int arity = instr->arity(); |
2158 Handle<Code> ic = StubCache::ComputeCallInitialize(arity, NOT_IN_LOOP); | 2158 Handle<Code> ic = StubCache::ComputeCallInitialize(arity, NOT_IN_LOOP); |
2159 __ Move(rcx, instr->name()); | 2159 __ Move(rcx, instr->name()); |
2160 CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr); | 2160 CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr); |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2843 RegisterEnvironmentForDeoptimization(environment); | 2843 RegisterEnvironmentForDeoptimization(environment); |
2844 ASSERT(osr_pc_offset_ == -1); | 2844 ASSERT(osr_pc_offset_ == -1); |
2845 osr_pc_offset_ = masm()->pc_offset(); | 2845 osr_pc_offset_ = masm()->pc_offset(); |
2846 } | 2846 } |
2847 | 2847 |
2848 #undef __ | 2848 #undef __ |
2849 | 2849 |
2850 } } // namespace v8::internal | 2850 } } // namespace v8::internal |
2851 | 2851 |
2852 #endif // V8_TARGET_ARCH_X64 | 2852 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |