| 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 friend class MathSqrtInstr; | 513 friend class MathSqrtInstr; |
| 514 friend class CheckClassInstr; | 514 friend class CheckClassInstr; |
| 515 friend class CheckSmiInstr; | 515 friend class CheckSmiInstr; |
| 516 friend class CheckArrayBoundInstr; | 516 friend class CheckArrayBoundInstr; |
| 517 friend class CheckEitherNonSmiInstr; | 517 friend class CheckEitherNonSmiInstr; |
| 518 friend class LICM; | 518 friend class LICM; |
| 519 friend class DoubleToSmiInstr; | 519 friend class DoubleToSmiInstr; |
| 520 friend class DoubleToDoubleInstr; | 520 friend class DoubleToDoubleInstr; |
| 521 friend class InvokeMathCFunctionInstr; | 521 friend class InvokeMathCFunctionInstr; |
| 522 friend class FlowGraphOptimizer; | 522 friend class FlowGraphOptimizer; |
| 523 friend class LoadIndexedInstr; |
| 523 | 524 |
| 524 intptr_t deopt_id_; | 525 intptr_t deopt_id_; |
| 525 intptr_t lifetime_position_; // Position used by register allocator. | 526 intptr_t lifetime_position_; // Position used by register allocator. |
| 526 Instruction* previous_; | 527 Instruction* previous_; |
| 527 Instruction* next_; | 528 Instruction* next_; |
| 528 Environment* env_; | 529 Environment* env_; |
| 529 intptr_t expr_id_; | 530 intptr_t expr_id_; |
| 530 | 531 |
| 531 DISALLOW_COPY_AND_ASSIGN(Instruction); | 532 DISALLOW_COPY_AND_ASSIGN(Instruction); |
| 532 }; | 533 }; |
| (...skipping 2155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2688 | 2689 |
| 2689 private: | 2690 private: |
| 2690 const Field& field_; | 2691 const Field& field_; |
| 2691 | 2692 |
| 2692 DISALLOW_COPY_AND_ASSIGN(StoreStaticFieldInstr); | 2693 DISALLOW_COPY_AND_ASSIGN(StoreStaticFieldInstr); |
| 2693 }; | 2694 }; |
| 2694 | 2695 |
| 2695 | 2696 |
| 2696 class LoadIndexedInstr : public TemplateDefinition<2> { | 2697 class LoadIndexedInstr : public TemplateDefinition<2> { |
| 2697 public: | 2698 public: |
| 2698 LoadIndexedInstr(Value* array, Value* index, intptr_t class_id) | 2699 LoadIndexedInstr(Value* array, |
| 2700 Value* index, |
| 2701 intptr_t class_id, |
| 2702 intptr_t deopt_id) |
| 2699 : class_id_(class_id) { | 2703 : class_id_(class_id) { |
| 2700 ASSERT(array != NULL); | 2704 ASSERT(array != NULL); |
| 2701 ASSERT(index != NULL); | 2705 ASSERT(index != NULL); |
| 2702 inputs_[0] = array; | 2706 inputs_[0] = array; |
| 2703 inputs_[1] = index; | 2707 inputs_[1] = index; |
| 2708 deopt_id_ = deopt_id; |
| 2704 } | 2709 } |
| 2705 | 2710 |
| 2706 DECLARE_INSTRUCTION(LoadIndexed) | 2711 DECLARE_INSTRUCTION(LoadIndexed) |
| 2707 virtual RawAbstractType* CompileType() const; | 2712 virtual RawAbstractType* CompileType() const; |
| 2708 | 2713 |
| 2709 Value* array() const { return inputs_[0]; } | 2714 Value* array() const { return inputs_[0]; } |
| 2710 Value* index() const { return inputs_[1]; } | 2715 Value* index() const { return inputs_[1]; } |
| 2711 intptr_t class_id() const { return class_id_; } | 2716 intptr_t class_id() const { return class_id_; } |
| 2712 | 2717 |
| 2713 virtual bool CanDeoptimize() const { return false; } | 2718 virtual bool CanDeoptimize() const { |
| 2719 return deopt_id_ != Isolate::kNoDeoptId; |
| 2720 } |
| 2714 | 2721 |
| 2715 virtual bool HasSideEffect() const { return false; } | 2722 virtual bool HasSideEffect() const { return false; } |
| 2716 | 2723 |
| 2717 virtual intptr_t ResultCid() const; | 2724 virtual intptr_t ResultCid() const; |
| 2718 | 2725 |
| 2719 virtual Representation representation() const; | 2726 virtual Representation representation() const; |
| 2720 | 2727 |
| 2721 virtual bool AttributesEqual(Instruction* other) const; | 2728 virtual bool AttributesEqual(Instruction* other) const; |
| 2722 | 2729 |
| 2723 virtual bool AffectedBySideEffect() const { return true; } | 2730 virtual bool AffectedBySideEffect() const { return true; } |
| (...skipping 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4458 ForwardInstructionIterator* current_iterator_; | 4465 ForwardInstructionIterator* current_iterator_; |
| 4459 | 4466 |
| 4460 private: | 4467 private: |
| 4461 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 4468 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 4462 }; | 4469 }; |
| 4463 | 4470 |
| 4464 | 4471 |
| 4465 } // namespace dart | 4472 } // namespace dart |
| 4466 | 4473 |
| 4467 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 4474 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |