| 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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 M(DropTemps) \ | 699 M(DropTemps) \ |
| 700 M(StoreLocal) \ | 700 M(StoreLocal) \ |
| 701 M(StrictCompare) \ | 701 M(StrictCompare) \ |
| 702 M(EqualityCompare) \ | 702 M(EqualityCompare) \ |
| 703 M(RelationalOp) \ | 703 M(RelationalOp) \ |
| 704 M(NativeCall) \ | 704 M(NativeCall) \ |
| 705 M(DebugStepCheck) \ | 705 M(DebugStepCheck) \ |
| 706 M(LoadIndexed) \ | 706 M(LoadIndexed) \ |
| 707 M(StoreIndexed) \ | 707 M(StoreIndexed) \ |
| 708 M(StoreInstanceField) \ | 708 M(StoreInstanceField) \ |
| 709 M(InitStaticField) \ |
| 709 M(LoadStaticField) \ | 710 M(LoadStaticField) \ |
| 710 M(StoreStaticField) \ | 711 M(StoreStaticField) \ |
| 711 M(BooleanNegate) \ | 712 M(BooleanNegate) \ |
| 712 M(InstanceOf) \ | 713 M(InstanceOf) \ |
| 713 M(CreateArray) \ | 714 M(CreateArray) \ |
| 714 M(AllocateObject) \ | 715 M(AllocateObject) \ |
| 715 M(LoadField) \ | 716 M(LoadField) \ |
| 716 M(LoadUntagged) \ | 717 M(LoadUntagged) \ |
| 717 M(LoadClassId) \ | 718 M(LoadClassId) \ |
| 718 M(InstantiateType) \ | 719 M(InstantiateType) \ |
| (...skipping 3900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4619 virtual bool MayThrow() const { return false; } | 4620 virtual bool MayThrow() const { return false; } |
| 4620 | 4621 |
| 4621 private: | 4622 private: |
| 4622 const intptr_t token_pos_; | 4623 const intptr_t token_pos_; |
| 4623 const intptr_t num_context_variables_; | 4624 const intptr_t num_context_variables_; |
| 4624 | 4625 |
| 4625 DISALLOW_COPY_AND_ASSIGN(AllocateContextInstr); | 4626 DISALLOW_COPY_AND_ASSIGN(AllocateContextInstr); |
| 4626 }; | 4627 }; |
| 4627 | 4628 |
| 4628 | 4629 |
| 4630 class InitStaticFieldInstr : public TemplateInstruction<1> { |
| 4631 public: |
| 4632 InitStaticFieldInstr(Value* input, const Field& field) |
| 4633 : field_(field) { |
| 4634 SetInputAt(0, input); |
| 4635 } |
| 4636 |
| 4637 virtual intptr_t token_pos() const { return field_.token_pos(); } |
| 4638 const Field& field() const { return field_; } |
| 4639 |
| 4640 DECLARE_INSTRUCTION(InitStaticField) |
| 4641 |
| 4642 virtual intptr_t ArgumentCount() const { return 0; } |
| 4643 virtual bool CanDeoptimize() const { return true; } |
| 4644 virtual EffectSet Effects() const { return EffectSet::All(); } |
| 4645 virtual bool MayThrow() const { return true; } |
| 4646 virtual Instruction* Canonicalize(FlowGraph* flow_graph); |
| 4647 |
| 4648 private: |
| 4649 const Field& field_; |
| 4650 |
| 4651 DISALLOW_COPY_AND_ASSIGN(InitStaticFieldInstr); |
| 4652 }; |
| 4653 |
| 4654 |
| 4629 class AllocateUninitializedContextInstr : public TemplateDefinition<0> { | 4655 class AllocateUninitializedContextInstr : public TemplateDefinition<0> { |
| 4630 public: | 4656 public: |
| 4631 AllocateUninitializedContextInstr(intptr_t token_pos, | 4657 AllocateUninitializedContextInstr(intptr_t token_pos, |
| 4632 intptr_t num_context_variables) | 4658 intptr_t num_context_variables) |
| 4633 : token_pos_(token_pos), | 4659 : token_pos_(token_pos), |
| 4634 num_context_variables_(num_context_variables) {} | 4660 num_context_variables_(num_context_variables) {} |
| 4635 | 4661 |
| 4636 DECLARE_INSTRUCTION(AllocateUninitializedContext) | 4662 DECLARE_INSTRUCTION(AllocateUninitializedContext) |
| 4637 virtual CompileType ComputeType() const; | 4663 virtual CompileType ComputeType() const; |
| 4638 | 4664 |
| (...skipping 3730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8369 ForwardInstructionIterator* current_iterator_; | 8395 ForwardInstructionIterator* current_iterator_; |
| 8370 | 8396 |
| 8371 private: | 8397 private: |
| 8372 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 8398 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 8373 }; | 8399 }; |
| 8374 | 8400 |
| 8375 | 8401 |
| 8376 } // namespace dart | 8402 } // namespace dart |
| 8377 | 8403 |
| 8378 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8404 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |