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

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

Issue 2021323003: [wasm] remove faux code objects Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/wasm-linkage.cc ('k') | src/ia32/assembler-ia32.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/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 __ bind(&done); 645 __ bind(&done);
646 } 646 }
647 647
648 // Assembles an instruction after register allocation, producing machine code. 648 // Assembles an instruction after register allocation, producing machine code.
649 CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( 649 CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
650 Instruction* instr) { 650 Instruction* instr) {
651 X64OperandConverter i(this, instr); 651 X64OperandConverter i(this, instr);
652 InstructionCode opcode = instr->opcode(); 652 InstructionCode opcode = instr->opcode();
653 ArchOpcode arch_opcode = ArchOpcodeField::decode(opcode); 653 ArchOpcode arch_opcode = ArchOpcodeField::decode(opcode);
654 switch (arch_opcode) { 654 switch (arch_opcode) {
655 case kArchCallWasmFunction: {
656 DCHECK(HasImmediateInput(instr, 0));
657 Constant callee_operand = i.ToConstant(instr->InputAt(0));
658 DCHECK(callee_operand.type() == Constant::Type::kInt32);
659 __ wasm_call(callee_operand.ToInt32(), callee_operand.rmode());
660 RecordCallPosition(instr);
661 frame_access_state()->ClearSPDelta();
662 break;
663 }
655 case kArchCallCodeObject: { 664 case kArchCallCodeObject: {
656 EnsureSpaceForLazyDeopt(); 665 EnsureSpaceForLazyDeopt();
657 if (HasImmediateInput(instr, 0)) { 666 if (HasImmediateInput(instr, 0)) {
658 Handle<Code> code = Handle<Code>::cast(i.InputHeapObject(0)); 667 Handle<Code> code = Handle<Code>::cast(i.InputHeapObject(0));
659 __ Call(code, RelocInfo::CODE_TARGET); 668 __ Call(code, RelocInfo::CODE_TARGET);
660 } else { 669 } else {
661 Register reg = i.InputRegister(0); 670 Register reg = i.InputRegister(0);
662 __ addp(reg, Immediate(Code::kHeaderSize - kHeapObjectTag)); 671 __ addp(reg, Immediate(Code::kHeaderSize - kHeapObjectTag));
663 __ call(reg); 672 __ call(reg);
664 } 673 }
(...skipping 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after
2319 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2328 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2320 __ Nop(padding_size); 2329 __ Nop(padding_size);
2321 } 2330 }
2322 } 2331 }
2323 2332
2324 #undef __ 2333 #undef __
2325 2334
2326 } // namespace compiler 2335 } // namespace compiler
2327 } // namespace internal 2336 } // namespace internal
2328 } // namespace v8 2337 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/wasm-linkage.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698