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