| 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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 } | 512 } |
| 513 | 513 |
| 514 private: | 514 private: |
| 515 friend class Definition; // Needed for InsertBefore, InsertAfter. | 515 friend class Definition; // Needed for InsertBefore, InsertAfter. |
| 516 | 516 |
| 517 // Classes that set deopt_id_. | 517 // Classes that set deopt_id_. |
| 518 friend class UnboxIntegerInstr; | 518 friend class UnboxIntegerInstr; |
| 519 friend class UnboxDoubleInstr; | 519 friend class UnboxDoubleInstr; |
| 520 friend class BinaryDoubleOpInstr; | 520 friend class BinaryDoubleOpInstr; |
| 521 friend class BinaryMintOpInstr; | 521 friend class BinaryMintOpInstr; |
| 522 friend class BinarySmiOpInstr; |
| 523 friend class UnarySmiOpInstr; |
| 522 friend class ShiftMintOpInstr; | 524 friend class ShiftMintOpInstr; |
| 523 friend class UnaryMintOpInstr; | 525 friend class UnaryMintOpInstr; |
| 524 friend class MathSqrtInstr; | 526 friend class MathSqrtInstr; |
| 525 friend class CheckClassInstr; | 527 friend class CheckClassInstr; |
| 526 friend class CheckSmiInstr; | 528 friend class CheckSmiInstr; |
| 527 friend class CheckArrayBoundInstr; | 529 friend class CheckArrayBoundInstr; |
| 528 friend class CheckEitherNonSmiInstr; | 530 friend class CheckEitherNonSmiInstr; |
| 529 friend class LICM; | 531 friend class LICM; |
| 530 | 532 |
| 531 intptr_t deopt_id_; | 533 intptr_t deopt_id_; |
| (...skipping 3210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3742 InstanceCallInstr* instance_call, | 3744 InstanceCallInstr* instance_call, |
| 3743 Value* left, | 3745 Value* left, |
| 3744 Value* right) | 3746 Value* right) |
| 3745 : op_kind_(op_kind), | 3747 : op_kind_(op_kind), |
| 3746 instance_call_(instance_call), | 3748 instance_call_(instance_call), |
| 3747 overflow_(true) { | 3749 overflow_(true) { |
| 3748 ASSERT(left != NULL); | 3750 ASSERT(left != NULL); |
| 3749 ASSERT(right != NULL); | 3751 ASSERT(right != NULL); |
| 3750 inputs_[0] = left; | 3752 inputs_[0] = left; |
| 3751 inputs_[1] = right; | 3753 inputs_[1] = right; |
| 3754 deopt_id_ = instance_call->deopt_id(); |
| 3752 } | 3755 } |
| 3753 | 3756 |
| 3754 Value* left() const { return inputs_[0]; } | 3757 Value* left() const { return inputs_[0]; } |
| 3755 Value* right() const { return inputs_[1]; } | 3758 Value* right() const { return inputs_[1]; } |
| 3756 | 3759 |
| 3757 Token::Kind op_kind() const { return op_kind_; } | 3760 Token::Kind op_kind() const { return op_kind_; } |
| 3758 | 3761 |
| 3759 InstanceCallInstr* instance_call() const { return instance_call_; } | 3762 InstanceCallInstr* instance_call() const { return instance_call_; } |
| 3760 | 3763 |
| 3761 const ICData* ic_data() const { return instance_call()->ic_data(); } | 3764 const ICData* ic_data() const { return instance_call()->ic_data(); } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3795 // Handles both Smi operations: BIT_OR and NEGATE. | 3798 // Handles both Smi operations: BIT_OR and NEGATE. |
| 3796 class UnarySmiOpInstr : public TemplateDefinition<1> { | 3799 class UnarySmiOpInstr : public TemplateDefinition<1> { |
| 3797 public: | 3800 public: |
| 3798 UnarySmiOpInstr(Token::Kind op_kind, | 3801 UnarySmiOpInstr(Token::Kind op_kind, |
| 3799 InstanceCallInstr* instance_call, | 3802 InstanceCallInstr* instance_call, |
| 3800 Value* value) | 3803 Value* value) |
| 3801 : op_kind_(op_kind), instance_call_(instance_call) { | 3804 : op_kind_(op_kind), instance_call_(instance_call) { |
| 3802 ASSERT((op_kind == Token::kNEGATE) || (op_kind == Token::kBIT_NOT)); | 3805 ASSERT((op_kind == Token::kNEGATE) || (op_kind == Token::kBIT_NOT)); |
| 3803 ASSERT(value != NULL); | 3806 ASSERT(value != NULL); |
| 3804 inputs_[0] = value; | 3807 inputs_[0] = value; |
| 3808 deopt_id_ = instance_call->deopt_id(); |
| 3805 } | 3809 } |
| 3806 | 3810 |
| 3807 Value* value() const { return inputs_[0]; } | 3811 Value* value() const { return inputs_[0]; } |
| 3808 Token::Kind op_kind() const { return op_kind_; } | 3812 Token::Kind op_kind() const { return op_kind_; } |
| 3809 | 3813 |
| 3810 InstanceCallInstr* instance_call() const { return instance_call_; } | 3814 InstanceCallInstr* instance_call() const { return instance_call_; } |
| 3811 | 3815 |
| 3812 virtual void PrintOperandsTo(BufferFormatter* f) const; | 3816 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 3813 | 3817 |
| 3814 DECLARE_INSTRUCTION(UnarySmiOp) | 3818 DECLARE_INSTRUCTION(UnarySmiOp) |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4250 ForwardInstructionIterator* current_iterator_; | 4254 ForwardInstructionIterator* current_iterator_; |
| 4251 | 4255 |
| 4252 private: | 4256 private: |
| 4253 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 4257 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 4254 }; | 4258 }; |
| 4255 | 4259 |
| 4256 | 4260 |
| 4257 } // namespace dart | 4261 } // namespace dart |
| 4258 | 4262 |
| 4259 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 4263 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |