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

Side by Side Diff: src/compiler/arm/code-generator-arm.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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/arm/macro-assembler-arm.h" 7 #include "src/arm/macro-assembler-arm.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/compiler/code-generator-impl.h" 9 #include "src/compiler/code-generator-impl.h"
10 #include "src/compiler/gap-resolver.h" 10 #include "src/compiler/gap-resolver.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 463
464 // Assembles an instruction after register allocation, producing machine code. 464 // Assembles an instruction after register allocation, producing machine code.
465 CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( 465 CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
466 Instruction* instr) { 466 Instruction* instr) {
467 ArmOperandConverter i(this, instr); 467 ArmOperandConverter i(this, instr);
468 468
469 __ MaybeCheckConstPool(); 469 __ MaybeCheckConstPool();
470 InstructionCode opcode = instr->opcode(); 470 InstructionCode opcode = instr->opcode();
471 ArchOpcode arch_opcode = ArchOpcodeField::decode(opcode); 471 ArchOpcode arch_opcode = ArchOpcodeField::decode(opcode);
472 switch (arch_opcode) { 472 switch (arch_opcode) {
473 case kArchCallCodeObject: { 473 case kArchCallCodeObject: {
titzer 2016/06/02 13:17:08 We should add another enum case here and not overl
Mircea Trofin 2016/06/02 14:46:21 Happy to. I intend to do the same thing for impor
474 EnsureSpaceForLazyDeopt(); 474 EnsureSpaceForLazyDeopt();
475 if (instr->InputAt(0)->IsImmediate()) { 475 if (instr->InputAt(0)->IsImmediate()) {
476 __ Call(Handle<Code>::cast(i.InputHeapObject(0)), 476 Constant callee_operand = i.ToConstant(instr->InputAt(0));
477 RelocInfo::CODE_TARGET); 477 if (callee_operand.type() == Constant::Type::kInt32) {
478 __ Call(reinterpret_cast<Address>(callee_operand.ToInt32()),
479 RelocInfo::WASM_DIRECT_CALL);
480 } else {
481 __ Call(Handle<Code>::cast(i.InputHeapObject(0)),
482 RelocInfo::CODE_TARGET);
483 }
478 } else { 484 } else {
479 __ add(ip, i.InputRegister(0), 485 __ add(ip, i.InputRegister(0),
480 Operand(Code::kHeaderSize - kHeapObjectTag)); 486 Operand(Code::kHeaderSize - kHeapObjectTag));
481 __ Call(ip); 487 __ Call(ip);
482 } 488 }
483 RecordCallPosition(instr); 489 RecordCallPosition(instr);
484 DCHECK_EQ(LeaveCC, i.OutputSBit()); 490 DCHECK_EQ(LeaveCC, i.OutputSBit());
485 frame_access_state()->ClearSPDelta(); 491 frame_access_state()->ClearSPDelta();
486 break; 492 break;
487 } 493 }
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 padding_size -= v8::internal::Assembler::kInstrSize; 1693 padding_size -= v8::internal::Assembler::kInstrSize;
1688 } 1694 }
1689 } 1695 }
1690 } 1696 }
1691 1697
1692 #undef __ 1698 #undef __
1693 1699
1694 } // namespace compiler 1700 } // namespace compiler
1695 } // namespace internal 1701 } // namespace internal
1696 } // namespace v8 1702 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698