Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Side by Side Diff: src/compiler/x64/code-generator-x64.cc

Issue 1377423002: [turbofan] Fix calls to computed code objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/ia32/code-generator-ia32.cc ('k') | test/cctest/compiler/codegen-tester.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/osr.h" 10 #include "src/compiler/osr.h"
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 X64OperandConverter i(this, instr); 548 X64OperandConverter i(this, instr);
549 549
550 switch (ArchOpcodeField::decode(instr->opcode())) { 550 switch (ArchOpcodeField::decode(instr->opcode())) {
551 case kArchCallCodeObject: { 551 case kArchCallCodeObject: {
552 EnsureSpaceForLazyDeopt(); 552 EnsureSpaceForLazyDeopt();
553 if (HasImmediateInput(instr, 0)) { 553 if (HasImmediateInput(instr, 0)) {
554 Handle<Code> code = Handle<Code>::cast(i.InputHeapObject(0)); 554 Handle<Code> code = Handle<Code>::cast(i.InputHeapObject(0));
555 __ Call(code, RelocInfo::CODE_TARGET); 555 __ Call(code, RelocInfo::CODE_TARGET);
556 } else { 556 } else {
557 Register reg = i.InputRegister(0); 557 Register reg = i.InputRegister(0);
558 int entry = Code::kHeaderSize - kHeapObjectTag; 558 __ addp(reg, Immediate(Code::kHeaderSize - kHeapObjectTag));
559 __ Call(Operand(reg, entry)); 559 __ call(reg);
560 } 560 }
561 RecordCallPosition(instr); 561 RecordCallPosition(instr);
562 break; 562 break;
563 } 563 }
564 case kArchTailCallCodeObject: { 564 case kArchTailCallCodeObject: {
565 AssembleDeconstructActivationRecord(); 565 AssembleDeconstructActivationRecord();
566 if (HasImmediateInput(instr, 0)) { 566 if (HasImmediateInput(instr, 0)) {
567 Handle<Code> code = Handle<Code>::cast(i.InputHeapObject(0)); 567 Handle<Code> code = Handle<Code>::cast(i.InputHeapObject(0));
568 __ jmp(code, RelocInfo::CODE_TARGET); 568 __ jmp(code, RelocInfo::CODE_TARGET);
569 } else { 569 } else {
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1812 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 1812 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
1813 __ Nop(padding_size); 1813 __ Nop(padding_size);
1814 } 1814 }
1815 } 1815 }
1816 1816
1817 #undef __ 1817 #undef __
1818 1818
1819 } // namespace compiler 1819 } // namespace compiler
1820 } // namespace internal 1820 } // namespace internal
1821 } // namespace v8 1821 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ia32/code-generator-ia32.cc ('k') | test/cctest/compiler/codegen-tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698