| 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 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 virtual Representation RequiredInputRepresentation(int index) const { | 851 virtual Representation RequiredInputRepresentation(int index) const { |
| 852 return Representation::None(); | 852 return Representation::None(); |
| 853 } | 853 } |
| 854 | 854 |
| 855 DECLARE_CONCRETE_INSTRUCTION(SoftDeoptimize) | 855 DECLARE_CONCRETE_INSTRUCTION(SoftDeoptimize) |
| 856 }; | 856 }; |
| 857 | 857 |
| 858 | 858 |
| 859 class HDeoptimize: public HControlInstruction { | 859 class HDeoptimize: public HControlInstruction { |
| 860 public: | 860 public: |
| 861 explicit HDeoptimize(int environment_length) : values_(environment_length) { } | 861 explicit HDeoptimize(int environment_length) |
| 862 : values_(ZONE, environment_length) { } |
| 862 | 863 |
| 863 virtual Representation RequiredInputRepresentation(int index) const { | 864 virtual Representation RequiredInputRepresentation(int index) const { |
| 864 return Representation::None(); | 865 return Representation::None(); |
| 865 } | 866 } |
| 866 | 867 |
| 867 virtual int OperandCount() { return values_.length(); } | 868 virtual int OperandCount() { return values_.length(); } |
| 868 virtual HValue* OperandAt(int index) { return values_[index]; } | 869 virtual HValue* OperandAt(int index) { return values_[index]; } |
| 869 virtual void PrintDataTo(StringStream* stream); | 870 virtual void PrintDataTo(StringStream* stream); |
| 870 | 871 |
| 871 virtual int SuccessorCount() { return 0; } | 872 virtual int SuccessorCount() { return 0; } |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1168 protected: | 1169 protected: |
| 1169 virtual bool DataEquals(HValue* other) { return true; } | 1170 virtual bool DataEquals(HValue* other) { return true; } |
| 1170 }; | 1171 }; |
| 1171 | 1172 |
| 1172 | 1173 |
| 1173 class HSimulate: public HInstruction { | 1174 class HSimulate: public HInstruction { |
| 1174 public: | 1175 public: |
| 1175 HSimulate(int ast_id, int pop_count) | 1176 HSimulate(int ast_id, int pop_count) |
| 1176 : ast_id_(ast_id), | 1177 : ast_id_(ast_id), |
| 1177 pop_count_(pop_count), | 1178 pop_count_(pop_count), |
| 1178 values_(2), | 1179 values_(ZONE, 2), |
| 1179 assigned_indexes_(2) {} | 1180 assigned_indexes_(ZONE, 2) {} |
| 1180 virtual ~HSimulate() {} | 1181 virtual ~HSimulate() {} |
| 1181 | 1182 |
| 1182 virtual void PrintDataTo(StringStream* stream); | 1183 virtual void PrintDataTo(StringStream* stream); |
| 1183 | 1184 |
| 1184 bool HasAstId() const { return ast_id_ != AstNode::kNoNumber; } | 1185 bool HasAstId() const { return ast_id_ != AstNode::kNoNumber; } |
| 1185 int ast_id() const { return ast_id_; } | 1186 int ast_id() const { return ast_id_; } |
| 1186 void set_ast_id(int id) { | 1187 void set_ast_id(int id) { |
| 1187 ASSERT(!HasAstId()); | 1188 ASSERT(!HasAstId()); |
| 1188 ast_id_ = id; | 1189 ast_id_ = id; |
| 1189 } | 1190 } |
| (...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2114 DECLARE_CONCRETE_INSTRUCTION(CheckSmi) | 2115 DECLARE_CONCRETE_INSTRUCTION(CheckSmi) |
| 2115 | 2116 |
| 2116 protected: | 2117 protected: |
| 2117 virtual bool DataEquals(HValue* other) { return true; } | 2118 virtual bool DataEquals(HValue* other) { return true; } |
| 2118 }; | 2119 }; |
| 2119 | 2120 |
| 2120 | 2121 |
| 2121 class HPhi: public HValue { | 2122 class HPhi: public HValue { |
| 2122 public: | 2123 public: |
| 2123 explicit HPhi(int merged_index) | 2124 explicit HPhi(int merged_index) |
| 2124 : inputs_(2), | 2125 : inputs_(ZONE, 2), |
| 2125 merged_index_(merged_index), | 2126 merged_index_(merged_index), |
| 2126 phi_id_(-1), | 2127 phi_id_(-1), |
| 2127 is_live_(false), | 2128 is_live_(false), |
| 2128 is_convertible_to_integer_(true) { | 2129 is_convertible_to_integer_(true) { |
| 2129 for (int i = 0; i < Representation::kNumRepresentations; i++) { | 2130 for (int i = 0; i < Representation::kNumRepresentations; i++) { |
| 2130 non_phi_uses_[i] = 0; | 2131 non_phi_uses_[i] = 0; |
| 2131 indirect_uses_[i] = 0; | 2132 indirect_uses_[i] = 0; |
| 2132 } | 2133 } |
| 2133 ASSERT(merged_index >= 0); | 2134 ASSERT(merged_index >= 0); |
| 2134 set_representation(Representation::Tagged()); | 2135 set_representation(Representation::Tagged()); |
| (...skipping 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4125 | 4126 |
| 4126 DECLARE_CONCRETE_INSTRUCTION(In) | 4127 DECLARE_CONCRETE_INSTRUCTION(In) |
| 4127 }; | 4128 }; |
| 4128 | 4129 |
| 4129 #undef DECLARE_INSTRUCTION | 4130 #undef DECLARE_INSTRUCTION |
| 4130 #undef DECLARE_CONCRETE_INSTRUCTION | 4131 #undef DECLARE_CONCRETE_INSTRUCTION |
| 4131 | 4132 |
| 4132 } } // namespace v8::internal | 4133 } } // namespace v8::internal |
| 4133 | 4134 |
| 4134 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4135 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |