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 2629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2640 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 2640 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
2641 | 2641 |
2642 const Heap::RootListIndex index_; | 2642 const Heap::RootListIndex index_; |
2643 }; | 2643 }; |
2644 | 2644 |
2645 | 2645 |
2646 class HCheckMaps V8_FINAL : public HTemplateInstruction<2> { | 2646 class HCheckMaps V8_FINAL : public HTemplateInstruction<2> { |
2647 public: | 2647 public: |
2648 static HCheckMaps* New(Zone* zone, HValue* context, HValue* value, | 2648 static HCheckMaps* New(Zone* zone, HValue* context, HValue* value, |
2649 Handle<Map> map, CompilationInfo* info, | 2649 Handle<Map> map, CompilationInfo* info, |
2650 HValue *typecheck = NULL); | 2650 HValue* typecheck = NULL); |
2651 static HCheckMaps* New(Zone* zone, HValue* context, | 2651 static HCheckMaps* New(Zone* zone, HValue* context, |
2652 HValue* value, SmallMapList* maps, | 2652 HValue* value, SmallMapList* maps, |
2653 HValue *typecheck = NULL) { | 2653 HValue* typecheck = NULL) { |
2654 HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck); | 2654 HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck); |
2655 for (int i = 0; i < maps->length(); i++) { | 2655 for (int i = 0; i < maps->length(); i++) { |
2656 check_map->Add(maps->at(i), zone); | 2656 check_map->Add(maps->at(i), zone); |
2657 } | 2657 } |
2658 return check_map; | 2658 return check_map; |
2659 } | 2659 } |
| 2660 // HCheckMaps creation method safe for using during concurrent compilation |
| 2661 // (does not dereference maps handles). |
2660 static HCheckMaps* New(Zone* zone, HValue* context, | 2662 static HCheckMaps* New(Zone* zone, HValue* context, |
2661 HValue* value, UniqueSet<Map>* maps, | 2663 HValue* value, UniqueSet<Map>* maps, |
2662 HValue *typecheck = NULL) { | 2664 HValue* typecheck, |
| 2665 bool has_migration_target) { |
2663 HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck); | 2666 HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck); |
2664 for (int i = 0; i < maps->size(); i++) { | 2667 for (int i = 0; i < maps->size(); i++) { |
2665 check_map->Add(maps->at(i).handle(), zone); | 2668 check_map->map_set_.Add(maps->at(i), zone); |
| 2669 } |
| 2670 if (has_migration_target) { |
| 2671 check_map->has_migration_target_ = true; |
| 2672 check_map->SetGVNFlag(kChangesNewSpacePromotion); |
2666 } | 2673 } |
2667 return check_map; | 2674 return check_map; |
2668 } | 2675 } |
2669 | 2676 |
2670 bool CanOmitMapChecks() { return omit_; } | 2677 bool CanOmitMapChecks() { return omit_; } |
2671 | 2678 |
2672 virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; } | 2679 virtual bool HasEscapingOperandAt(int index) V8_OVERRIDE { return false; } |
2673 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 2680 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
2674 return Representation::Tagged(); | 2681 return Representation::Tagged(); |
2675 } | 2682 } |
(...skipping 4754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7430 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7437 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7431 }; | 7438 }; |
7432 | 7439 |
7433 | 7440 |
7434 #undef DECLARE_INSTRUCTION | 7441 #undef DECLARE_INSTRUCTION |
7435 #undef DECLARE_CONCRETE_INSTRUCTION | 7442 #undef DECLARE_CONCRETE_INSTRUCTION |
7436 | 7443 |
7437 } } // namespace v8::internal | 7444 } } // namespace v8::internal |
7438 | 7445 |
7439 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7446 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |