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

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

Issue 2681763002: X87: [turbofan] Pass Runtime::FunctionId to TrapIf and TrapUnless isel methods. (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | no next file » | 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 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 1583 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1));
1584 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 1584 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
1585 } 1585 }
1586 1586
1587 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { 1587 void InstructionSelector::VisitDeoptimizeUnless(Node* node) {
1588 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( 1588 FlagsContinuation cont = FlagsContinuation::ForDeoptimize(
1589 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 1589 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1));
1590 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 1590 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
1591 } 1591 }
1592 1592
1593 void InstructionSelector::VisitTrapIf(Node* node) { 1593 void InstructionSelector::VisitTrapIf(Node* node, Runtime::FunctionId func_id) {
1594 FlagsContinuation cont = FlagsContinuation::ForTrap( 1594 FlagsContinuation cont =
1595 kNotEqual, OpParameter<Runtime::FunctionId>(node->op()), 1595 FlagsContinuation::ForTrap(kNotEqual, func_id, node->InputAt(1));
1596 node->InputAt(1));
1597 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 1596 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
1598 } 1597 }
1599 1598
1600 void InstructionSelector::VisitTrapUnless(Node* node) { 1599 void InstructionSelector::VisitTrapUnless(Node* node,
1601 FlagsContinuation cont = FlagsContinuation::ForTrap( 1600 Runtime::FunctionId func_id) {
1602 kEqual, OpParameter<Runtime::FunctionId>(node->op()), node->InputAt(1)); 1601 FlagsContinuation cont =
1602 FlagsContinuation::ForTrap(kEqual, func_id, node->InputAt(1));
1603 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 1603 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
1604 } 1604 }
1605 1605
1606 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { 1606 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) {
1607 X87OperandGenerator g(this); 1607 X87OperandGenerator g(this);
1608 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); 1608 InstructionOperand value_operand = g.UseRegister(node->InputAt(0));
1609 1609
1610 // Emit either ArchTableSwitch or ArchLookupSwitch. 1610 // Emit either ArchTableSwitch or ArchLookupSwitch.
1611 size_t table_space_cost = 4 + sw.value_range; 1611 size_t table_space_cost = 4 + sw.value_range;
1612 size_t table_time_cost = 3; 1612 size_t table_time_cost = 3;
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
1842 // static 1842 // static
1843 MachineOperatorBuilder::AlignmentRequirements 1843 MachineOperatorBuilder::AlignmentRequirements
1844 InstructionSelector::AlignmentRequirements() { 1844 InstructionSelector::AlignmentRequirements() {
1845 return MachineOperatorBuilder::AlignmentRequirements:: 1845 return MachineOperatorBuilder::AlignmentRequirements::
1846 FullUnalignedAccessSupport(); 1846 FullUnalignedAccessSupport();
1847 } 1847 }
1848 1848
1849 } // namespace compiler 1849 } // namespace compiler
1850 } // namespace internal 1850 } // namespace internal
1851 } // namespace v8 1851 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698