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

Side by Side Diff: src/compiler/ia32/instruction-selector-ia32.cc

Issue 2587763003: [turbofan] Pass Runtime::FunctionId to TrapIf and TrapUnless isel methods. (Closed)
Patch Set: Fix typos Created 4 years 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/arm64/instruction-selector-arm64.cc ('k') | src/compiler/instruction-selector.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 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/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/compiler/instruction-selector-impl.h" 6 #include "src/compiler/instruction-selector-impl.h"
7 #include "src/compiler/node-matchers.h" 7 #include "src/compiler/node-matchers.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 1500 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1));
1501 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 1501 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
1502 } 1502 }
1503 1503
1504 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { 1504 void InstructionSelector::VisitDeoptimizeUnless(Node* node) {
1505 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( 1505 FlagsContinuation cont = FlagsContinuation::ForDeoptimize(
1506 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 1506 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1));
1507 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 1507 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
1508 } 1508 }
1509 1509
1510 void InstructionSelector::VisitTrapIf(Node* node) { 1510 void InstructionSelector::VisitTrapIf(Node* node, Runtime::FunctionId func_id) {
1511 FlagsContinuation cont = FlagsContinuation::ForTrap( 1511 FlagsContinuation cont =
1512 kNotEqual, OpParameter<Runtime::FunctionId>(node->op()), 1512 FlagsContinuation::ForTrap(kNotEqual, func_id, node->InputAt(1));
1513 node->InputAt(1));
1514 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 1513 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
1515 } 1514 }
1516 1515
1517 void InstructionSelector::VisitTrapUnless(Node* node) { 1516 void InstructionSelector::VisitTrapUnless(Node* node,
1518 FlagsContinuation cont = FlagsContinuation::ForTrap( 1517 Runtime::FunctionId func_id) {
1519 kEqual, OpParameter<Runtime::FunctionId>(node->op()), node->InputAt(1)); 1518 FlagsContinuation cont =
1519 FlagsContinuation::ForTrap(kEqual, func_id, node->InputAt(1));
1520 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 1520 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
1521 } 1521 }
1522 1522
1523 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { 1523 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) {
1524 IA32OperandGenerator g(this); 1524 IA32OperandGenerator g(this);
1525 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); 1525 InstructionOperand value_operand = g.UseRegister(node->InputAt(0));
1526 1526
1527 // Emit either ArchTableSwitch or ArchLookupSwitch. 1527 // Emit either ArchTableSwitch or ArchLookupSwitch.
1528 size_t table_space_cost = 4 + sw.value_range; 1528 size_t table_space_cost = 4 + sw.value_range;
1529 size_t table_time_cost = 3; 1529 size_t table_time_cost = 3;
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1766 // static 1766 // static
1767 MachineOperatorBuilder::AlignmentRequirements 1767 MachineOperatorBuilder::AlignmentRequirements
1768 InstructionSelector::AlignmentRequirements() { 1768 InstructionSelector::AlignmentRequirements() {
1769 return MachineOperatorBuilder::AlignmentRequirements:: 1769 return MachineOperatorBuilder::AlignmentRequirements::
1770 FullUnalignedAccessSupport(); 1770 FullUnalignedAccessSupport();
1771 } 1771 }
1772 1772
1773 } // namespace compiler 1773 } // namespace compiler
1774 } // namespace internal 1774 } // namespace internal
1775 } // namespace v8 1775 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm64/instruction-selector-arm64.cc ('k') | src/compiler/instruction-selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698