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

Side by Side Diff: src/compiler/mips64/instruction-selector-mips64.cc

Issue 2587763003: [turbofan] Pass Runtime::FunctionId to TrapIf and TrapUnless isel methods. (Closed)
Patch Set: Fix typos 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
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 2265 matching lines...) Expand 10 before | Expand all | Expand 10 after
2276 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 2276 kNotEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1));
2277 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 2277 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
2278 } 2278 }
2279 2279
2280 void InstructionSelector::VisitDeoptimizeUnless(Node* node) { 2280 void InstructionSelector::VisitDeoptimizeUnless(Node* node) {
2281 FlagsContinuation cont = FlagsContinuation::ForDeoptimize( 2281 FlagsContinuation cont = FlagsContinuation::ForDeoptimize(
2282 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1)); 2282 kEqual, DeoptimizeReasonOf(node->op()), node->InputAt(1));
2283 VisitWordCompareZero(this, node, node->InputAt(0), &cont); 2283 VisitWordCompareZero(this, node, node->InputAt(0), &cont);
2284 } 2284 }
2285 2285
2286 void InstructionSelector::VisitTrapIf(Node* node) { UNREACHABLE(); } 2286 void InstructionSelector::VisitTrapIf(Node* node, Runtime::FunctionId func_id) {
2287 UNREACHABLE();
2288 }
2287 2289
2288 void InstructionSelector::VisitTrapUnless(Node* node) { UNREACHABLE(); } 2290 void InstructionSelector::VisitTrapUnless(Node* node,
2291 Runtime::FunctionId func_id) {
2292 UNREACHABLE();
2293 }
2289 2294
2290 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) { 2295 void InstructionSelector::VisitSwitch(Node* node, const SwitchInfo& sw) {
2291 Mips64OperandGenerator g(this); 2296 Mips64OperandGenerator g(this);
2292 InstructionOperand value_operand = g.UseRegister(node->InputAt(0)); 2297 InstructionOperand value_operand = g.UseRegister(node->InputAt(0));
2293 2298
2294 // Emit either ArchTableSwitch or ArchLookupSwitch. 2299 // Emit either ArchTableSwitch or ArchLookupSwitch.
2295 size_t table_space_cost = 10 + 2 * sw.value_range; 2300 size_t table_space_cost = 10 + 2 * sw.value_range;
2296 size_t table_time_cost = 3; 2301 size_t table_time_cost = 3;
2297 size_t lookup_space_cost = 2 + 2 * sw.case_count; 2302 size_t lookup_space_cost = 2 + 2 * sw.case_count;
2298 size_t lookup_time_cost = sw.case_count; 2303 size_t lookup_time_cost = sw.case_count;
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
2606 } else { 2611 } else {
2607 DCHECK(kArchVariant == kMips64r2); 2612 DCHECK(kArchVariant == kMips64r2);
2608 return MachineOperatorBuilder::AlignmentRequirements:: 2613 return MachineOperatorBuilder::AlignmentRequirements::
2609 NoUnalignedAccessSupport(); 2614 NoUnalignedAccessSupport();
2610 } 2615 }
2611 } 2616 }
2612 2617
2613 } // namespace compiler 2618 } // namespace compiler
2614 } // namespace internal 2619 } // namespace internal
2615 } // namespace v8 2620 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | src/compiler/ppc/instruction-selector-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698