| 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 2139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2150 | 2150 |
| 2151 private: | 2151 private: |
| 2152 const Field& field_; | 2152 const Field& field_; |
| 2153 | 2153 |
| 2154 DISALLOW_COPY_AND_ASSIGN(LoadInstanceFieldInstr); | 2154 DISALLOW_COPY_AND_ASSIGN(LoadInstanceFieldInstr); |
| 2155 }; | 2155 }; |
| 2156 | 2156 |
| 2157 | 2157 |
| 2158 class StoreInstanceFieldInstr : public TemplateDefinition<2> { | 2158 class StoreInstanceFieldInstr : public TemplateDefinition<2> { |
| 2159 public: | 2159 public: |
| 2160 StoreInstanceFieldInstr(const Field& field, Value* instance, Value* value) | 2160 StoreInstanceFieldInstr(const Field& field, |
| 2161 : field_(field) { | 2161 Value* instance, |
| 2162 Value* value, |
| 2163 bool emit_store_barrier) |
| 2164 : field_(field), emit_store_barrier_(emit_store_barrier) { |
| 2162 ASSERT(instance != NULL); | 2165 ASSERT(instance != NULL); |
| 2163 ASSERT(value != NULL); | 2166 ASSERT(value != NULL); |
| 2164 inputs_[0] = instance; | 2167 inputs_[0] = instance; |
| 2165 inputs_[1] = value; | 2168 inputs_[1] = value; |
| 2166 } | 2169 } |
| 2167 | 2170 |
| 2168 DECLARE_INSTRUCTION(StoreInstanceField) | 2171 DECLARE_INSTRUCTION(StoreInstanceField) |
| 2169 virtual RawAbstractType* CompileType() const; | 2172 virtual RawAbstractType* CompileType() const; |
| 2170 | 2173 |
| 2171 const Field& field() const { return field_; } | 2174 const Field& field() const { return field_; } |
| 2172 | 2175 |
| 2173 Value* instance() const { return inputs_[0]; } | 2176 Value* instance() const { return inputs_[0]; } |
| 2174 Value* value() const { return inputs_[1]; } | 2177 Value* value() const { return inputs_[1]; } |
| 2178 bool emit_store_barrier() const { |
| 2179 return emit_store_barrier_; |
| 2180 } |
| 2175 | 2181 |
| 2176 virtual void PrintOperandsTo(BufferFormatter* f) const; | 2182 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 2177 | 2183 |
| 2178 virtual bool CanDeoptimize() const { return false; } | 2184 virtual bool CanDeoptimize() const { return false; } |
| 2179 virtual intptr_t ResultCid() const { return kDynamicCid; } | 2185 virtual intptr_t ResultCid() const { return kDynamicCid; } |
| 2180 | 2186 |
| 2181 private: | 2187 private: |
| 2182 const Field& field_; | 2188 const Field& field_; |
| 2189 const bool emit_store_barrier_; |
| 2183 | 2190 |
| 2184 DISALLOW_COPY_AND_ASSIGN(StoreInstanceFieldInstr); | 2191 DISALLOW_COPY_AND_ASSIGN(StoreInstanceFieldInstr); |
| 2185 }; | 2192 }; |
| 2186 | 2193 |
| 2187 | 2194 |
| 2188 class LoadStaticFieldInstr : public TemplateDefinition<0> { | 2195 class LoadStaticFieldInstr : public TemplateDefinition<0> { |
| 2189 public: | 2196 public: |
| 2190 explicit LoadStaticFieldInstr(const Field& field) : field_(field) {} | 2197 explicit LoadStaticFieldInstr(const Field& field) : field_(field) {} |
| 2191 | 2198 |
| 2192 DECLARE_INSTRUCTION(LoadStaticField); | 2199 DECLARE_INSTRUCTION(LoadStaticField); |
| (...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3444 ForwardInstructionIterator* current_iterator_; | 3451 ForwardInstructionIterator* current_iterator_; |
| 3445 | 3452 |
| 3446 private: | 3453 private: |
| 3447 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 3454 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 3448 }; | 3455 }; |
| 3449 | 3456 |
| 3450 | 3457 |
| 3451 } // namespace dart | 3458 } // namespace dart |
| 3452 | 3459 |
| 3453 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 3460 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |