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 2772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2783 HValue *typecheck = NULL); | 2783 HValue *typecheck = NULL); |
2784 static HCheckMaps* New(Zone* zone, HValue* context, | 2784 static HCheckMaps* New(Zone* zone, HValue* context, |
2785 HValue* value, SmallMapList* maps, | 2785 HValue* value, SmallMapList* maps, |
2786 HValue *typecheck = NULL) { | 2786 HValue *typecheck = NULL) { |
2787 HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck); | 2787 HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck); |
2788 for (int i = 0; i < maps->length(); i++) { | 2788 for (int i = 0; i < maps->length(); i++) { |
2789 check_map->Add(maps->at(i), zone); | 2789 check_map->Add(maps->at(i), zone); |
2790 } | 2790 } |
2791 return check_map; | 2791 return check_map; |
2792 } | 2792 } |
| 2793 static HCheckMaps* New(Zone* zone, HValue* context, |
| 2794 HValue* value, UniqueSet<Map>* maps, |
| 2795 HValue *typecheck = NULL) { |
| 2796 HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck); |
| 2797 for (int i = 0; i < maps->size(); i++) { |
| 2798 check_map->Add(maps->at(i).handle(), zone); |
| 2799 } |
| 2800 return check_map; |
| 2801 } |
2793 | 2802 |
2794 bool CanOmitMapChecks() { return omit_; } | 2803 bool CanOmitMapChecks() { return omit_; } |
2795 | 2804 |
2796 virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; } | 2805 virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; } |
2797 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 2806 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
2798 return Representation::Tagged(); | 2807 return Representation::Tagged(); |
2799 } | 2808 } |
2800 virtual void HandleSideEffectDominator(GVNFlag side_effect, | 2809 virtual void HandleSideEffectDominator(GVNFlag side_effect, |
2801 HValue* dominator) V8_OVERRIDE; | 2810 HValue* dominator) V8_OVERRIDE; |
2802 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 2811 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
2803 | 2812 |
2804 HValue* value() { return OperandAt(0); } | 2813 HValue* value() { return OperandAt(0); } |
| 2814 HValue* typecheck() { return OperandAt(1); } |
2805 | 2815 |
2806 Unique<Map> first_map() const { return map_set_.at(0); } | 2816 Unique<Map> first_map() const { return map_set_.at(0); } |
2807 UniqueSet<Map> map_set() const { return map_set_; } | 2817 UniqueSet<Map> map_set() const { return map_set_; } |
2808 | 2818 |
2809 bool has_migration_target() const { | 2819 bool has_migration_target() const { |
2810 return has_migration_target_; | 2820 return has_migration_target_; |
2811 } | 2821 } |
2812 | 2822 |
2813 DECLARE_CONCRETE_INSTRUCTION(CheckMaps) | 2823 DECLARE_CONCRETE_INSTRUCTION(CheckMaps) |
2814 | 2824 |
(...skipping 4740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7555 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7565 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7556 }; | 7566 }; |
7557 | 7567 |
7558 | 7568 |
7559 #undef DECLARE_INSTRUCTION | 7569 #undef DECLARE_INSTRUCTION |
7560 #undef DECLARE_CONCRETE_INSTRUCTION | 7570 #undef DECLARE_CONCRETE_INSTRUCTION |
7561 | 7571 |
7562 } } // namespace v8::internal | 7572 } } // namespace v8::internal |
7563 | 7573 |
7564 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7574 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |