OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ | 5 #ifndef RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ |
6 #define RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ | 6 #define RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 #include "vm/ast.h" | 9 #include "vm/ast.h" |
10 #include "vm/growable_array.h" | 10 #include "vm/growable_array.h" |
(...skipping 3929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3940 DISALLOW_COPY_AND_ASSIGN(BooleanNegateInstr); | 3940 DISALLOW_COPY_AND_ASSIGN(BooleanNegateInstr); |
3941 }; | 3941 }; |
3942 | 3942 |
3943 | 3943 |
3944 class InstanceOfInstr : public TemplateDefinition<2, Throws> { | 3944 class InstanceOfInstr : public TemplateDefinition<2, Throws> { |
3945 public: | 3945 public: |
3946 InstanceOfInstr(TokenPosition token_pos, | 3946 InstanceOfInstr(TokenPosition token_pos, |
3947 Value* value, | 3947 Value* value, |
3948 Value* instantiator_type_arguments, | 3948 Value* instantiator_type_arguments, |
3949 const AbstractType& type, | 3949 const AbstractType& type, |
3950 bool negate_result, | |
3951 intptr_t deopt_id) | 3950 intptr_t deopt_id) |
3952 : TemplateDefinition(deopt_id), | 3951 : TemplateDefinition(deopt_id), token_pos_(token_pos), type_(type) { |
3953 token_pos_(token_pos), | |
3954 type_(type), | |
3955 negate_result_(negate_result) { | |
3956 ASSERT(!type.IsNull()); | 3952 ASSERT(!type.IsNull()); |
3957 SetInputAt(0, value); | 3953 SetInputAt(0, value); |
3958 SetInputAt(1, instantiator_type_arguments); | 3954 SetInputAt(1, instantiator_type_arguments); |
3959 } | 3955 } |
3960 | 3956 |
3961 DECLARE_INSTRUCTION(InstanceOf) | 3957 DECLARE_INSTRUCTION(InstanceOf) |
3962 virtual CompileType ComputeType() const; | 3958 virtual CompileType ComputeType() const; |
3963 | 3959 |
3964 Value* value() const { return inputs_[0]; } | 3960 Value* value() const { return inputs_[0]; } |
3965 Value* instantiator_type_arguments() const { return inputs_[1]; } | 3961 Value* instantiator_type_arguments() const { return inputs_[1]; } |
3966 | 3962 |
3967 bool negate_result() const { return negate_result_; } | |
3968 const AbstractType& type() const { return type_; } | 3963 const AbstractType& type() const { return type_; } |
3969 virtual TokenPosition token_pos() const { return token_pos_; } | 3964 virtual TokenPosition token_pos() const { return token_pos_; } |
3970 | 3965 |
3971 virtual bool CanDeoptimize() const { return true; } | 3966 virtual bool CanDeoptimize() const { return true; } |
3972 | 3967 |
3973 virtual EffectSet Effects() const { return EffectSet::None(); } | 3968 virtual EffectSet Effects() const { return EffectSet::None(); } |
3974 | 3969 |
3975 PRINT_OPERANDS_TO_SUPPORT | 3970 PRINT_OPERANDS_TO_SUPPORT |
3976 | 3971 |
3977 private: | 3972 private: |
3978 const TokenPosition token_pos_; | 3973 const TokenPosition token_pos_; |
3979 Value* value_; | 3974 Value* value_; |
3980 Value* type_arguments_; | 3975 Value* type_arguments_; |
3981 const AbstractType& type_; | 3976 const AbstractType& type_; |
3982 const bool negate_result_; | |
3983 | 3977 |
3984 DISALLOW_COPY_AND_ASSIGN(InstanceOfInstr); | 3978 DISALLOW_COPY_AND_ASSIGN(InstanceOfInstr); |
3985 }; | 3979 }; |
3986 | 3980 |
3987 | 3981 |
3988 class AllocateObjectInstr : public TemplateDefinition<0, NoThrow> { | 3982 class AllocateObjectInstr : public TemplateDefinition<0, NoThrow> { |
3989 public: | 3983 public: |
3990 AllocateObjectInstr(TokenPosition token_pos, | 3984 AllocateObjectInstr(TokenPosition token_pos, |
3991 const Class& cls, | 3985 const Class& cls, |
3992 ZoneGrowableArray<PushArgumentInstr*>* arguments) | 3986 ZoneGrowableArray<PushArgumentInstr*>* arguments) |
(...skipping 4041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8034 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8028 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
8035 UNIMPLEMENTED(); \ | 8029 UNIMPLEMENTED(); \ |
8036 return NULL; \ | 8030 return NULL; \ |
8037 } \ | 8031 } \ |
8038 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8032 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
8039 | 8033 |
8040 | 8034 |
8041 } // namespace dart | 8035 } // namespace dart |
8042 | 8036 |
8043 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ | 8037 #endif // RUNTIME_VM_INTERMEDIATE_LANGUAGE_H_ |
OLD | NEW |