| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 static const char* KindToCString(Kind kind); | 55 static const char* KindToCString(Kind kind); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 | 58 |
| 59 class Value : public ZoneAllocated { | 59 class Value : public ZoneAllocated { |
| 60 public: | 60 public: |
| 61 explicit Value(Definition* definition) | 61 explicit Value(Definition* definition) |
| 62 : definition_(definition), | 62 : definition_(definition), |
| 63 next_use_(NULL), | 63 next_use_(NULL), |
| 64 instruction_(NULL), | 64 instruction_(NULL), |
| 65 use_index_(-1) { } | 65 use_index_(-1), |
| 66 reaching_cid_(kIllegalCid) { } |
| 66 | 67 |
| 67 Definition* definition() const { return definition_; } | 68 Definition* definition() const { return definition_; } |
| 68 void set_definition(Definition* definition) { definition_ = definition; } | 69 void set_definition(Definition* definition) { definition_ = definition; } |
| 69 | 70 |
| 70 Value* next_use() const { return next_use_; } | 71 Value* next_use() const { return next_use_; } |
| 71 void set_next_use(Value* next) { next_use_ = next; } | 72 void set_next_use(Value* next) { next_use_ = next; } |
| 72 | 73 |
| 73 Instruction* instruction() const { return instruction_; } | 74 Instruction* instruction() const { return instruction_; } |
| 74 void set_instruction(Instruction* instruction) { instruction_ = instruction; } | 75 void set_instruction(Instruction* instruction) { instruction_ = instruction; } |
| 75 | 76 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 100 // Reminder: The type of the constant null is the bottom type, which is more | 101 // Reminder: The type of the constant null is the bottom type, which is more |
| 101 // specific than any type. | 102 // specific than any type. |
| 102 bool CompileTypeIsMoreSpecificThan(const AbstractType& dst_type) const; | 103 bool CompileTypeIsMoreSpecificThan(const AbstractType& dst_type) const; |
| 103 | 104 |
| 104 // Compile time constants, Bool, Smi and Nulls do not need to update | 105 // Compile time constants, Bool, Smi and Nulls do not need to update |
| 105 // the store buffer. | 106 // the store buffer. |
| 106 bool NeedsStoreBuffer() const; | 107 bool NeedsStoreBuffer() const; |
| 107 | 108 |
| 108 bool Equals(Value* other) const; | 109 bool Equals(Value* other) const; |
| 109 | 110 |
| 111 void set_reaching_cid(intptr_t cid) { reaching_cid_ = cid; } |
| 112 intptr_t reaching_cid() const { return reaching_cid_; } |
| 113 |
| 110 private: | 114 private: |
| 111 Definition* definition_; | 115 Definition* definition_; |
| 112 Value* next_use_; | 116 Value* next_use_; |
| 113 Instruction* instruction_; | 117 Instruction* instruction_; |
| 114 intptr_t use_index_; | 118 intptr_t use_index_; |
| 115 | 119 |
| 120 intptr_t reaching_cid_; |
| 121 |
| 116 DISALLOW_COPY_AND_ASSIGN(Value); | 122 DISALLOW_COPY_AND_ASSIGN(Value); |
| 117 }; | 123 }; |
| 118 | 124 |
| 119 | 125 |
| 120 enum Representation { | 126 enum Representation { |
| 121 kTagged, kUnboxedDouble | 127 kTagged, kUnboxedDouble |
| 122 }; | 128 }; |
| 123 | 129 |
| 124 | 130 |
| 125 // An embedded container with N elements of type T. Used (with partial | 131 // An embedded container with N elements of type T. Used (with partial |
| (...skipping 3333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3459 ForwardInstructionIterator* current_iterator_; | 3465 ForwardInstructionIterator* current_iterator_; |
| 3460 | 3466 |
| 3461 private: | 3467 private: |
| 3462 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 3468 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 3463 }; | 3469 }; |
| 3464 | 3470 |
| 3465 | 3471 |
| 3466 } // namespace dart | 3472 } // namespace dart |
| 3467 | 3473 |
| 3468 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 3474 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |