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

Side by Side Diff: src/compiler/x87/instruction-selector-x87.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/x64/instruction-selector-x64.cc ('k') | 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 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 1540 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1));
1541 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 1541 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
1542 } 1542 }
1543 1543
1544 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { 1544 void InstructionSelector::VisitDeoptimizeUnless(Node* node) {
1545 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( 1545 FlagsContinuation cont = FlagsContinuation::ForDeoptimize(
1546 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 1546 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1));
1547 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 1547 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
1548 } 1548 }
1549 1549
1550 void InstructionSelector::VisitTrapIf(Node* node) { UNREACHABLE(); } 1550 void InstructionSelector::VisitTrapIf(Node* node, Runtime::FunctionId func_id) {
1551 UNREACHABLE();
1552 }
1551 1553
1552 void InstructionSelector::VisitTrapUnless(Node* node) { UNREACHABLE(); } 1554 void InstructionSelector::VisitTrapUnless(Node* node,
1555 Runtime::FunctionId func_id) {
1556 UNREACHABLE();
1557 }
1553 1558
1554 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { 1559 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) {
1555 X87OperandGenerator g(this); 1560 X87OperandGenerator g(this);
1556 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); 1561 InstructionOperand value_operand = g.UseRegister(node->InputAt(0));
1557 1562
1558 // Emit either ArchTableSwitch or ArchLookupSwitch. 1563 // Emit either ArchTableSwitch or ArchLookupSwitch.
1559 size_t table_space_cost = 4 + sw.value_range; 1564 size_t table_space_cost = 4 + sw.value_range;
1560 size_t table_time_cost = 3; 1565 size_t table_time_cost = 3;
1561 size_t lookup_space_cost = 3 + 2 * sw.case_count; 1566 size_t lookup_space_cost = 3 + 2 * sw.case_count;
1562 size_t lookup_time_cost = sw.case_count; 1567 size_t lookup_time_cost = sw.case_count;
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 // static 1795 // static
1791 MachineOperatorBuilder::AlignmentRequirements 1796 MachineOperatorBuilder::AlignmentRequirements
1792 InstructionSelector::AlignmentRequirements() { 1797 InstructionSelector::AlignmentRequirements() {
1793 return MachineOperatorBuilder::AlignmentRequirements:: 1798 return MachineOperatorBuilder::AlignmentRequirements::
1794 FullUnalignedAccessSupport(); 1799 FullUnalignedAccessSupport();
1795 } 1800 }
1796 1801
1797 } // namespace compiler 1802 } // namespace compiler
1798 } // namespace internal 1803 } // namespace internal
1799 } // namespace v8 1804 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698