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

Side by Side Diff: src/compiler/arm/instruction-selector-arm.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/arm/code-generator-arm.cc ('k') | src/compiler/arm64/code-generator-arm64.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 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 2017 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1));
2018 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 2018 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
2019 } 2019 }
2020 2020
2021 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { 2021 void InstructionSelector::VisitDeoptimizeUnless(Node* node) {
2022 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( 2022 FlagsContinuation cont = FlagsContinuation::ForDeoptimize(
2023 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 2023 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1));
2024 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 2024 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
2025 } 2025 }
2026 2026
2027 void InstructionSelector::VisitTrapIf(Node* node) { UNREACHABLE(); }
2028
2029 void InstructionSelector::VisitTrapUnless(Node* node) { UNREACHABLE(); }
2030
2027 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { 2031 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) {
2028 ArmOperandGenerator g(this); 2032 ArmOperandGenerator g(this);
2029 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); 2033 InstructionOperand value_operand = g.UseRegister(node->InputAt(0));
2030 2034
2031 // Emit either ArchTableSwitch or ArchLookupSwitch. 2035 // Emit either ArchTableSwitch or ArchLookupSwitch.
2032 size_t table_space_cost = 4 + sw.value_range; 2036 size_t table_space_cost = 4 + sw.value_range;
2033 size_t table_time_cost = 3; 2037 size_t table_time_cost = 3;
2034 size_t lookup_space_cost = 3 + 2 * sw.case_count; 2038 size_t lookup_space_cost = 3 + 2 * sw.case_count;
2035 size_t lookup_time_cost = sw.case_count; 2039 size_t lookup_time_cost = sw.case_count;
2036 if (sw.case_count > 0 && 2040 if (sw.case_count > 0 &&
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
2287 Vector<MachineType> req_aligned = Vector<MachineType>::New(2); 2291 Vector<MachineType> req_aligned = Vector<MachineType>::New(2);
2288 req_aligned[0] = MachineType::Float32(); 2292 req_aligned[0] = MachineType::Float32();
2289 req_aligned[1] = MachineType::Float64(); 2293 req_aligned[1] = MachineType::Float64();
2290 return MachineOperatorBuilder::AlignmentRequirements:: 2294 return MachineOperatorBuilder::AlignmentRequirements::
2291 SomeUnalignedAccessUnsupported(req_aligned, req_aligned); 2295 SomeUnalignedAccessUnsupported(req_aligned, req_aligned);
2292 } 2296 }
2293 2297
2294 } // namespace compiler 2298 } // namespace compiler
2295 } // namespace internal 2299 } // namespace internal
2296 } // namespace v8 2300 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/arm64/code-generator-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698