| 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 1960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1971 static HCheckInstanceType* NewIsJSArray(HValue* value) { | 1971 static HCheckInstanceType* NewIsJSArray(HValue* value) { |
| 1972 return new HCheckInstanceType(value, IS_JS_ARRAY); | 1972 return new HCheckInstanceType(value, IS_JS_ARRAY); |
| 1973 } | 1973 } |
| 1974 static HCheckInstanceType* NewIsString(HValue* value) { | 1974 static HCheckInstanceType* NewIsString(HValue* value) { |
| 1975 return new HCheckInstanceType(value, IS_STRING); | 1975 return new HCheckInstanceType(value, IS_STRING); |
| 1976 } | 1976 } |
| 1977 static HCheckInstanceType* NewIsSymbol(HValue* value) { | 1977 static HCheckInstanceType* NewIsSymbol(HValue* value) { |
| 1978 return new HCheckInstanceType(value, IS_SYMBOL); | 1978 return new HCheckInstanceType(value, IS_SYMBOL); |
| 1979 } | 1979 } |
| 1980 | 1980 |
| 1981 virtual void PrintDataTo(StringStream* stream); |
| 1982 |
| 1981 virtual Representation RequiredInputRepresentation(int index) const { | 1983 virtual Representation RequiredInputRepresentation(int index) const { |
| 1982 return Representation::Tagged(); | 1984 return Representation::Tagged(); |
| 1983 } | 1985 } |
| 1984 | 1986 |
| 1985 virtual HValue* Canonicalize(); | 1987 virtual HValue* Canonicalize(); |
| 1986 | 1988 |
| 1987 bool is_interval_check() const { return check_ <= LAST_INTERVAL_CHECK; } | 1989 bool is_interval_check() const { return check_ <= LAST_INTERVAL_CHECK; } |
| 1988 void GetCheckInterval(InstanceType* first, InstanceType* last); | 1990 void GetCheckInterval(InstanceType* first, InstanceType* last); |
| 1989 void GetCheckMaskAndTag(uint8_t* mask, uint8_t* tag); | 1991 void GetCheckMaskAndTag(uint8_t* mask, uint8_t* tag); |
| 1990 | 1992 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 2001 | 2003 |
| 2002 private: | 2004 private: |
| 2003 enum Check { | 2005 enum Check { |
| 2004 IS_SPEC_OBJECT, | 2006 IS_SPEC_OBJECT, |
| 2005 IS_JS_ARRAY, | 2007 IS_JS_ARRAY, |
| 2006 IS_STRING, | 2008 IS_STRING, |
| 2007 IS_SYMBOL, | 2009 IS_SYMBOL, |
| 2008 LAST_INTERVAL_CHECK = IS_JS_ARRAY | 2010 LAST_INTERVAL_CHECK = IS_JS_ARRAY |
| 2009 }; | 2011 }; |
| 2010 | 2012 |
| 2013 const char* GetCheckName(); |
| 2014 |
| 2011 HCheckInstanceType(HValue* value, Check check) | 2015 HCheckInstanceType(HValue* value, Check check) |
| 2012 : HUnaryOperation(value), check_(check) { | 2016 : HUnaryOperation(value), check_(check) { |
| 2013 set_representation(Representation::Tagged()); | 2017 set_representation(Representation::Tagged()); |
| 2014 SetFlag(kUseGVN); | 2018 SetFlag(kUseGVN); |
| 2015 } | 2019 } |
| 2016 | 2020 |
| 2017 const Check check_; | 2021 const Check check_; |
| 2018 }; | 2022 }; |
| 2019 | 2023 |
| 2020 | 2024 |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2616 class HCompareObjectEqAndBranch: public HTemplateControlInstruction<2, 2> { | 2620 class HCompareObjectEqAndBranch: public HTemplateControlInstruction<2, 2> { |
| 2617 public: | 2621 public: |
| 2618 HCompareObjectEqAndBranch(HValue* left, HValue* right) { | 2622 HCompareObjectEqAndBranch(HValue* left, HValue* right) { |
| 2619 SetOperandAt(0, left); | 2623 SetOperandAt(0, left); |
| 2620 SetOperandAt(1, right); | 2624 SetOperandAt(1, right); |
| 2621 } | 2625 } |
| 2622 | 2626 |
| 2623 HValue* left() { return OperandAt(0); } | 2627 HValue* left() { return OperandAt(0); } |
| 2624 HValue* right() { return OperandAt(1); } | 2628 HValue* right() { return OperandAt(1); } |
| 2625 | 2629 |
| 2630 virtual void PrintDataTo(StringStream* stream); |
| 2631 |
| 2626 virtual Representation RequiredInputRepresentation(int index) const { | 2632 virtual Representation RequiredInputRepresentation(int index) const { |
| 2627 return Representation::Tagged(); | 2633 return Representation::Tagged(); |
| 2628 } | 2634 } |
| 2629 | 2635 |
| 2630 DECLARE_CONCRETE_INSTRUCTION(CompareObjectEqAndBranch) | 2636 DECLARE_CONCRETE_INSTRUCTION(CompareObjectEqAndBranch) |
| 2631 }; | 2637 }; |
| 2632 | 2638 |
| 2633 | 2639 |
| 2634 class HCompareConstantEqAndBranch: public HUnaryControlInstruction { | 2640 class HCompareConstantEqAndBranch: public HUnaryControlInstruction { |
| 2635 public: | 2641 public: |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2655 | 2661 |
| 2656 | 2662 |
| 2657 class HIsNilAndBranch: public HUnaryControlInstruction { | 2663 class HIsNilAndBranch: public HUnaryControlInstruction { |
| 2658 public: | 2664 public: |
| 2659 HIsNilAndBranch(HValue* value, EqualityKind kind, NilValue nil) | 2665 HIsNilAndBranch(HValue* value, EqualityKind kind, NilValue nil) |
| 2660 : HUnaryControlInstruction(value, NULL, NULL), kind_(kind), nil_(nil) { } | 2666 : HUnaryControlInstruction(value, NULL, NULL), kind_(kind), nil_(nil) { } |
| 2661 | 2667 |
| 2662 EqualityKind kind() const { return kind_; } | 2668 EqualityKind kind() const { return kind_; } |
| 2663 NilValue nil() const { return nil_; } | 2669 NilValue nil() const { return nil_; } |
| 2664 | 2670 |
| 2671 virtual void PrintDataTo(StringStream* stream); |
| 2672 |
| 2665 virtual Representation RequiredInputRepresentation(int index) const { | 2673 virtual Representation RequiredInputRepresentation(int index) const { |
| 2666 return Representation::Tagged(); | 2674 return Representation::Tagged(); |
| 2667 } | 2675 } |
| 2668 | 2676 |
| 2669 DECLARE_CONCRETE_INSTRUCTION(IsNilAndBranch) | 2677 DECLARE_CONCRETE_INSTRUCTION(IsNilAndBranch) |
| 2670 | 2678 |
| 2671 private: | 2679 private: |
| 2672 EqualityKind kind_; | 2680 EqualityKind kind_; |
| 2673 NilValue nil_; | 2681 NilValue nil_; |
| 2674 }; | 2682 }; |
| (...skipping 1447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4122 public: | 4130 public: |
| 4123 explicit HTypeof(HValue* context, HValue* value) { | 4131 explicit HTypeof(HValue* context, HValue* value) { |
| 4124 SetOperandAt(0, context); | 4132 SetOperandAt(0, context); |
| 4125 SetOperandAt(1, value); | 4133 SetOperandAt(1, value); |
| 4126 set_representation(Representation::Tagged()); | 4134 set_representation(Representation::Tagged()); |
| 4127 } | 4135 } |
| 4128 | 4136 |
| 4129 HValue* context() { return OperandAt(0); } | 4137 HValue* context() { return OperandAt(0); } |
| 4130 HValue* value() { return OperandAt(1); } | 4138 HValue* value() { return OperandAt(1); } |
| 4131 | 4139 |
| 4140 virtual void PrintDataTo(StringStream* stream); |
| 4141 |
| 4132 virtual Representation RequiredInputRepresentation(int index) const { | 4142 virtual Representation RequiredInputRepresentation(int index) const { |
| 4133 return Representation::Tagged(); | 4143 return Representation::Tagged(); |
| 4134 } | 4144 } |
| 4135 | 4145 |
| 4136 DECLARE_CONCRETE_INSTRUCTION(Typeof) | 4146 DECLARE_CONCRETE_INSTRUCTION(Typeof) |
| 4137 }; | 4147 }; |
| 4138 | 4148 |
| 4139 | 4149 |
| 4140 class HToFastProperties: public HUnaryOperation { | 4150 class HToFastProperties: public HUnaryOperation { |
| 4141 public: | 4151 public: |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4216 | 4226 |
| 4217 DECLARE_CONCRETE_INSTRUCTION(In) | 4227 DECLARE_CONCRETE_INSTRUCTION(In) |
| 4218 }; | 4228 }; |
| 4219 | 4229 |
| 4220 #undef DECLARE_INSTRUCTION | 4230 #undef DECLARE_INSTRUCTION |
| 4221 #undef DECLARE_CONCRETE_INSTRUCTION | 4231 #undef DECLARE_CONCRETE_INSTRUCTION |
| 4222 | 4232 |
| 4223 } } // namespace v8::internal | 4233 } } // namespace v8::internal |
| 4224 | 4234 |
| 4225 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4235 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |