| 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 3000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3011 RelocInfo::Mode mode = RelocInfo::CODE_TARGET; | 3011 RelocInfo::Mode mode = RelocInfo::CODE_TARGET; |
| 3012 Handle<Code> ic = | 3012 Handle<Code> ic = |
| 3013 isolate()->stub_cache()->ComputeCallInitialize(arity, mode); | 3013 isolate()->stub_cache()->ComputeCallInitialize(arity, mode); |
| 3014 __ Move(rcx, instr->name()); | 3014 __ Move(rcx, instr->name()); |
| 3015 CallCode(ic, mode, instr); | 3015 CallCode(ic, mode, instr); |
| 3016 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 3016 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
| 3017 } | 3017 } |
| 3018 | 3018 |
| 3019 | 3019 |
| 3020 void LCodeGen::DoCallFunction(LCallFunction* instr) { | 3020 void LCodeGen::DoCallFunction(LCallFunction* instr) { |
| 3021 ASSERT(ToRegister(instr->function()).is(rdi)); |
| 3021 ASSERT(ToRegister(instr->result()).is(rax)); | 3022 ASSERT(ToRegister(instr->result()).is(rax)); |
| 3022 | 3023 |
| 3023 int arity = instr->arity(); | 3024 int arity = instr->arity(); |
| 3024 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); | 3025 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); |
| 3025 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 3026 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 3026 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 3027 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
| 3027 __ Drop(1); | |
| 3028 } | 3028 } |
| 3029 | 3029 |
| 3030 | 3030 |
| 3031 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { | 3031 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { |
| 3032 ASSERT(ToRegister(instr->result()).is(rax)); | 3032 ASSERT(ToRegister(instr->result()).is(rax)); |
| 3033 int arity = instr->arity(); | 3033 int arity = instr->arity(); |
| 3034 RelocInfo::Mode mode = RelocInfo::CODE_TARGET_CONTEXT; | 3034 RelocInfo::Mode mode = RelocInfo::CODE_TARGET_CONTEXT; |
| 3035 Handle<Code> ic = | 3035 Handle<Code> ic = |
| 3036 isolate()->stub_cache()->ComputeCallInitialize(arity, mode); | 3036 isolate()->stub_cache()->ComputeCallInitialize(arity, mode); |
| 3037 __ Move(rcx, instr->name()); | 3037 __ Move(rcx, instr->name()); |
| (...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4228 RegisterEnvironmentForDeoptimization(environment); | 4228 RegisterEnvironmentForDeoptimization(environment); |
| 4229 ASSERT(osr_pc_offset_ == -1); | 4229 ASSERT(osr_pc_offset_ == -1); |
| 4230 osr_pc_offset_ = masm()->pc_offset(); | 4230 osr_pc_offset_ = masm()->pc_offset(); |
| 4231 } | 4231 } |
| 4232 | 4232 |
| 4233 #undef __ | 4233 #undef __ |
| 4234 | 4234 |
| 4235 } } // namespace v8::internal | 4235 } } // namespace v8::internal |
| 4236 | 4236 |
| 4237 #endif // V8_TARGET_ARCH_X64 | 4237 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |