| OLD | NEW |
| 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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 | 761 |
| 762 const Operator* CommonOperatorBuilder::Guard(Type* type) { | 762 const Operator* CommonOperatorBuilder::Guard(Type* type) { |
| 763 return new (zone()) Operator1<Type*>( // -- | 763 return new (zone()) Operator1<Type*>( // -- |
| 764 IrOpcode::kGuard, Operator::kKontrol, // opcode | 764 IrOpcode::kGuard, Operator::kKontrol, // opcode |
| 765 "Guard", // name | 765 "Guard", // name |
| 766 1, 0, 1, 1, 0, 0, // counts | 766 1, 0, 1, 1, 0, 0, // counts |
| 767 type); // parameter | 767 type); // parameter |
| 768 } | 768 } |
| 769 | 769 |
| 770 | 770 |
| 771 const Operator* CommonOperatorBuilder::EffectSet(int arguments) { | |
| 772 DCHECK(arguments > 1); // Disallow empty/singleton sets. | |
| 773 return new (zone()) Operator( // -- | |
| 774 IrOpcode::kEffectSet, Operator::kPure, // opcode | |
| 775 "EffectSet", // name | |
| 776 0, arguments, 0, 0, 1, 0); // counts | |
| 777 } | |
| 778 | |
| 779 | |
| 780 const Operator* CommonOperatorBuilder::StateValues(int arguments) { | 771 const Operator* CommonOperatorBuilder::StateValues(int arguments) { |
| 781 switch (arguments) { | 772 switch (arguments) { |
| 782 #define CACHED_STATE_VALUES(arguments) \ | 773 #define CACHED_STATE_VALUES(arguments) \ |
| 783 case arguments: \ | 774 case arguments: \ |
| 784 return &cache_.kStateValues##arguments##Operator; | 775 return &cache_.kStateValues##arguments##Operator; |
| 785 CACHED_STATE_VALUES_LIST(CACHED_STATE_VALUES) | 776 CACHED_STATE_VALUES_LIST(CACHED_STATE_VALUES) |
| 786 #undef CACHED_STATE_VALUES | 777 #undef CACHED_STATE_VALUES |
| 787 default: | 778 default: |
| 788 break; | 779 break; |
| 789 } | 780 } |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 CommonOperatorBuilder::CreateFrameStateFunctionInfo( | 895 CommonOperatorBuilder::CreateFrameStateFunctionInfo( |
| 905 FrameStateType type, int parameter_count, int local_count, | 896 FrameStateType type, int parameter_count, int local_count, |
| 906 Handle<SharedFunctionInfo> shared_info) { | 897 Handle<SharedFunctionInfo> shared_info) { |
| 907 return new (zone()->New(sizeof(FrameStateFunctionInfo))) | 898 return new (zone()->New(sizeof(FrameStateFunctionInfo))) |
| 908 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); | 899 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); |
| 909 } | 900 } |
| 910 | 901 |
| 911 } // namespace compiler | 902 } // namespace compiler |
| 912 } // namespace internal | 903 } // namespace internal |
| 913 } // namespace v8 | 904 } // namespace v8 |
| OLD | NEW |