| 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 VM_INTERMEDIATE_LANGUAGE_H_ | 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ |
| 6 #define VM_INTERMEDIATE_LANGUAGE_H_ | 6 #define 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 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 M(BinaryMintOp) \ | 740 M(BinaryMintOp) \ |
| 741 M(ShiftMintOp) \ | 741 M(ShiftMintOp) \ |
| 742 M(UnaryMintOp) \ | 742 M(UnaryMintOp) \ |
| 743 M(CheckArrayBound) \ | 743 M(CheckArrayBound) \ |
| 744 M(Constraint) \ | 744 M(Constraint) \ |
| 745 M(StringToCharCode) \ | 745 M(StringToCharCode) \ |
| 746 M(StringFromCharCode) \ | 746 M(StringFromCharCode) \ |
| 747 M(StringInterpolate) \ | 747 M(StringInterpolate) \ |
| 748 M(InvokeMathCFunction) \ | 748 M(InvokeMathCFunction) \ |
| 749 M(MergedMath) \ | 749 M(MergedMath) \ |
| 750 M(GuardField) \ | 750 M(GuardFieldClass) \ |
| 751 M(GuardFieldLength) \ |
| 751 M(IfThenElse) \ | 752 M(IfThenElse) \ |
| 752 M(BinaryFloat32x4Op) \ | 753 M(BinaryFloat32x4Op) \ |
| 753 M(Simd32x4Shuffle) \ | 754 M(Simd32x4Shuffle) \ |
| 754 M(Simd32x4ShuffleMix) \ | 755 M(Simd32x4ShuffleMix) \ |
| 755 M(Simd32x4GetSignMask) \ | 756 M(Simd32x4GetSignMask) \ |
| 756 M(Float32x4Constructor) \ | 757 M(Float32x4Constructor) \ |
| 757 M(Float32x4Zero) \ | 758 M(Float32x4Zero) \ |
| 758 M(Float32x4Splat) \ | 759 M(Float32x4Splat) \ |
| 759 M(Float32x4Comparison) \ | 760 M(Float32x4Comparison) \ |
| 760 M(Float32x4MinMax) \ | 761 M(Float32x4MinMax) \ |
| (...skipping 3047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3808 intptr_t deopt_id) | 3809 intptr_t deopt_id) |
| 3809 : field_(field) { | 3810 : field_(field) { |
| 3810 deopt_id_ = deopt_id; | 3811 deopt_id_ = deopt_id; |
| 3811 SetInputAt(0, value); | 3812 SetInputAt(0, value); |
| 3812 } | 3813 } |
| 3813 | 3814 |
| 3814 Value* value() const { return inputs_[0]; } | 3815 Value* value() const { return inputs_[0]; } |
| 3815 | 3816 |
| 3816 const Field& field() const { return field_; } | 3817 const Field& field() const { return field_; } |
| 3817 | 3818 |
| 3818 DECLARE_INSTRUCTION(GuardField) | |
| 3819 | |
| 3820 virtual intptr_t ArgumentCount() const { return 0; } | 3819 virtual intptr_t ArgumentCount() const { return 0; } |
| 3821 | 3820 |
| 3822 virtual bool CanDeoptimize() const { return true; } | 3821 virtual bool CanDeoptimize() const { return true; } |
| 3823 | 3822 |
| 3824 virtual Instruction* Canonicalize(FlowGraph* flow_graph); | |
| 3825 | |
| 3826 virtual void PrintOperandsTo(BufferFormatter* f) const; | |
| 3827 | |
| 3828 virtual bool AllowsCSE() const { return true; } | 3823 virtual bool AllowsCSE() const { return true; } |
| 3829 virtual EffectSet Effects() const { return EffectSet::None(); } | 3824 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 3830 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 3825 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 3831 virtual bool AttributesEqual(Instruction* other) const; | |
| 3832 | 3826 |
| 3833 virtual bool MayThrow() const { return false; } | 3827 virtual bool MayThrow() const { return false; } |
| 3834 | 3828 |
| 3829 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 3830 |
| 3835 private: | 3831 private: |
| 3836 const Field& field_; | 3832 const Field& field_; |
| 3837 | 3833 |
| 3838 DISALLOW_COPY_AND_ASSIGN(GuardFieldInstr); | 3834 DISALLOW_COPY_AND_ASSIGN(GuardFieldInstr); |
| 3839 }; | 3835 }; |
| 3840 | 3836 |
| 3841 | 3837 |
| 3838 class GuardFieldClassInstr : public GuardFieldInstr { |
| 3839 public: |
| 3840 GuardFieldClassInstr(Value* value, |
| 3841 const Field& field, |
| 3842 intptr_t deopt_id) |
| 3843 : GuardFieldInstr(value, field, deopt_id) { } |
| 3844 |
| 3845 DECLARE_INSTRUCTION(GuardFieldClass) |
| 3846 |
| 3847 virtual Instruction* Canonicalize(FlowGraph* flow_graph); |
| 3848 |
| 3849 virtual bool AttributesEqual(Instruction* other) const; |
| 3850 |
| 3851 private: |
| 3852 DISALLOW_COPY_AND_ASSIGN(GuardFieldClassInstr); |
| 3853 }; |
| 3854 |
| 3855 |
| 3856 class GuardFieldLengthInstr : public GuardFieldInstr { |
| 3857 public: |
| 3858 GuardFieldLengthInstr(Value* value, |
| 3859 const Field& field, |
| 3860 intptr_t deopt_id) |
| 3861 : GuardFieldInstr(value, field, deopt_id) { } |
| 3862 |
| 3863 DECLARE_INSTRUCTION(GuardFieldLength) |
| 3864 |
| 3865 virtual Instruction* Canonicalize(FlowGraph* flow_graph); |
| 3866 |
| 3867 virtual bool AttributesEqual(Instruction* other) const; |
| 3868 |
| 3869 private: |
| 3870 DISALLOW_COPY_AND_ASSIGN(GuardFieldLengthInstr); |
| 3871 }; |
| 3872 |
| 3873 |
| 3842 class LoadStaticFieldInstr : public TemplateDefinition<1> { | 3874 class LoadStaticFieldInstr : public TemplateDefinition<1> { |
| 3843 public: | 3875 public: |
| 3844 explicit LoadStaticFieldInstr(Value* field_value) { | 3876 explicit LoadStaticFieldInstr(Value* field_value) { |
| 3845 ASSERT(field_value->BindsToConstant()); | 3877 ASSERT(field_value->BindsToConstant()); |
| 3846 SetInputAt(0, field_value); | 3878 SetInputAt(0, field_value); |
| 3847 } | 3879 } |
| 3848 | 3880 |
| 3849 DECLARE_INSTRUCTION(LoadStaticField) | 3881 DECLARE_INSTRUCTION(LoadStaticField) |
| 3850 virtual CompileType ComputeType() const; | 3882 virtual CompileType ComputeType() const; |
| 3851 | 3883 |
| (...skipping 4096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7948 ForwardInstructionIterator* current_iterator_; | 7980 ForwardInstructionIterator* current_iterator_; |
| 7949 | 7981 |
| 7950 private: | 7982 private: |
| 7951 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 7983 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 7952 }; | 7984 }; |
| 7953 | 7985 |
| 7954 | 7986 |
| 7955 } // namespace dart | 7987 } // namespace dart |
| 7956 | 7988 |
| 7957 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 7989 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |