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 2059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2070 | 2070 |
2071 int arity = instr->arity(); | 2071 int arity = instr->arity(); |
2072 Handle<Code> ic = StubCache::ComputeCallInitialize(arity, NOT_IN_LOOP); | 2072 Handle<Code> ic = StubCache::ComputeCallInitialize(arity, NOT_IN_LOOP); |
2073 __ Move(rcx, instr->name()); | 2073 __ Move(rcx, instr->name()); |
2074 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2074 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2075 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 2075 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
2076 } | 2076 } |
2077 | 2077 |
2078 | 2078 |
2079 void LCodeGen::DoCallFunction(LCallFunction* instr) { | 2079 void LCodeGen::DoCallFunction(LCallFunction* instr) { |
2080 Abort("Unimplemented: %s", "DoCallFunction"); | 2080 ASSERT(ToRegister(instr->context()).is(rsi)); |
| 2081 ASSERT(ToRegister(instr->result()).is(rax)); |
| 2082 |
| 2083 int arity = instr->arity(); |
| 2084 CallFunctionStub stub(arity, NOT_IN_LOOP, RECEIVER_MIGHT_BE_VALUE); |
| 2085 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
| 2086 __ Drop(1); |
2081 } | 2087 } |
2082 | 2088 |
2083 | 2089 |
2084 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { | 2090 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { |
2085 ASSERT(ToRegister(instr->result()).is(rax)); | 2091 ASSERT(ToRegister(instr->result()).is(rax)); |
2086 int arity = instr->arity(); | 2092 int arity = instr->arity(); |
2087 Handle<Code> ic = StubCache::ComputeCallInitialize(arity, NOT_IN_LOOP); | 2093 Handle<Code> ic = StubCache::ComputeCallInitialize(arity, NOT_IN_LOOP); |
2088 __ Move(rcx, instr->name()); | 2094 __ Move(rcx, instr->name()); |
2089 CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr); | 2095 CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr); |
2090 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 2096 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2772 RegisterEnvironmentForDeoptimization(environment); | 2778 RegisterEnvironmentForDeoptimization(environment); |
2773 ASSERT(osr_pc_offset_ == -1); | 2779 ASSERT(osr_pc_offset_ == -1); |
2774 osr_pc_offset_ = masm()->pc_offset(); | 2780 osr_pc_offset_ = masm()->pc_offset(); |
2775 } | 2781 } |
2776 | 2782 |
2777 #undef __ | 2783 #undef __ |
2778 | 2784 |
2779 } } // namespace v8::internal | 2785 } } // namespace v8::internal |
2780 | 2786 |
2781 #endif // V8_TARGET_ARCH_X64 | 2787 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |