| 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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 private: | 643 private: |
| 644 const ArrayNode& ast_node_; | 644 const ArrayNode& ast_node_; |
| 645 ZoneGrowableArray<Value*>* const elements_; | 645 ZoneGrowableArray<Value*>* const elements_; |
| 646 | 646 |
| 647 DISALLOW_COPY_AND_ASSIGN(CreateArrayComp); | 647 DISALLOW_COPY_AND_ASSIGN(CreateArrayComp); |
| 648 }; | 648 }; |
| 649 | 649 |
| 650 | 650 |
| 651 class CreateClosureComp : public Computation { | 651 class CreateClosureComp : public Computation { |
| 652 public: | 652 public: |
| 653 explicit CreateClosureComp(ClosureNode* node) : ast_node_(*node) { } | 653 // 'type_arguments' is null if function() does not require type arguments. |
| 654 CreateClosureComp(ClosureNode* node, Value* type_arguments) |
| 655 : ast_node_(*node), type_arguments_(type_arguments) { } |
| 654 | 656 |
| 655 DECLARE_COMPUTATION(CreateClosure) | 657 DECLARE_COMPUTATION(CreateClosure) |
| 656 | 658 |
| 657 intptr_t token_index() const { return ast_node_.token_index(); } | 659 intptr_t token_index() const { return ast_node_.token_index(); } |
| 658 const Function& function() const { return ast_node_.function(); } | 660 const Function& function() const { return ast_node_.function(); } |
| 661 Value* type_arguments() const { return type_arguments_; } |
| 659 | 662 |
| 660 private: | 663 private: |
| 661 const ClosureNode& ast_node_; | 664 const ClosureNode& ast_node_; |
| 665 Value* type_arguments_; |
| 662 | 666 |
| 663 DISALLOW_COPY_AND_ASSIGN(CreateClosureComp); | 667 DISALLOW_COPY_AND_ASSIGN(CreateClosureComp); |
| 664 }; | 668 }; |
| 665 | 669 |
| 666 | 670 |
| 667 class NativeLoadFieldComp : public Computation { | 671 class NativeLoadFieldComp : public Computation { |
| 668 public: | 672 public: |
| 669 NativeLoadFieldComp(Value* value, intptr_t offset_in_bytes) | 673 NativeLoadFieldComp(Value* value, intptr_t offset_in_bytes) |
| 670 : value_(value), offset_in_bytes_(offset_in_bytes) { | 674 : value_(value), offset_in_bytes_(offset_in_bytes) { |
| 671 ASSERT(value != NULL); | 675 ASSERT(value != NULL); |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1284 const GrowableArray<BlockEntryInstr*>& block_order_; | 1288 const GrowableArray<BlockEntryInstr*>& block_order_; |
| 1285 | 1289 |
| 1286 private: | 1290 private: |
| 1287 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 1291 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 1288 }; | 1292 }; |
| 1289 | 1293 |
| 1290 | 1294 |
| 1291 } // namespace dart | 1295 } // namespace dart |
| 1292 | 1296 |
| 1293 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 1297 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |