OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2782 SetOperandAt(1, left); | 2782 SetOperandAt(1, left); |
2783 SetOperandAt(2, right); | 2783 SetOperandAt(2, right); |
2784 set_representation(Representation::Tagged()); | 2784 set_representation(Representation::Tagged()); |
2785 SetAllSideEffects(); | 2785 SetAllSideEffects(); |
2786 } | 2786 } |
2787 | 2787 |
2788 HValue* context() { return OperandAt(0); } | 2788 HValue* context() { return OperandAt(0); } |
2789 HValue* left() { return OperandAt(1); } | 2789 HValue* left() { return OperandAt(1); } |
2790 HValue* right() { return OperandAt(2); } | 2790 HValue* right() { return OperandAt(2); } |
2791 | 2791 |
2792 virtual bool EmitAtUses() { | |
2793 return !HasSideEffects() && !HasMultipleUses(); | |
2794 } | |
2795 | |
2796 virtual Representation RequiredInputRepresentation(int index) const { | 2792 virtual Representation RequiredInputRepresentation(int index) const { |
2797 return Representation::Tagged(); | 2793 return Representation::Tagged(); |
2798 } | 2794 } |
2799 | 2795 |
| 2796 virtual HType CalculateInferredType(); |
| 2797 |
2800 virtual void PrintDataTo(StringStream* stream); | 2798 virtual void PrintDataTo(StringStream* stream); |
2801 | 2799 |
2802 DECLARE_CONCRETE_INSTRUCTION(InstanceOf) | 2800 DECLARE_CONCRETE_INSTRUCTION(InstanceOf) |
2803 }; | 2801 }; |
2804 | 2802 |
2805 | 2803 |
2806 class HInstanceOfKnownGlobal: public HUnaryOperation { | 2804 class HInstanceOfKnownGlobal: public HUnaryOperation { |
2807 public: | 2805 public: |
2808 HInstanceOfKnownGlobal(HValue* left, Handle<JSFunction> right) | 2806 HInstanceOfKnownGlobal(HValue* left, Handle<JSFunction> right) |
2809 : HUnaryOperation(left), function_(right) { | 2807 : HUnaryOperation(left), function_(right) { |
2810 set_representation(Representation::Tagged()); | 2808 set_representation(Representation::Tagged()); |
2811 SetAllSideEffects(); | 2809 SetAllSideEffects(); |
2812 } | 2810 } |
2813 | 2811 |
2814 Handle<JSFunction> function() { return function_; } | 2812 Handle<JSFunction> function() { return function_; } |
2815 | 2813 |
2816 virtual Representation RequiredInputRepresentation(int index) const { | 2814 virtual Representation RequiredInputRepresentation(int index) const { |
2817 return Representation::Tagged(); | 2815 return Representation::Tagged(); |
2818 } | 2816 } |
2819 | 2817 |
| 2818 virtual HType CalculateInferredType(); |
| 2819 |
2820 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal) | 2820 DECLARE_CONCRETE_INSTRUCTION(InstanceOfKnownGlobal) |
2821 | 2821 |
2822 private: | 2822 private: |
2823 Handle<JSFunction> function_; | 2823 Handle<JSFunction> function_; |
2824 }; | 2824 }; |
2825 | 2825 |
2826 | 2826 |
2827 class HPower: public HBinaryOperation { | 2827 class HPower: public HBinaryOperation { |
2828 public: | 2828 public: |
2829 HPower(HValue* left, HValue* right) | 2829 HPower(HValue* left, HValue* right) |
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3998 HDeleteProperty(HValue* obj, HValue* key) | 3998 HDeleteProperty(HValue* obj, HValue* key) |
3999 : HBinaryOperation(obj, key) { | 3999 : HBinaryOperation(obj, key) { |
4000 set_representation(Representation::Tagged()); | 4000 set_representation(Representation::Tagged()); |
4001 SetAllSideEffects(); | 4001 SetAllSideEffects(); |
4002 } | 4002 } |
4003 | 4003 |
4004 virtual Representation RequiredInputRepresentation(int index) const { | 4004 virtual Representation RequiredInputRepresentation(int index) const { |
4005 return Representation::Tagged(); | 4005 return Representation::Tagged(); |
4006 } | 4006 } |
4007 | 4007 |
| 4008 virtual HType CalculateInferredType(); |
| 4009 |
4008 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty) | 4010 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty) |
4009 | 4011 |
4010 HValue* object() { return left(); } | 4012 HValue* object() { return left(); } |
4011 HValue* key() { return right(); } | 4013 HValue* key() { return right(); } |
4012 }; | 4014 }; |
4013 | 4015 |
4014 | 4016 |
4015 class HIn: public HTemplateInstruction<2> { | 4017 class HIn: public HTemplateInstruction<2> { |
4016 public: | 4018 public: |
4017 HIn(HValue* key, HValue* object) { | 4019 HIn(HValue* key, HValue* object) { |
(...skipping 18 matching lines...) Expand all Loading... |
4036 | 4038 |
4037 DECLARE_CONCRETE_INSTRUCTION(In) | 4039 DECLARE_CONCRETE_INSTRUCTION(In) |
4038 }; | 4040 }; |
4039 | 4041 |
4040 #undef DECLARE_INSTRUCTION | 4042 #undef DECLARE_INSTRUCTION |
4041 #undef DECLARE_CONCRETE_INSTRUCTION | 4043 #undef DECLARE_CONCRETE_INSTRUCTION |
4042 | 4044 |
4043 } } // namespace v8::internal | 4045 } } // namespace v8::internal |
4044 | 4046 |
4045 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4047 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |