| 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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 M(BooleanNegate) \ | 708 M(BooleanNegate) \ |
| 709 M(InstanceOf) \ | 709 M(InstanceOf) \ |
| 710 M(CreateArray) \ | 710 M(CreateArray) \ |
| 711 M(AllocateObject) \ | 711 M(AllocateObject) \ |
| 712 M(LoadField) \ | 712 M(LoadField) \ |
| 713 M(LoadUntagged) \ | 713 M(LoadUntagged) \ |
| 714 M(LoadClassId) \ | 714 M(LoadClassId) \ |
| 715 M(InstantiateType) \ | 715 M(InstantiateType) \ |
| 716 M(InstantiateTypeArguments) \ | 716 M(InstantiateTypeArguments) \ |
| 717 M(AllocateContext) \ | 717 M(AllocateContext) \ |
| 718 M(AllocateUninitializedContext) \ |
| 718 M(CloneContext) \ | 719 M(CloneContext) \ |
| 719 M(BinarySmiOp) \ | 720 M(BinarySmiOp) \ |
| 720 M(UnarySmiOp) \ | 721 M(UnarySmiOp) \ |
| 721 M(UnaryDoubleOp) \ | 722 M(UnaryDoubleOp) \ |
| 722 M(CheckStackOverflow) \ | 723 M(CheckStackOverflow) \ |
| 723 M(SmiToDouble) \ | 724 M(SmiToDouble) \ |
| 724 M(DoubleToInteger) \ | 725 M(DoubleToInteger) \ |
| 725 M(DoubleToSmi) \ | 726 M(DoubleToSmi) \ |
| 726 M(DoubleToDouble) \ | 727 M(DoubleToDouble) \ |
| 727 M(DoubleToFloat) \ | 728 M(DoubleToFloat) \ |
| (...skipping 4230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4958 virtual bool MayThrow() const { return false; } | 4959 virtual bool MayThrow() const { return false; } |
| 4959 | 4960 |
| 4960 private: | 4961 private: |
| 4961 const intptr_t token_pos_; | 4962 const intptr_t token_pos_; |
| 4962 const intptr_t num_context_variables_; | 4963 const intptr_t num_context_variables_; |
| 4963 | 4964 |
| 4964 DISALLOW_COPY_AND_ASSIGN(AllocateContextInstr); | 4965 DISALLOW_COPY_AND_ASSIGN(AllocateContextInstr); |
| 4965 }; | 4966 }; |
| 4966 | 4967 |
| 4967 | 4968 |
| 4969 class AllocateUninitializedContextInstr : public TemplateDefinition<0> { |
| 4970 public: |
| 4971 AllocateUninitializedContextInstr(intptr_t token_pos, |
| 4972 intptr_t num_context_variables) |
| 4973 : token_pos_(token_pos), |
| 4974 num_context_variables_(num_context_variables) {} |
| 4975 |
| 4976 DECLARE_INSTRUCTION(AllocateUninitializedContext) |
| 4977 virtual CompileType ComputeType() const; |
| 4978 |
| 4979 virtual intptr_t token_pos() const { return token_pos_; } |
| 4980 intptr_t num_context_variables() const { return num_context_variables_; } |
| 4981 |
| 4982 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 4983 |
| 4984 virtual bool CanDeoptimize() const { return false; } |
| 4985 |
| 4986 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 4987 |
| 4988 virtual bool MayThrow() const { return false; } |
| 4989 |
| 4990 private: |
| 4991 const intptr_t token_pos_; |
| 4992 const intptr_t num_context_variables_; |
| 4993 |
| 4994 DISALLOW_COPY_AND_ASSIGN(AllocateUninitializedContextInstr); |
| 4995 }; |
| 4996 |
| 4997 |
| 4968 class CloneContextInstr : public TemplateDefinition<1> { | 4998 class CloneContextInstr : public TemplateDefinition<1> { |
| 4969 public: | 4999 public: |
| 4970 CloneContextInstr(intptr_t token_pos, Value* context_value) | 5000 CloneContextInstr(intptr_t token_pos, Value* context_value) |
| 4971 : token_pos_(token_pos) { | 5001 : token_pos_(token_pos) { |
| 4972 SetInputAt(0, context_value); | 5002 SetInputAt(0, context_value); |
| 4973 } | 5003 } |
| 4974 | 5004 |
| 4975 virtual intptr_t token_pos() const { return token_pos_; } | 5005 virtual intptr_t token_pos() const { return token_pos_; } |
| 4976 Value* context_value() const { return inputs_[0]; } | 5006 Value* context_value() const { return inputs_[0]; } |
| 4977 | 5007 |
| (...skipping 3651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8629 ForwardInstructionIterator* current_iterator_; | 8659 ForwardInstructionIterator* current_iterator_; |
| 8630 | 8660 |
| 8631 private: | 8661 private: |
| 8632 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 8662 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 8633 }; | 8663 }; |
| 8634 | 8664 |
| 8635 | 8665 |
| 8636 } // namespace dart | 8666 } // namespace dart |
| 8637 | 8667 |
| 8638 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8668 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |