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

Side by Side Diff: src/compiler/mips/instruction-selector-mips.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/mips/code-generator-mips.cc ('k') | src/compiler/mips64/code-generator-mips64.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/base/bits.h" 6 #include "src/base/bits.h"
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 10
(...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1640 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 1640 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1));
1641 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 1641 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
1642 } 1642 }
1643 1643
1644 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { 1644 void InstructionSelector::VisitDeoptimizeUnless(Node* node) {
1645 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( 1645 FlagsContinuation cont = FlagsContinuation::ForDeoptimize(
1646 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 1646 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1));
1647 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 1647 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
1648 } 1648 }
1649 1649
1650 void InstructionSelector::VisitTrapIf(Node* node) { UNREACHABLE(); }
1651
1652 void InstructionSelector::VisitTrapUnless(Node* node) { UNREACHABLE(); }
1653
1650 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { 1654 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) {
1651 MipsOperandGenerator g(this); 1655 MipsOperandGenerator g(this);
1652 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); 1656 InstructionOperand value_operand = g.UseRegister(node->InputAt(0));
1653 1657
1654 // Emit either ArchTableSwitch or ArchLookupSwitch. 1658 // Emit either ArchTableSwitch or ArchLookupSwitch.
1655 size_t table_space_cost = 9 + sw.value_range; 1659 size_t table_space_cost = 9 + sw.value_range;
1656 size_t table_time_cost = 3; 1660 size_t table_time_cost = 3;
1657 size_t lookup_space_cost = 2 + 2 * sw.case_count; 1661 size_t lookup_space_cost = 2 + 2 * sw.case_count;
1658 size_t lookup_time_cost = sw.case_count; 1662 size_t lookup_time_cost = sw.case_count;
1659 if (sw.case_count > 0 && 1663 if (sw.case_count > 0 &&
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1921 DCHECK(IsMipsArchVariant(kLoongson) || IsMipsArchVariant(kMips32r1) || 1925 DCHECK(IsMipsArchVariant(kLoongson) || IsMipsArchVariant(kMips32r1) ||
1922 IsMipsArchVariant(kMips32r2)); 1926 IsMipsArchVariant(kMips32r2));
1923 return MachineOperatorBuilder::AlignmentRequirements:: 1927 return MachineOperatorBuilder::AlignmentRequirements::
1924 NoUnalignedAccessSupport(); 1928 NoUnalignedAccessSupport();
1925 } 1929 }
1926 } 1930 }
1927 1931
1928 } // namespace compiler 1932 } // namespace compiler
1929 } // namespace internal 1933 } // namespace internal
1930 } // namespace v8 1934 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/code-generator-mips.cc ('k') | src/compiler/mips64/code-generator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698