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

Side by Side Diff: src/compiler/common-operator.cc

Issue 1460583003: [turbofan] Remove case_count >= 3 limit for switch. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | src/compiler/instruction-selector.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/compiler/common-operator.h" 5 #include "src/compiler/common-operator.h"
6 6
7 #include "src/assembler.h" 7 #include "src/assembler.h"
8 #include "src/base/lazy-instance.h" 8 #include "src/base/lazy-instance.h"
9 #include "src/compiler/linkage.h" 9 #include "src/compiler/linkage.h"
10 #include "src/compiler/opcodes.h" 10 #include "src/compiler/opcodes.h"
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 return &cache_.kIfExceptionCOperator; 455 return &cache_.kIfExceptionCOperator;
456 case IfExceptionHint::kLocallyUncaught: 456 case IfExceptionHint::kLocallyUncaught:
457 return &cache_.kIfExceptionUOperator; 457 return &cache_.kIfExceptionUOperator;
458 } 458 }
459 UNREACHABLE(); 459 UNREACHABLE();
460 return nullptr; 460 return nullptr;
461 } 461 }
462 462
463 463
464 const Operator* CommonOperatorBuilder::Switch(size_t control_output_count) { 464 const Operator* CommonOperatorBuilder::Switch(size_t control_output_count) {
465 DCHECK_GE(control_output_count, 3u); // Disallow trivial switches.
466 return new (zone()) Operator( // -- 465 return new (zone()) Operator( // --
467 IrOpcode::kSwitch, Operator::kKontrol, // opcode 466 IrOpcode::kSwitch, Operator::kKontrol, // opcode
468 "Switch", // name 467 "Switch", // name
469 1, 0, 1, 0, 0, control_output_count); // counts 468 1, 0, 1, 0, 0, control_output_count); // counts
470 } 469 }
471 470
472 471
473 const Operator* CommonOperatorBuilder::IfValue(int32_t index) { 472 const Operator* CommonOperatorBuilder::IfValue(int32_t index) {
474 return new (zone()) Operator1<int32_t>( // -- 473 return new (zone()) Operator1<int32_t>( // --
475 IrOpcode::kIfValue, Operator::kKontrol, // opcode 474 IrOpcode::kIfValue, Operator::kKontrol, // opcode
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 Handle<SharedFunctionInfo> shared_info, 814 Handle<SharedFunctionInfo> shared_info,
816 ContextCallingMode context_calling_mode) { 815 ContextCallingMode context_calling_mode) {
817 return new (zone()->New(sizeof(FrameStateFunctionInfo))) 816 return new (zone()->New(sizeof(FrameStateFunctionInfo)))
818 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info, 817 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info,
819 context_calling_mode); 818 context_calling_mode);
820 } 819 }
821 820
822 } // namespace compiler 821 } // namespace compiler
823 } // namespace internal 822 } // namespace internal
824 } // namespace v8 823 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/instruction-selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698