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

Side by Side Diff: src/compiler/ia32/instruction-selector-ia32.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/ia32/code-generator-ia32.cc ('k') | src/compiler/instruction.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 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1494 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 1494 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1));
1495 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 1495 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
1496 } 1496 }
1497 1497
1498 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { 1498 void InstructionSelector::VisitDeoptimizeUnless(Node* node) {
1499 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( 1499 FlagsContinuation cont = FlagsContinuation::ForDeoptimize(
1500 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 1500 kEqual, 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::VisitTrapIf(Node* node) { UNREACHABLE(); }
1505
1506 void InstructionSelector::VisitTrapUnless(Node* node) { UNREACHABLE(); }
1507
1504 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { 1508 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) {
1505 IA32OperandGenerator g(this); 1509 IA32OperandGenerator g(this);
1506 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); 1510 InstructionOperand value_operand = g.UseRegister(node->InputAt(0));
1507 1511
1508 // Emit either ArchTableSwitch or ArchLookupSwitch. 1512 // Emit either ArchTableSwitch or ArchLookupSwitch.
1509 size_t table_space_cost = 4 + sw.value_range; 1513 size_t table_space_cost = 4 + sw.value_range;
1510 size_t table_time_cost = 3; 1514 size_t table_time_cost = 3;
1511 size_t lookup_space_cost = 3 + 2 * sw.case_count; 1515 size_t lookup_space_cost = 3 + 2 * sw.case_count;
1512 size_t lookup_time_cost = sw.case_count; 1516 size_t lookup_time_cost = sw.case_count;
1513 if (sw.case_count > 4 && 1517 if (sw.case_count > 4 &&
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1747 // static 1751 // static
1748 MachineOperatorBuilder::AlignmentRequirements 1752 MachineOperatorBuilder::AlignmentRequirements
1749 InstructionSelector::AlignmentRequirements() { 1753 InstructionSelector::AlignmentRequirements() {
1750 return MachineOperatorBuilder::AlignmentRequirements:: 1754 return MachineOperatorBuilder::AlignmentRequirements::
1751 FullUnalignedAccessSupport(); 1755 FullUnalignedAccessSupport();
1752 } 1756 }
1753 1757
1754 } // namespace compiler 1758 } // namespace compiler
1755 } // namespace internal 1759 } // namespace internal
1756 } // namespace v8 1760 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ia32/code-generator-ia32.cc ('k') | src/compiler/instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698