| 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 4312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4323 const LocalVariable& stacktrace_var_; | 4323 const LocalVariable& stacktrace_var_; |
| 4324 | 4324 |
| 4325 DISALLOW_COPY_AND_ASSIGN(CatchEntryInstr); | 4325 DISALLOW_COPY_AND_ASSIGN(CatchEntryInstr); |
| 4326 }; | 4326 }; |
| 4327 | 4327 |
| 4328 | 4328 |
| 4329 class CheckEitherNonSmiInstr : public TemplateInstruction<2> { | 4329 class CheckEitherNonSmiInstr : public TemplateInstruction<2> { |
| 4330 public: | 4330 public: |
| 4331 CheckEitherNonSmiInstr(Value* left, | 4331 CheckEitherNonSmiInstr(Value* left, |
| 4332 Value* right, | 4332 Value* right, |
| 4333 InstanceCallInstr* instance_call) { | 4333 intptr_t deopt_id) { |
| 4334 SetInputAt(0, left); | 4334 SetInputAt(0, left); |
| 4335 SetInputAt(1, right); | 4335 SetInputAt(1, right); |
| 4336 deopt_id_ = instance_call->deopt_id(); | 4336 // Override generated deopt-id. |
| 4337 deopt_id_ = deopt_id; |
| 4337 } | 4338 } |
| 4338 | 4339 |
| 4339 Value* left() const { return inputs_[0]; } | 4340 Value* left() const { return inputs_[0]; } |
| 4340 Value* right() const { return inputs_[1]; } | 4341 Value* right() const { return inputs_[1]; } |
| 4341 | 4342 |
| 4342 DECLARE_INSTRUCTION(CheckEitherNonSmi) | 4343 DECLARE_INSTRUCTION(CheckEitherNonSmi) |
| 4343 | 4344 |
| 4344 virtual intptr_t ArgumentCount() const { return 0; } | 4345 virtual intptr_t ArgumentCount() const { return 0; } |
| 4345 | 4346 |
| 4346 virtual bool CanDeoptimize() const { return true; } | 4347 virtual bool CanDeoptimize() const { return true; } |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4653 private: | 4654 private: |
| 4654 DISALLOW_COPY_AND_ASSIGN(MathSqrtInstr); | 4655 DISALLOW_COPY_AND_ASSIGN(MathSqrtInstr); |
| 4655 }; | 4656 }; |
| 4656 | 4657 |
| 4657 | 4658 |
| 4658 class BinaryDoubleOpInstr : public TemplateDefinition<2> { | 4659 class BinaryDoubleOpInstr : public TemplateDefinition<2> { |
| 4659 public: | 4660 public: |
| 4660 BinaryDoubleOpInstr(Token::Kind op_kind, | 4661 BinaryDoubleOpInstr(Token::Kind op_kind, |
| 4661 Value* left, | 4662 Value* left, |
| 4662 Value* right, | 4663 Value* right, |
| 4663 InstanceCallInstr* instance_call) | 4664 intptr_t deopt_id) |
| 4664 : op_kind_(op_kind) { | 4665 : op_kind_(op_kind) { |
| 4665 SetInputAt(0, left); | 4666 SetInputAt(0, left); |
| 4666 SetInputAt(1, right); | 4667 SetInputAt(1, right); |
| 4667 deopt_id_ = instance_call->deopt_id(); | 4668 // Overrided generated deopt_id. |
| 4669 deopt_id_ = deopt_id; |
| 4668 } | 4670 } |
| 4669 | 4671 |
| 4670 Value* left() const { return inputs_[0]; } | 4672 Value* left() const { return inputs_[0]; } |
| 4671 Value* right() const { return inputs_[1]; } | 4673 Value* right() const { return inputs_[1]; } |
| 4672 | 4674 |
| 4673 Token::Kind op_kind() const { return op_kind_; } | 4675 Token::Kind op_kind() const { return op_kind_; } |
| 4674 | 4676 |
| 4675 virtual void PrintOperandsTo(BufferFormatter* f) const; | 4677 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 4676 | 4678 |
| 4677 virtual bool CanDeoptimize() const { return false; } | 4679 virtual bool CanDeoptimize() const { return false; } |
| (...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5671 const Token::Kind op_kind_; | 5673 const Token::Kind op_kind_; |
| 5672 | 5674 |
| 5673 DISALLOW_COPY_AND_ASSIGN(BinaryUint32x4OpInstr); | 5675 DISALLOW_COPY_AND_ASSIGN(BinaryUint32x4OpInstr); |
| 5674 }; | 5676 }; |
| 5675 | 5677 |
| 5676 class BinaryMintOpInstr : public TemplateDefinition<2> { | 5678 class BinaryMintOpInstr : public TemplateDefinition<2> { |
| 5677 public: | 5679 public: |
| 5678 BinaryMintOpInstr(Token::Kind op_kind, | 5680 BinaryMintOpInstr(Token::Kind op_kind, |
| 5679 Value* left, | 5681 Value* left, |
| 5680 Value* right, | 5682 Value* right, |
| 5681 InstanceCallInstr* instance_call) | 5683 intptr_t deopt_id) |
| 5682 : op_kind_(op_kind), | 5684 : op_kind_(op_kind) { |
| 5683 instance_call_(instance_call) { | |
| 5684 SetInputAt(0, left); | 5685 SetInputAt(0, left); |
| 5685 SetInputAt(1, right); | 5686 SetInputAt(1, right); |
| 5686 deopt_id_ = instance_call->deopt_id(); | 5687 // Override generated deopt-id. |
| 5688 deopt_id_ = deopt_id; |
| 5687 } | 5689 } |
| 5688 | 5690 |
| 5689 Value* left() const { return inputs_[0]; } | 5691 Value* left() const { return inputs_[0]; } |
| 5690 Value* right() const { return inputs_[1]; } | 5692 Value* right() const { return inputs_[1]; } |
| 5691 | 5693 |
| 5692 Token::Kind op_kind() const { return op_kind_; } | 5694 Token::Kind op_kind() const { return op_kind_; } |
| 5693 | 5695 |
| 5694 InstanceCallInstr* instance_call() const { return instance_call_; } | |
| 5695 | |
| 5696 virtual void PrintOperandsTo(BufferFormatter* f) const; | 5696 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 5697 | 5697 |
| 5698 virtual bool CanDeoptimize() const { | 5698 virtual bool CanDeoptimize() const { |
| 5699 return (op_kind() == Token::kADD) || (op_kind() == Token::kSUB); | 5699 return (op_kind() == Token::kADD) || (op_kind() == Token::kSUB); |
| 5700 } | 5700 } |
| 5701 | 5701 |
| 5702 virtual Representation representation() const { | 5702 virtual Representation representation() const { |
| 5703 return kUnboxedMint; | 5703 return kUnboxedMint; |
| 5704 } | 5704 } |
| 5705 | 5705 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 5724 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 5724 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 5725 virtual bool AttributesEqual(Instruction* other) const { | 5725 virtual bool AttributesEqual(Instruction* other) const { |
| 5726 ASSERT(other->IsBinaryMintOp()); | 5726 ASSERT(other->IsBinaryMintOp()); |
| 5727 return op_kind() == other->AsBinaryMintOp()->op_kind(); | 5727 return op_kind() == other->AsBinaryMintOp()->op_kind(); |
| 5728 } | 5728 } |
| 5729 | 5729 |
| 5730 virtual bool MayThrow() const { return false; } | 5730 virtual bool MayThrow() const { return false; } |
| 5731 | 5731 |
| 5732 private: | 5732 private: |
| 5733 const Token::Kind op_kind_; | 5733 const Token::Kind op_kind_; |
| 5734 InstanceCallInstr* instance_call_; | |
| 5735 | 5734 |
| 5736 DISALLOW_COPY_AND_ASSIGN(BinaryMintOpInstr); | 5735 DISALLOW_COPY_AND_ASSIGN(BinaryMintOpInstr); |
| 5737 }; | 5736 }; |
| 5738 | 5737 |
| 5739 | 5738 |
| 5740 class ShiftMintOpInstr : public TemplateDefinition<2> { | 5739 class ShiftMintOpInstr : public TemplateDefinition<2> { |
| 5741 public: | 5740 public: |
| 5742 ShiftMintOpInstr(Token::Kind op_kind, | 5741 ShiftMintOpInstr(Token::Kind op_kind, |
| 5743 Value* left, | 5742 Value* left, |
| 5744 Value* right, | 5743 Value* right, |
| 5745 InstanceCallInstr* instance_call) | 5744 intptr_t deopt_id) |
| 5746 : op_kind_(op_kind) { | 5745 : op_kind_(op_kind) { |
| 5747 ASSERT(op_kind == Token::kSHR || op_kind == Token::kSHL); | 5746 ASSERT(op_kind == Token::kSHR || op_kind == Token::kSHL); |
| 5748 SetInputAt(0, left); | 5747 SetInputAt(0, left); |
| 5749 SetInputAt(1, right); | 5748 SetInputAt(1, right); |
| 5750 deopt_id_ = instance_call->deopt_id(); | 5749 // Override generated deopt-id. |
| 5750 deopt_id_ = deopt_id; |
| 5751 } | 5751 } |
| 5752 | 5752 |
| 5753 Value* left() const { return inputs_[0]; } | 5753 Value* left() const { return inputs_[0]; } |
| 5754 Value* right() const { return inputs_[1]; } | 5754 Value* right() const { return inputs_[1]; } |
| 5755 | 5755 |
| 5756 Token::Kind op_kind() const { return op_kind_; } | 5756 Token::Kind op_kind() const { return op_kind_; } |
| 5757 | 5757 |
| 5758 virtual void PrintOperandsTo(BufferFormatter* f) const; | 5758 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 5759 | 5759 |
| 5760 virtual bool CanDeoptimize() const { return true; } | 5760 virtual bool CanDeoptimize() const { return true; } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 5789 | 5789 |
| 5790 private: | 5790 private: |
| 5791 const Token::Kind op_kind_; | 5791 const Token::Kind op_kind_; |
| 5792 | 5792 |
| 5793 DISALLOW_COPY_AND_ASSIGN(ShiftMintOpInstr); | 5793 DISALLOW_COPY_AND_ASSIGN(ShiftMintOpInstr); |
| 5794 }; | 5794 }; |
| 5795 | 5795 |
| 5796 | 5796 |
| 5797 class UnaryMintOpInstr : public TemplateDefinition<1> { | 5797 class UnaryMintOpInstr : public TemplateDefinition<1> { |
| 5798 public: | 5798 public: |
| 5799 UnaryMintOpInstr(Token::Kind op_kind, | 5799 UnaryMintOpInstr(Token::Kind op_kind, Value* value, intptr_t deopt_id) |
| 5800 Value* value, | |
| 5801 InstanceCallInstr* instance_call) | |
| 5802 : op_kind_(op_kind) { | 5800 : op_kind_(op_kind) { |
| 5803 ASSERT(op_kind == Token::kBIT_NOT); | 5801 ASSERT(op_kind == Token::kBIT_NOT); |
| 5804 SetInputAt(0, value); | 5802 SetInputAt(0, value); |
| 5805 deopt_id_ = instance_call->deopt_id(); | 5803 // Override generated deopt-id. |
| 5804 deopt_id_ = deopt_id; |
| 5806 } | 5805 } |
| 5807 | 5806 |
| 5808 Value* value() const { return inputs_[0]; } | 5807 Value* value() const { return inputs_[0]; } |
| 5809 | 5808 |
| 5810 Token::Kind op_kind() const { return op_kind_; } | 5809 Token::Kind op_kind() const { return op_kind_; } |
| 5811 | 5810 |
| 5812 virtual void PrintOperandsTo(BufferFormatter* f) const; | 5811 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 5813 | 5812 |
| 5814 virtual bool CanDeoptimize() const { return false; } | 5813 virtual bool CanDeoptimize() const { return false; } |
| 5815 | 5814 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 5843 private: | 5842 private: |
| 5844 const Token::Kind op_kind_; | 5843 const Token::Kind op_kind_; |
| 5845 | 5844 |
| 5846 DISALLOW_COPY_AND_ASSIGN(UnaryMintOpInstr); | 5845 DISALLOW_COPY_AND_ASSIGN(UnaryMintOpInstr); |
| 5847 }; | 5846 }; |
| 5848 | 5847 |
| 5849 | 5848 |
| 5850 class BinarySmiOpInstr : public TemplateDefinition<2> { | 5849 class BinarySmiOpInstr : public TemplateDefinition<2> { |
| 5851 public: | 5850 public: |
| 5852 BinarySmiOpInstr(Token::Kind op_kind, | 5851 BinarySmiOpInstr(Token::Kind op_kind, |
| 5853 InstanceCallInstr* instance_call, | |
| 5854 Value* left, | 5852 Value* left, |
| 5855 Value* right) | 5853 Value* right, |
| 5854 intptr_t deopt_id) |
| 5856 : op_kind_(op_kind), | 5855 : op_kind_(op_kind), |
| 5857 instance_call_(instance_call), | |
| 5858 overflow_(true), | 5856 overflow_(true), |
| 5859 is_truncating_(false) { | 5857 is_truncating_(false) { |
| 5860 SetInputAt(0, left); | 5858 SetInputAt(0, left); |
| 5861 SetInputAt(1, right); | 5859 SetInputAt(1, right); |
| 5862 deopt_id_ = instance_call->deopt_id(); | 5860 // Override generated deopt-id. |
| 5861 deopt_id_ = deopt_id; |
| 5863 } | 5862 } |
| 5864 | 5863 |
| 5865 Value* left() const { return inputs_[0]; } | 5864 Value* left() const { return inputs_[0]; } |
| 5866 Value* right() const { return inputs_[1]; } | 5865 Value* right() const { return inputs_[1]; } |
| 5867 | 5866 |
| 5868 Token::Kind op_kind() const { return op_kind_; } | 5867 Token::Kind op_kind() const { return op_kind_; } |
| 5869 | 5868 |
| 5870 InstanceCallInstr* instance_call() const { return instance_call_; } | |
| 5871 | |
| 5872 const ICData* ic_data() const { return instance_call()->ic_data(); } | |
| 5873 | |
| 5874 void set_overflow(bool overflow) { overflow_ = overflow; } | 5869 void set_overflow(bool overflow) { overflow_ = overflow; } |
| 5875 | 5870 |
| 5876 void set_is_truncating(bool value) { is_truncating_ = value; } | 5871 void set_is_truncating(bool value) { is_truncating_ = value; } |
| 5877 bool is_truncating() const { return is_truncating_; } | 5872 bool is_truncating() const { return is_truncating_; } |
| 5878 | 5873 |
| 5879 virtual void PrintOperandsTo(BufferFormatter* f) const; | 5874 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 5880 | 5875 |
| 5881 DECLARE_INSTRUCTION(BinarySmiOp) | 5876 DECLARE_INSTRUCTION(BinarySmiOp) |
| 5882 virtual CompileType ComputeType() const; | 5877 virtual CompileType ComputeType() const; |
| 5883 | 5878 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 5895 virtual Definition* Canonicalize(FlowGraph* flow_graph); | 5890 virtual Definition* Canonicalize(FlowGraph* flow_graph); |
| 5896 | 5891 |
| 5897 // Returns true if right is a non-zero Smi constant which absolute value is | 5892 // Returns true if right is a non-zero Smi constant which absolute value is |
| 5898 // a power of two. | 5893 // a power of two. |
| 5899 bool RightIsPowerOfTwoConstant() const; | 5894 bool RightIsPowerOfTwoConstant() const; |
| 5900 | 5895 |
| 5901 virtual bool MayThrow() const { return false; } | 5896 virtual bool MayThrow() const { return false; } |
| 5902 | 5897 |
| 5903 private: | 5898 private: |
| 5904 const Token::Kind op_kind_; | 5899 const Token::Kind op_kind_; |
| 5905 InstanceCallInstr* instance_call_; | |
| 5906 bool overflow_; | 5900 bool overflow_; |
| 5907 bool is_truncating_; | 5901 bool is_truncating_; |
| 5908 | 5902 |
| 5909 DISALLOW_COPY_AND_ASSIGN(BinarySmiOpInstr); | 5903 DISALLOW_COPY_AND_ASSIGN(BinarySmiOpInstr); |
| 5910 }; | 5904 }; |
| 5911 | 5905 |
| 5912 | 5906 |
| 5913 // Handles both Smi operations: BIT_OR and NEGATE. | 5907 // Handles both Smi operations: BIT_OR and NEGATE. |
| 5914 class UnarySmiOpInstr : public TemplateDefinition<1> { | 5908 class UnarySmiOpInstr : public TemplateDefinition<1> { |
| 5915 public: | 5909 public: |
| 5916 UnarySmiOpInstr(Token::Kind op_kind, | 5910 UnarySmiOpInstr(Token::Kind op_kind, |
| 5917 InstanceCallInstr* instance_call, | 5911 Value* value, |
| 5918 Value* value) | 5912 intptr_t deopt_id) |
| 5919 : op_kind_(op_kind) { | 5913 : op_kind_(op_kind) { |
| 5920 ASSERT((op_kind == Token::kNEGATE) || (op_kind == Token::kBIT_NOT)); | 5914 ASSERT((op_kind == Token::kNEGATE) || (op_kind == Token::kBIT_NOT)); |
| 5921 SetInputAt(0, value); | 5915 SetInputAt(0, value); |
| 5922 deopt_id_ = instance_call->deopt_id(); | 5916 // Override generated deopt-id. |
| 5917 deopt_id_ = deopt_id; |
| 5923 } | 5918 } |
| 5924 | 5919 |
| 5925 Value* value() const { return inputs_[0]; } | 5920 Value* value() const { return inputs_[0]; } |
| 5926 Token::Kind op_kind() const { return op_kind_; } | 5921 Token::Kind op_kind() const { return op_kind_; } |
| 5927 | 5922 |
| 5928 virtual void PrintOperandsTo(BufferFormatter* f) const; | 5923 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 5929 | 5924 |
| 5930 DECLARE_INSTRUCTION(UnarySmiOp) | 5925 DECLARE_INSTRUCTION(UnarySmiOp) |
| 5931 virtual CompileType ComputeType() const; | 5926 virtual CompileType ComputeType() const; |
| 5932 | 5927 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6034 InstanceCallInstr* instance_call_; | 6029 InstanceCallInstr* instance_call_; |
| 6035 | 6030 |
| 6036 DISALLOW_COPY_AND_ASSIGN(DoubleToIntegerInstr); | 6031 DISALLOW_COPY_AND_ASSIGN(DoubleToIntegerInstr); |
| 6037 }; | 6032 }; |
| 6038 | 6033 |
| 6039 | 6034 |
| 6040 // Similar to 'DoubleToIntegerInstr' but expects unboxed double as input | 6035 // Similar to 'DoubleToIntegerInstr' but expects unboxed double as input |
| 6041 // and creates a Smi. | 6036 // and creates a Smi. |
| 6042 class DoubleToSmiInstr : public TemplateDefinition<1> { | 6037 class DoubleToSmiInstr : public TemplateDefinition<1> { |
| 6043 public: | 6038 public: |
| 6044 DoubleToSmiInstr(Value* value, InstanceCallInstr* instance_call) { | 6039 DoubleToSmiInstr(Value* value, intptr_t deopt_id) { |
| 6045 SetInputAt(0, value); | 6040 SetInputAt(0, value); |
| 6046 deopt_id_ = instance_call->deopt_id(); | 6041 // Override generated deopt-id. |
| 6042 deopt_id_ = deopt_id; |
| 6047 } | 6043 } |
| 6048 | 6044 |
| 6049 Value* value() const { return inputs_[0]; } | 6045 Value* value() const { return inputs_[0]; } |
| 6050 | 6046 |
| 6051 DECLARE_INSTRUCTION(DoubleToSmi) | 6047 DECLARE_INSTRUCTION(DoubleToSmi) |
| 6052 virtual CompileType ComputeType() const; | 6048 virtual CompileType ComputeType() const; |
| 6053 | 6049 |
| 6054 virtual bool CanDeoptimize() const { return true; } | 6050 virtual bool CanDeoptimize() const { return true; } |
| 6055 | 6051 |
| 6056 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 6052 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 6057 ASSERT(idx == 0); | 6053 ASSERT(idx == 0); |
| 6058 return kUnboxedDouble; | 6054 return kUnboxedDouble; |
| 6059 } | 6055 } |
| 6060 | 6056 |
| 6061 virtual intptr_t DeoptimizationTarget() const { return deopt_id_; } | 6057 virtual intptr_t DeoptimizationTarget() const { return deopt_id_; } |
| 6062 | 6058 |
| 6063 virtual EffectSet Effects() const { return EffectSet::None(); } | 6059 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 6064 | 6060 |
| 6065 virtual bool MayThrow() const { return false; } | 6061 virtual bool MayThrow() const { return false; } |
| 6066 | 6062 |
| 6067 private: | 6063 private: |
| 6068 DISALLOW_COPY_AND_ASSIGN(DoubleToSmiInstr); | 6064 DISALLOW_COPY_AND_ASSIGN(DoubleToSmiInstr); |
| 6069 }; | 6065 }; |
| 6070 | 6066 |
| 6071 | 6067 |
| 6072 class DoubleToDoubleInstr : public TemplateDefinition<1> { | 6068 class DoubleToDoubleInstr : public TemplateDefinition<1> { |
| 6073 public: | 6069 public: |
| 6074 DoubleToDoubleInstr(Value* value, | 6070 DoubleToDoubleInstr(Value* value, |
| 6075 InstanceCallInstr* instance_call, | 6071 MethodRecognizer::Kind recognized_kind, |
| 6076 MethodRecognizer::Kind recognized_kind) | 6072 intptr_t deopt_id) |
| 6077 : recognized_kind_(recognized_kind) { | 6073 : recognized_kind_(recognized_kind) { |
| 6078 SetInputAt(0, value); | 6074 SetInputAt(0, value); |
| 6079 deopt_id_ = instance_call->deopt_id(); | 6075 // Override generated deopt-id. |
| 6076 deopt_id_ = deopt_id; |
| 6080 } | 6077 } |
| 6081 | 6078 |
| 6082 Value* value() const { return inputs_[0]; } | 6079 Value* value() const { return inputs_[0]; } |
| 6083 | 6080 |
| 6084 MethodRecognizer::Kind recognized_kind() const { return recognized_kind_; } | 6081 MethodRecognizer::Kind recognized_kind() const { return recognized_kind_; } |
| 6085 | 6082 |
| 6086 DECLARE_INSTRUCTION(DoubleToDouble) | 6083 DECLARE_INSTRUCTION(DoubleToDouble) |
| 6087 virtual CompileType ComputeType() const; | 6084 virtual CompileType ComputeType() const; |
| 6088 | 6085 |
| 6089 virtual bool CanDeoptimize() const { return false; } | 6086 virtual bool CanDeoptimize() const { return false; } |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6251 | 6248 |
| 6252 virtual bool MayThrow() const { return false; } | 6249 virtual bool MayThrow() const { return false; } |
| 6253 | 6250 |
| 6254 private: | 6251 private: |
| 6255 DISALLOW_COPY_AND_ASSIGN(CheckSmiInstr); | 6252 DISALLOW_COPY_AND_ASSIGN(CheckSmiInstr); |
| 6256 }; | 6253 }; |
| 6257 | 6254 |
| 6258 | 6255 |
| 6259 class CheckArrayBoundInstr : public TemplateInstruction<2> { | 6256 class CheckArrayBoundInstr : public TemplateInstruction<2> { |
| 6260 public: | 6257 public: |
| 6261 CheckArrayBoundInstr(Value* length, | 6258 CheckArrayBoundInstr(Value* length, Value* index, intptr_t deopt_id) { |
| 6262 Value* index, | |
| 6263 InstanceCallInstr* instance_call) { | |
| 6264 SetInputAt(kLengthPos, length); | 6259 SetInputAt(kLengthPos, length); |
| 6265 SetInputAt(kIndexPos, index); | 6260 SetInputAt(kIndexPos, index); |
| 6266 deopt_id_ = instance_call->deopt_id(); | 6261 // Override generated deopt-id. |
| 6262 deopt_id_ = deopt_id; |
| 6267 } | 6263 } |
| 6268 | 6264 |
| 6269 Value* length() const { return inputs_[kLengthPos]; } | 6265 Value* length() const { return inputs_[kLengthPos]; } |
| 6270 Value* index() const { return inputs_[kIndexPos]; } | 6266 Value* index() const { return inputs_[kIndexPos]; } |
| 6271 | 6267 |
| 6272 DECLARE_INSTRUCTION(CheckArrayBound) | 6268 DECLARE_INSTRUCTION(CheckArrayBound) |
| 6273 | 6269 |
| 6274 virtual intptr_t ArgumentCount() const { return 0; } | 6270 virtual intptr_t ArgumentCount() const { return 0; } |
| 6275 | 6271 |
| 6276 virtual bool CanDeoptimize() const { return true; } | 6272 virtual bool CanDeoptimize() const { return true; } |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6519 ForwardInstructionIterator* current_iterator_; | 6515 ForwardInstructionIterator* current_iterator_; |
| 6520 | 6516 |
| 6521 private: | 6517 private: |
| 6522 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 6518 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 6523 }; | 6519 }; |
| 6524 | 6520 |
| 6525 | 6521 |
| 6526 } // namespace dart | 6522 } // namespace dart |
| 6527 | 6523 |
| 6528 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 6524 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |