| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 V(Simulate) \ | 144 V(Simulate) \ |
| 145 V(StackCheck) \ | 145 V(StackCheck) \ |
| 146 V(StoreContextSlot) \ | 146 V(StoreContextSlot) \ |
| 147 V(StoreGlobal) \ | 147 V(StoreGlobal) \ |
| 148 V(StoreKeyedFastElement) \ | 148 V(StoreKeyedFastElement) \ |
| 149 V(StorePixelArrayElement) \ | 149 V(StorePixelArrayElement) \ |
| 150 V(StoreKeyedGeneric) \ | 150 V(StoreKeyedGeneric) \ |
| 151 V(StoreNamedField) \ | 151 V(StoreNamedField) \ |
| 152 V(StoreNamedGeneric) \ | 152 V(StoreNamedGeneric) \ |
| 153 V(StringCharCodeAt) \ | 153 V(StringCharCodeAt) \ |
| 154 V(StringCharFromCode) \ |
| 154 V(StringLength) \ | 155 V(StringLength) \ |
| 155 V(Sub) \ | 156 V(Sub) \ |
| 156 V(Test) \ | 157 V(Test) \ |
| 157 V(Throw) \ | 158 V(Throw) \ |
| 158 V(Typeof) \ | 159 V(Typeof) \ |
| 159 V(TypeofIs) \ | 160 V(TypeofIs) \ |
| 160 V(UnaryMathOperation) \ | 161 V(UnaryMathOperation) \ |
| 161 V(UnknownOSRValue) \ | 162 V(UnknownOSRValue) \ |
| 162 V(ValueOf) | 163 V(ValueOf) |
| 163 | 164 |
| (...skipping 3087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3251 | 3252 |
| 3252 protected: | 3253 protected: |
| 3253 virtual bool DataEquals(HValue* other) { return true; } | 3254 virtual bool DataEquals(HValue* other) { return true; } |
| 3254 | 3255 |
| 3255 virtual Range* InferRange() { | 3256 virtual Range* InferRange() { |
| 3256 return new Range(0, String::kMaxUC16CharCode); | 3257 return new Range(0, String::kMaxUC16CharCode); |
| 3257 } | 3258 } |
| 3258 }; | 3259 }; |
| 3259 | 3260 |
| 3260 | 3261 |
| 3262 class HStringCharFromCode: public HUnaryOperation { |
| 3263 public: |
| 3264 explicit HStringCharFromCode(HValue* char_code) : HUnaryOperation(char_code) { |
| 3265 set_representation(Representation::Tagged()); |
| 3266 SetFlag(kUseGVN); |
| 3267 } |
| 3268 |
| 3269 virtual Representation RequiredInputRepresentation(int index) const { |
| 3270 return Representation::Integer32(); |
| 3271 } |
| 3272 |
| 3273 virtual bool DataEquals(HValue* other) { return true; } |
| 3274 |
| 3275 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string_char_from_code") |
| 3276 }; |
| 3277 |
| 3278 |
| 3261 class HStringLength: public HUnaryOperation { | 3279 class HStringLength: public HUnaryOperation { |
| 3262 public: | 3280 public: |
| 3263 explicit HStringLength(HValue* string) : HUnaryOperation(string) { | 3281 explicit HStringLength(HValue* string) : HUnaryOperation(string) { |
| 3264 set_representation(Representation::Tagged()); | 3282 set_representation(Representation::Tagged()); |
| 3265 SetFlag(kUseGVN); | 3283 SetFlag(kUseGVN); |
| 3266 } | 3284 } |
| 3267 | 3285 |
| 3268 virtual Representation RequiredInputRepresentation(int index) const { | 3286 virtual Representation RequiredInputRepresentation(int index) const { |
| 3269 return Representation::Tagged(); | 3287 return Representation::Tagged(); |
| 3270 } | 3288 } |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3451 HValue* object() { return left(); } | 3469 HValue* object() { return left(); } |
| 3452 HValue* key() { return right(); } | 3470 HValue* key() { return right(); } |
| 3453 }; | 3471 }; |
| 3454 | 3472 |
| 3455 #undef DECLARE_INSTRUCTION | 3473 #undef DECLARE_INSTRUCTION |
| 3456 #undef DECLARE_CONCRETE_INSTRUCTION | 3474 #undef DECLARE_CONCRETE_INSTRUCTION |
| 3457 | 3475 |
| 3458 } } // namespace v8::internal | 3476 } } // namespace v8::internal |
| 3459 | 3477 |
| 3460 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 3478 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |