| 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 18 matching lines...) Expand all Loading... |
| 29 FOR_EACH_VALUE(M) \ | 29 FOR_EACH_VALUE(M) \ |
| 30 M(AssertAssignable, AssertAssignableComp) \ | 30 M(AssertAssignable, AssertAssignableComp) \ |
| 31 M(CurrentContext, CurrentContextComp) \ | 31 M(CurrentContext, CurrentContextComp) \ |
| 32 M(StoreContext, StoreContextComp) \ | 32 M(StoreContext, StoreContextComp) \ |
| 33 M(ClosureCall, ClosureCallComp) \ | 33 M(ClosureCall, ClosureCallComp) \ |
| 34 M(InstanceCall, InstanceCallComp) \ | 34 M(InstanceCall, InstanceCallComp) \ |
| 35 M(StaticCall, StaticCallComp) \ | 35 M(StaticCall, StaticCallComp) \ |
| 36 M(LoadLocal, LoadLocalComp) \ | 36 M(LoadLocal, LoadLocalComp) \ |
| 37 M(StoreLocal, StoreLocalComp) \ | 37 M(StoreLocal, StoreLocalComp) \ |
| 38 M(StrictCompare, StrictCompareComp) \ | 38 M(StrictCompare, StrictCompareComp) \ |
| 39 M(EqualityCompare, EqualityCompareComp) \ |
| 39 M(NativeCall, NativeCallComp) \ | 40 M(NativeCall, NativeCallComp) \ |
| 40 M(StoreIndexed, StoreIndexedComp) \ | 41 M(StoreIndexed, StoreIndexedComp) \ |
| 41 M(InstanceSetter, InstanceSetterComp) \ | 42 M(InstanceSetter, InstanceSetterComp) \ |
| 42 M(StaticSetter, StaticSetterComp) \ | 43 M(StaticSetter, StaticSetterComp) \ |
| 43 M(LoadInstanceField, LoadInstanceFieldComp) \ | 44 M(LoadInstanceField, LoadInstanceFieldComp) \ |
| 44 M(StoreInstanceField, StoreInstanceFieldComp) \ | 45 M(StoreInstanceField, StoreInstanceFieldComp) \ |
| 45 M(LoadStaticField, LoadStaticFieldComp) \ | 46 M(LoadStaticField, LoadStaticFieldComp) \ |
| 46 M(StoreStaticField, StoreStaticFieldComp) \ | 47 M(StoreStaticField, StoreStaticFieldComp) \ |
| 47 M(BooleanNegate, BooleanNegateComp) \ | 48 M(BooleanNegate, BooleanNegateComp) \ |
| 48 M(InstanceOf, InstanceOfComp) \ | 49 M(InstanceOf, InstanceOfComp) \ |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 | 277 |
| 277 private: | 278 private: |
| 278 const Token::Kind kind_; | 279 const Token::Kind kind_; |
| 279 Value* left_; | 280 Value* left_; |
| 280 Value* right_; | 281 Value* right_; |
| 281 | 282 |
| 282 DISALLOW_COPY_AND_ASSIGN(StrictCompareComp); | 283 DISALLOW_COPY_AND_ASSIGN(StrictCompareComp); |
| 283 }; | 284 }; |
| 284 | 285 |
| 285 | 286 |
| 287 class EqualityCompareComp : public Computation { |
| 288 public: |
| 289 EqualityCompareComp(intptr_t node_id, |
| 290 intptr_t token_index, |
| 291 intptr_t try_index, |
| 292 Value* left, |
| 293 Value* right) |
| 294 : node_id_(node_id), |
| 295 token_index_(token_index), |
| 296 try_index_(try_index), |
| 297 left_(left), |
| 298 right_(right) { |
| 299 ASSERT(left_ != NULL); |
| 300 ASSERT(right_ != NULL); |
| 301 } |
| 302 |
| 303 DECLARE_COMPUTATION(EqualityCompareComp) |
| 304 |
| 305 intptr_t node_id() const { return node_id_; } |
| 306 intptr_t token_index() const { return token_index_; } |
| 307 intptr_t try_index() const { return try_index_; } |
| 308 Value* left() const { return left_; } |
| 309 Value* right() const { return right_; } |
| 310 |
| 311 private: |
| 312 const intptr_t node_id_; |
| 313 const intptr_t token_index_; |
| 314 const intptr_t try_index_; |
| 315 Value* left_; |
| 316 Value* right_; |
| 317 |
| 318 DISALLOW_COPY_AND_ASSIGN(EqualityCompareComp); |
| 319 }; |
| 320 |
| 321 |
| 286 class StaticCallComp : public Computation { | 322 class StaticCallComp : public Computation { |
| 287 public: | 323 public: |
| 288 StaticCallComp(intptr_t token_index, | 324 StaticCallComp(intptr_t token_index, |
| 289 intptr_t try_index, | 325 intptr_t try_index, |
| 290 const Function& function, | 326 const Function& function, |
| 291 const Array& argument_names, | 327 const Array& argument_names, |
| 292 ZoneGrowableArray<Value*>* arguments) | 328 ZoneGrowableArray<Value*>* arguments) |
| 293 : token_index_(token_index), | 329 : token_index_(token_index), |
| 294 try_index_(try_index), | 330 try_index_(try_index), |
| 295 function_(function), | 331 function_(function), |
| (...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1450 const GrowableArray<BlockEntryInstr*>& block_order_; | 1486 const GrowableArray<BlockEntryInstr*>& block_order_; |
| 1451 | 1487 |
| 1452 private: | 1488 private: |
| 1453 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 1489 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 1454 }; | 1490 }; |
| 1455 | 1491 |
| 1456 | 1492 |
| 1457 } // namespace dart | 1493 } // namespace dart |
| 1458 | 1494 |
| 1459 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 1495 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |