OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2435 public: | 2435 public: |
2436 static HCheckInstanceType* NewIsSpecObject(HValue* value, Zone* zone) { | 2436 static HCheckInstanceType* NewIsSpecObject(HValue* value, Zone* zone) { |
2437 return new(zone) HCheckInstanceType(value, IS_SPEC_OBJECT); | 2437 return new(zone) HCheckInstanceType(value, IS_SPEC_OBJECT); |
2438 } | 2438 } |
2439 static HCheckInstanceType* NewIsJSArray(HValue* value, Zone* zone) { | 2439 static HCheckInstanceType* NewIsJSArray(HValue* value, Zone* zone) { |
2440 return new(zone) HCheckInstanceType(value, IS_JS_ARRAY); | 2440 return new(zone) HCheckInstanceType(value, IS_JS_ARRAY); |
2441 } | 2441 } |
2442 static HCheckInstanceType* NewIsString(HValue* value, Zone* zone) { | 2442 static HCheckInstanceType* NewIsString(HValue* value, Zone* zone) { |
2443 return new(zone) HCheckInstanceType(value, IS_STRING); | 2443 return new(zone) HCheckInstanceType(value, IS_STRING); |
2444 } | 2444 } |
2445 static HCheckInstanceType* NewIsSymbol(HValue* value, Zone* zone) { | 2445 static HCheckInstanceType* NewIsInternalizedString( |
2446 return new(zone) HCheckInstanceType(value, IS_SYMBOL); | 2446 HValue* value, Zone* zone) { |
| 2447 return new(zone) HCheckInstanceType(value, IS_INTERNALIZED_STRING); |
2447 } | 2448 } |
2448 | 2449 |
2449 virtual void PrintDataTo(StringStream* stream); | 2450 virtual void PrintDataTo(StringStream* stream); |
2450 | 2451 |
2451 virtual Representation RequiredInputRepresentation(int index) { | 2452 virtual Representation RequiredInputRepresentation(int index) { |
2452 return Representation::Tagged(); | 2453 return Representation::Tagged(); |
2453 } | 2454 } |
2454 | 2455 |
2455 virtual HValue* Canonicalize(); | 2456 virtual HValue* Canonicalize(); |
2456 | 2457 |
(...skipping 10 matching lines...) Expand all Loading... |
2467 virtual bool DataEquals(HValue* other) { | 2468 virtual bool DataEquals(HValue* other) { |
2468 HCheckInstanceType* b = HCheckInstanceType::cast(other); | 2469 HCheckInstanceType* b = HCheckInstanceType::cast(other); |
2469 return check_ == b->check_; | 2470 return check_ == b->check_; |
2470 } | 2471 } |
2471 | 2472 |
2472 private: | 2473 private: |
2473 enum Check { | 2474 enum Check { |
2474 IS_SPEC_OBJECT, | 2475 IS_SPEC_OBJECT, |
2475 IS_JS_ARRAY, | 2476 IS_JS_ARRAY, |
2476 IS_STRING, | 2477 IS_STRING, |
2477 IS_SYMBOL, | 2478 IS_INTERNALIZED_STRING, |
2478 LAST_INTERVAL_CHECK = IS_JS_ARRAY | 2479 LAST_INTERVAL_CHECK = IS_JS_ARRAY |
2479 }; | 2480 }; |
2480 | 2481 |
2481 const char* GetCheckName(); | 2482 const char* GetCheckName(); |
2482 | 2483 |
2483 HCheckInstanceType(HValue* value, Check check) | 2484 HCheckInstanceType(HValue* value, Check check) |
2484 : HUnaryOperation(value), check_(check) { | 2485 : HUnaryOperation(value), check_(check) { |
2485 set_representation(Representation::Tagged()); | 2486 set_representation(Representation::Tagged()); |
2486 SetFlag(kUseGVN); | 2487 SetFlag(kUseGVN); |
2487 } | 2488 } |
(...skipping 3255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5743 virtual bool IsDeletable() const { return true; } | 5744 virtual bool IsDeletable() const { return true; } |
5744 }; | 5745 }; |
5745 | 5746 |
5746 | 5747 |
5747 #undef DECLARE_INSTRUCTION | 5748 #undef DECLARE_INSTRUCTION |
5748 #undef DECLARE_CONCRETE_INSTRUCTION | 5749 #undef DECLARE_CONCRETE_INSTRUCTION |
5749 | 5750 |
5750 } } // namespace v8::internal | 5751 } } // namespace v8::internal |
5751 | 5752 |
5752 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 5753 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |