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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 break; | 753 break; |
754 } | 754 } |
755 // Uncached. | 755 // Uncached. |
756 return new (zone()) Operator( // -- | 756 return new (zone()) Operator( // -- |
757 IrOpcode::kEffectPhi, Operator::kPure, // opcode | 757 IrOpcode::kEffectPhi, Operator::kPure, // opcode |
758 "EffectPhi", // name | 758 "EffectPhi", // name |
759 0, effect_input_count, 1, 0, 1, 0); // counts | 759 0, effect_input_count, 1, 0, 1, 0); // counts |
760 } | 760 } |
761 | 761 |
762 | 762 |
763 const Operator* CommonOperatorBuilder::Guard(Type* type) { | |
764 return new (zone()) Operator1<Type*>( // -- | |
765 IrOpcode::kGuard, Operator::kKontrol, // opcode | |
766 "Guard", // name | |
767 1, 0, 1, 1, 0, 0, // counts | |
768 type); // parameter | |
769 } | |
770 | |
771 | |
772 const Operator* CommonOperatorBuilder::StateValues(int arguments) { | 763 const Operator* CommonOperatorBuilder::StateValues(int arguments) { |
773 switch (arguments) { | 764 switch (arguments) { |
774 #define CACHED_STATE_VALUES(arguments) \ | 765 #define CACHED_STATE_VALUES(arguments) \ |
775 case arguments: \ | 766 case arguments: \ |
776 return &cache_.kStateValues##arguments##Operator; | 767 return &cache_.kStateValues##arguments##Operator; |
777 CACHED_STATE_VALUES_LIST(CACHED_STATE_VALUES) | 768 CACHED_STATE_VALUES_LIST(CACHED_STATE_VALUES) |
778 #undef CACHED_STATE_VALUES | 769 #undef CACHED_STATE_VALUES |
779 default: | 770 default: |
780 break; | 771 break; |
781 } | 772 } |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 CommonOperatorBuilder::CreateFrameStateFunctionInfo( | 887 CommonOperatorBuilder::CreateFrameStateFunctionInfo( |
897 FrameStateType type, int parameter_count, int local_count, | 888 FrameStateType type, int parameter_count, int local_count, |
898 Handle<SharedFunctionInfo> shared_info) { | 889 Handle<SharedFunctionInfo> shared_info) { |
899 return new (zone()->New(sizeof(FrameStateFunctionInfo))) | 890 return new (zone()->New(sizeof(FrameStateFunctionInfo))) |
900 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); | 891 FrameStateFunctionInfo(type, parameter_count, local_count, shared_info); |
901 } | 892 } |
902 | 893 |
903 } // namespace compiler | 894 } // namespace compiler |
904 } // namespace internal | 895 } // namespace internal |
905 } // namespace v8 | 896 } // namespace v8 |
OLD | NEW |