| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 3692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3703 | 3703 |
| 3704 const Class& cls_; | 3704 const Class& cls_; |
| 3705 const ZoneGrowableArray<const Field*>& fields_; | 3705 const ZoneGrowableArray<const Field*>& fields_; |
| 3706 ZoneGrowableArray<Value*>* values_; | 3706 ZoneGrowableArray<Value*>* values_; |
| 3707 Location* locations_; | 3707 Location* locations_; |
| 3708 | 3708 |
| 3709 DISALLOW_COPY_AND_ASSIGN(MaterializeObjectInstr); | 3709 DISALLOW_COPY_AND_ASSIGN(MaterializeObjectInstr); |
| 3710 }; | 3710 }; |
| 3711 | 3711 |
| 3712 | 3712 |
| 3713 class AllocateObjectWithBoundsCheckInstr : public TemplateDefinition<2> { | 3713 class AllocateObjectWithBoundsCheckInstr : public TemplateDefinition<0> { |
| 3714 public: | 3714 public: |
| 3715 AllocateObjectWithBoundsCheckInstr(ConstructorCallNode* node, | 3715 explicit AllocateObjectWithBoundsCheckInstr(ConstructorCallNode* node) |
| 3716 Value* type_arguments, | |
| 3717 Value* instantiator) | |
| 3718 : ast_node_(*node) { | 3716 : ast_node_(*node) { |
| 3719 SetInputAt(0, type_arguments); | |
| 3720 SetInputAt(1, instantiator); | |
| 3721 } | 3717 } |
| 3722 | 3718 |
| 3723 DECLARE_INSTRUCTION(AllocateObjectWithBoundsCheck) | 3719 DECLARE_INSTRUCTION(AllocateObjectWithBoundsCheck) |
| 3724 | 3720 |
| 3721 virtual intptr_t ArgumentCount() const { return 4; } |
| 3722 |
| 3725 const Function& constructor() const { return ast_node_.constructor(); } | 3723 const Function& constructor() const { return ast_node_.constructor(); } |
| 3726 intptr_t token_pos() const { return ast_node_.token_pos(); } | 3724 intptr_t token_pos() const { return ast_node_.token_pos(); } |
| 3727 | 3725 |
| 3728 virtual void PrintOperandsTo(BufferFormatter* f) const; | 3726 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 3729 | 3727 |
| 3730 virtual bool CanDeoptimize() const { return true; } | 3728 virtual bool CanDeoptimize() const { return true; } |
| 3731 | 3729 |
| 3732 virtual EffectSet Effects() const { return EffectSet::None(); } | 3730 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 3733 | 3731 |
| 3734 virtual bool MayThrow() const { return false; } | 3732 virtual bool MayThrow() const { return false; } |
| (...skipping 2670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6405 ForwardInstructionIterator* current_iterator_; | 6403 ForwardInstructionIterator* current_iterator_; |
| 6406 | 6404 |
| 6407 private: | 6405 private: |
| 6408 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 6406 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 6409 }; | 6407 }; |
| 6410 | 6408 |
| 6411 | 6409 |
| 6412 } // namespace dart | 6410 } // namespace dart |
| 6413 | 6411 |
| 6414 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 6412 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |