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

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

Issue 2562393002: [wasm] Introduce the TrapIf and TrapUnless operators to generate trap code. (Closed)
Patch Set: Rename UseSourcePosition to IsSourcePositionUsed 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/x87/code-generator-x87.cc ('k') | src/external-reference-table.cc » ('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 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(); }
1551
1552 void InstructionSelector::VisitTrapUnless(Node* node) { UNREACHABLE(); }
1553
1550 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { 1554 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) {
1551 X87OperandGenerator g(this); 1555 X87OperandGenerator g(this);
1552 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); 1556 InstructionOperand value_operand = g.UseRegister(node->InputAt(0));
1553 1557
1554 // Emit either ArchTableSwitch or ArchLookupSwitch. 1558 // Emit either ArchTableSwitch or ArchLookupSwitch.
1555 size_t table_space_cost = 4 + sw.value_range; 1559 size_t table_space_cost = 4 + sw.value_range;
1556 size_t table_time_cost = 3; 1560 size_t table_time_cost = 3;
1557 size_t lookup_space_cost = 3 + 2 * sw.case_count; 1561 size_t lookup_space_cost = 3 + 2 * sw.case_count;
1558 size_t lookup_time_cost = sw.case_count; 1562 size_t lookup_time_cost = sw.case_count;
1559 if (sw.case_count > 4 && 1563 if (sw.case_count > 4 &&
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1786 // static 1790 // static
1787 MachineOperatorBuilder::AlignmentRequirements 1791 MachineOperatorBuilder::AlignmentRequirements
1788 InstructionSelector::AlignmentRequirements() { 1792 InstructionSelector::AlignmentRequirements() {
1789 return MachineOperatorBuilder::AlignmentRequirements:: 1793 return MachineOperatorBuilder::AlignmentRequirements::
1790 FullUnalignedAccessSupport(); 1794 FullUnalignedAccessSupport();
1791 } 1795 }
1792 1796
1793 } // namespace compiler 1797 } // namespace compiler
1794 } // namespace internal 1798 } // namespace internal
1795 } // namespace v8 1799 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x87/code-generator-x87.cc ('k') | src/external-reference-table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698