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

Side by Side Diff: src/compiler/arm64/instruction-selector-arm64.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/arm64/code-generator-arm64.cc ('k') | src/compiler/code-generator.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/compiler/instruction-selector-impl.h" 5 #include "src/compiler/instruction-selector-impl.h"
6 #include "src/compiler/node-matchers.h" 6 #include "src/compiler/node-matchers.h"
7 #include "src/compiler/node-properties.h" 7 #include "src/compiler/node-properties.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 2528 matching lines...) Expand 10 before | Expand all | Expand 10 after
2539 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 2539 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1));
2540 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 2540 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
2541 } 2541 }
2542 2542
2543 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { 2543 void InstructionSelector::VisitDeoptimizeUnless(Node* node) {
2544 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( 2544 FlagsContinuation cont = FlagsContinuation::ForDeoptimize(
2545 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 2545 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1));
2546 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 2546 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
2547 } 2547 }
2548 2548
2549 void InstructionSelector::VisitTrapIf(Node* node) { UNREACHABLE(); }
2550
2551 void InstructionSelector::VisitTrapUnless(Node* node) { UNREACHABLE(); }
2552
2549 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { 2553 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) {
2550 Arm64OperandGenerator g(this); 2554 Arm64OperandGenerator g(this);
2551 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); 2555 InstructionOperand value_operand = g.UseRegister(node->InputAt(0));
2552 2556
2553 // Emit either ArchTableSwitch or ArchLookupSwitch. 2557 // Emit either ArchTableSwitch or ArchLookupSwitch.
2554 size_t table_space_cost = 4 + sw.value_range; 2558 size_t table_space_cost = 4 + sw.value_range;
2555 size_t table_time_cost = 3; 2559 size_t table_time_cost = 3;
2556 size_t lookup_space_cost = 3 + 2 * sw.case_count; 2560 size_t lookup_space_cost = 3 + 2 * sw.case_count;
2557 size_t lookup_time_cost = sw.case_count; 2561 size_t lookup_time_cost = sw.case_count;
2558 if (sw.case_count > 0 && 2562 if (sw.case_count > 0 &&
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
2910 // static 2914 // static
2911 MachineOperatorBuilder::AlignmentRequirements 2915 MachineOperatorBuilder::AlignmentRequirements
2912 InstructionSelector::AlignmentRequirements() { 2916 InstructionSelector::AlignmentRequirements() {
2913 return MachineOperatorBuilder::AlignmentRequirements:: 2917 return MachineOperatorBuilder::AlignmentRequirements::
2914 FullUnalignedAccessSupport(); 2918 FullUnalignedAccessSupport();
2915 } 2919 }
2916 2920
2917 } // namespace compiler 2921 } // namespace compiler
2918 } // namespace internal 2922 } // namespace internal
2919 } // namespace v8 2923 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm64/code-generator-arm64.cc ('k') | src/compiler/code-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698