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

Side by Side Diff: src/compiler/mips64/instruction-selector-mips64.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/mips64/code-generator-mips64.cc ('k') | src/compiler/opcodes.h » ('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 2307 matching lines...) Expand 10 before | Expand all | Expand 10 after
2318 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 2318 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1));
2319 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 2319 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
2320 } 2320 }
2321 2321
2322 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { 2322 void InstructionSelector::VisitDeoptimizeUnless(Node* node) {
2323 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( 2323 FlagsContinuation cont = FlagsContinuation::ForDeoptimize(
2324 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 2324 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1));
2325 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 2325 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
2326 } 2326 }
2327 2327
2328 void InstructionSelector::VisitTrapIf(Node* node) { UNREACHABLE(); }
2329
2330 void InstructionSelector::VisitTrapUnless(Node* node) { UNREACHABLE(); }
2331
2328 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { 2332 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) {
2329 Mips64OperandGenerator g(this); 2333 Mips64OperandGenerator g(this);
2330 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); 2334 InstructionOperand value_operand = g.UseRegister(node->InputAt(0));
2331 2335
2332 // Emit either ArchTableSwitch or ArchLookupSwitch. 2336 // Emit either ArchTableSwitch or ArchLookupSwitch.
2333 size_t table_space_cost = 10 + 2 * sw.value_range; 2337 size_t table_space_cost = 10 + 2 * sw.value_range;
2334 size_t table_time_cost = 3; 2338 size_t table_time_cost = 3;
2335 size_t lookup_space_cost = 2 + 2 * sw.case_count; 2339 size_t lookup_space_cost = 2 + 2 * sw.case_count;
2336 size_t lookup_time_cost = sw.case_count; 2340 size_t lookup_time_cost = sw.case_count;
2337 if (sw.case_count > 0 && 2341 if (sw.case_count > 0 &&
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
2644 } else { 2648 } else {
2645 DCHECK(kArchVariant == kMips64r2); 2649 DCHECK(kArchVariant == kMips64r2);
2646 return MachineOperatorBuilder::AlignmentRequirements:: 2650 return MachineOperatorBuilder::AlignmentRequirements::
2647 NoUnalignedAccessSupport(); 2651 NoUnalignedAccessSupport();
2648 } 2652 }
2649 } 2653 }
2650 2654
2651 } // namespace compiler 2655 } // namespace compiler
2652 } // namespace internal 2656 } // namespace internal
2653 } // namespace v8 2657 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips64/code-generator-mips64.cc ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698