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

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

Issue 2557283002: [turbofan] Add NewUnmappedArgumentsElements and NewRestParametersArguments. (Closed)
Patch Set: Fixes. 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/simplified-operator.h ('k') | src/compiler/type-cache.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/simplified-operator.h" 5 #include "src/compiler/simplified-operator.h"
6 6
7 #include "src/base/lazy-instance.h" 7 #include "src/base/lazy-instance.h"
8 #include "src/compiler/opcodes.h" 8 #include "src/compiler/opcodes.h"
9 #include "src/compiler/operator.h" 9 #include "src/compiler/operator.h"
10 #include "src/compiler/types.h" 10 #include "src/compiler/types.h"
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 op->opcode() == IrOpcode::kSpeculativeNumberShiftRightLogical || 324 op->opcode() == IrOpcode::kSpeculativeNumberShiftRightLogical ||
325 op->opcode() == IrOpcode::kSpeculativeNumberBitwiseAnd || 325 op->opcode() == IrOpcode::kSpeculativeNumberBitwiseAnd ||
326 op->opcode() == IrOpcode::kSpeculativeNumberBitwiseOr || 326 op->opcode() == IrOpcode::kSpeculativeNumberBitwiseOr ||
327 op->opcode() == IrOpcode::kSpeculativeNumberBitwiseXor || 327 op->opcode() == IrOpcode::kSpeculativeNumberBitwiseXor ||
328 op->opcode() == IrOpcode::kSpeculativeNumberEqual || 328 op->opcode() == IrOpcode::kSpeculativeNumberEqual ||
329 op->opcode() == IrOpcode::kSpeculativeNumberLessThan || 329 op->opcode() == IrOpcode::kSpeculativeNumberLessThan ||
330 op->opcode() == IrOpcode::kSpeculativeNumberLessThanOrEqual); 330 op->opcode() == IrOpcode::kSpeculativeNumberLessThanOrEqual);
331 return OpParameter<NumberOperationHint>(op); 331 return OpParameter<NumberOperationHint>(op);
332 } 332 }
333 333
334 int ParameterCountOf(const Operator* op) {
335 DCHECK(op->opcode() == IrOpcode::kNewUnmappedArgumentsElements ||
336 op->opcode() == IrOpcode::kNewRestParameterElements);
337 return OpParameter<int>(op);
338 }
339
334 PretenureFlag PretenureFlagOf(const Operator* op) { 340 PretenureFlag PretenureFlagOf(const Operator* op) {
335 DCHECK_EQ(IrOpcode::kAllocate, op->opcode()); 341 DCHECK_EQ(IrOpcode::kAllocate, op->opcode());
336 return OpParameter<PretenureFlag>(op); 342 return OpParameter<PretenureFlag>(op);
337 } 343 }
338 344
339 UnicodeEncoding UnicodeEncodingOf(const Operator* op) { 345 UnicodeEncoding UnicodeEncodingOf(const Operator* op) {
340 DCHECK(op->opcode() == IrOpcode::kStringFromCodePoint); 346 DCHECK(op->opcode() == IrOpcode::kStringFromCodePoint);
341 return OpParameter<UnicodeEncoding>(op); 347 return OpParameter<UnicodeEncoding>(op);
342 } 348 }
343 349
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 const Operator* SimplifiedOperatorBuilder::TransitionElementsKind( 736 const Operator* SimplifiedOperatorBuilder::TransitionElementsKind(
731 ElementsTransition transition) { 737 ElementsTransition transition) {
732 return new (zone()) Operator1<ElementsTransition>( // -- 738 return new (zone()) Operator1<ElementsTransition>( // --
733 IrOpcode::kTransitionElementsKind, // opcode 739 IrOpcode::kTransitionElementsKind, // opcode
734 Operator::kNoDeopt | Operator::kNoThrow, // flags 740 Operator::kNoDeopt | Operator::kNoThrow, // flags
735 "TransitionElementsKind", // name 741 "TransitionElementsKind", // name
736 3, 1, 1, 0, 1, 0, // counts 742 3, 1, 1, 0, 1, 0, // counts
737 transition); // parameter 743 transition); // parameter
738 } 744 }
739 745
746 const Operator* SimplifiedOperatorBuilder::NewUnmappedArgumentsElements(
747 int parameter_count) {
748 return new (zone()) Operator1<int>( // --
749 IrOpcode::kNewUnmappedArgumentsElements, // opcode
750 Operator::kEliminatable, // flags
751 "NewUnmappedArgumentsElements", // name
752 0, 1, 0, 1, 1, 0, // counts
753 parameter_count); // parameter
754 }
755
756 const Operator* SimplifiedOperatorBuilder::NewRestParameterElements(
757 int parameter_count) {
758 return new (zone()) Operator1<int>( // --
759 IrOpcode::kNewRestParameterElements, // opcode
760 Operator::kEliminatable, // flags
761 "NewRestParameterElements", // name
762 0, 1, 0, 1, 1, 0, // counts
763 parameter_count); // parameter
764 }
765
740 const Operator* SimplifiedOperatorBuilder::Allocate(PretenureFlag pretenure) { 766 const Operator* SimplifiedOperatorBuilder::Allocate(PretenureFlag pretenure) {
741 switch (pretenure) { 767 switch (pretenure) {
742 case NOT_TENURED: 768 case NOT_TENURED:
743 return &cache_.kAllocateNotTenuredOperator; 769 return &cache_.kAllocateNotTenuredOperator;
744 case TENURED: 770 case TENURED:
745 return &cache_.kAllocateTenuredOperator; 771 return &cache_.kAllocateTenuredOperator;
746 } 772 }
747 UNREACHABLE(); 773 UNREACHABLE();
748 return nullptr; 774 return nullptr;
749 } 775 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 Operator::kNoDeopt | Operator::kNoThrow | properties, \ 846 Operator::kNoDeopt | Operator::kNoThrow | properties, \
821 #Name, value_input_count, 1, control_input_count, \ 847 #Name, value_input_count, 1, control_input_count, \
822 output_count, 1, 0, access); \ 848 output_count, 1, 0, access); \
823 } 849 }
824 ACCESS_OP_LIST(ACCESS) 850 ACCESS_OP_LIST(ACCESS)
825 #undef ACCESS 851 #undef ACCESS
826 852
827 } // namespace compiler 853 } // namespace compiler
828 } // namespace internal 854 } // namespace internal
829 } // namespace v8 855 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator.h ('k') | src/compiler/type-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698