| 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 2247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2258 virtual bool CanDeoptimize() const { return false; } | 2258 virtual bool CanDeoptimize() const { return false; } |
| 2259 virtual intptr_t ResultCid() const { return kDynamicCid; } | 2259 virtual intptr_t ResultCid() const { return kDynamicCid; } |
| 2260 | 2260 |
| 2261 private: | 2261 private: |
| 2262 DISALLOW_COPY_AND_ASSIGN(LoadIndexedInstr); | 2262 DISALLOW_COPY_AND_ASSIGN(LoadIndexedInstr); |
| 2263 }; | 2263 }; |
| 2264 | 2264 |
| 2265 | 2265 |
| 2266 class StoreIndexedInstr : public TemplateDefinition<3> { | 2266 class StoreIndexedInstr : public TemplateDefinition<3> { |
| 2267 public: | 2267 public: |
| 2268 StoreIndexedInstr(Value* array, Value* index, Value* value) { | 2268 StoreIndexedInstr(Value* array, |
| 2269 Value* index, |
| 2270 Value* value, |
| 2271 bool emit_store_barrier) |
| 2272 : emit_store_barrier_(emit_store_barrier) { |
| 2269 ASSERT(array != NULL); | 2273 ASSERT(array != NULL); |
| 2270 ASSERT(index != NULL); | 2274 ASSERT(index != NULL); |
| 2271 ASSERT(value != NULL); | 2275 ASSERT(value != NULL); |
| 2272 inputs_[0] = array; | 2276 inputs_[0] = array; |
| 2273 inputs_[1] = index; | 2277 inputs_[1] = index; |
| 2274 inputs_[2] = value; | 2278 inputs_[2] = value; |
| 2275 } | 2279 } |
| 2276 | 2280 |
| 2277 DECLARE_INSTRUCTION(StoreIndexed) | 2281 DECLARE_INSTRUCTION(StoreIndexed) |
| 2278 virtual RawAbstractType* CompileType() const; | 2282 virtual RawAbstractType* CompileType() const; |
| 2279 | 2283 |
| 2280 Value* array() const { return inputs_[0]; } | 2284 Value* array() const { return inputs_[0]; } |
| 2281 Value* index() const { return inputs_[1]; } | 2285 Value* index() const { return inputs_[1]; } |
| 2282 Value* value() const { return inputs_[2]; } | 2286 Value* value() const { return inputs_[2]; } |
| 2283 | 2287 |
| 2288 bool emit_store_barrier() const { return emit_store_barrier_; } |
| 2289 |
| 2284 virtual bool CanDeoptimize() const { return false; } | 2290 virtual bool CanDeoptimize() const { return false; } |
| 2285 virtual intptr_t ResultCid() const { return kDynamicCid; } | 2291 virtual intptr_t ResultCid() const { return kDynamicCid; } |
| 2286 | 2292 |
| 2287 private: | 2293 private: |
| 2294 const bool emit_store_barrier_; |
| 2295 |
| 2288 DISALLOW_COPY_AND_ASSIGN(StoreIndexedInstr); | 2296 DISALLOW_COPY_AND_ASSIGN(StoreIndexedInstr); |
| 2289 }; | 2297 }; |
| 2290 | 2298 |
| 2291 | 2299 |
| 2292 // Note overrideable, built-in: value? false : true. | 2300 // Note overrideable, built-in: value? false : true. |
| 2293 class BooleanNegateInstr : public TemplateDefinition<1> { | 2301 class BooleanNegateInstr : public TemplateDefinition<1> { |
| 2294 public: | 2302 public: |
| 2295 explicit BooleanNegateInstr(Value* value) { | 2303 explicit BooleanNegateInstr(Value* value) { |
| 2296 ASSERT(value != NULL); | 2304 ASSERT(value != NULL); |
| 2297 inputs_[0] = value; | 2305 inputs_[0] = value; |
| (...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3451 ForwardInstructionIterator* current_iterator_; | 3459 ForwardInstructionIterator* current_iterator_; |
| 3452 | 3460 |
| 3453 private: | 3461 private: |
| 3454 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 3462 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 3455 }; | 3463 }; |
| 3456 | 3464 |
| 3457 | 3465 |
| 3458 } // namespace dart | 3466 } // namespace dart |
| 3459 | 3467 |
| 3460 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 3468 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |