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 4652 matching lines...) Loading... |
4663 int IndexInCodeCache(Object* name, Code* code); | 4663 int IndexInCodeCache(Object* name, Code* code); |
4664 | 4664 |
4665 // Removes a code object from the code cache at the given index. | 4665 // Removes a code object from the code cache at the given index. |
4666 void RemoveFromCodeCache(String* name, Code* code, int index); | 4666 void RemoveFromCodeCache(String* name, Code* code, int index); |
4667 | 4667 |
4668 // For every transition in this map, makes the transition's | 4668 // For every transition in this map, makes the transition's |
4669 // target's prototype pointer point back to this map. | 4669 // target's prototype pointer point back to this map. |
4670 // This is undone in MarkCompactCollector::ClearNonLiveTransitions(). | 4670 // This is undone in MarkCompactCollector::ClearNonLiveTransitions(). |
4671 void CreateBackPointers(); | 4671 void CreateBackPointers(); |
4672 | 4672 |
4673 void CreateOneBackPointer(Map* transition_target); | 4673 void CreateOneBackPointer(Object* transition_target); |
4674 | 4674 |
4675 // Set all map transitions from this map to dead maps to null. | 4675 // Set all map transitions from this map to dead maps to null. |
4676 // Also, restore the original prototype on the targets of these | 4676 // Also, restore the original prototype on the targets of these |
4677 // transitions, so that we do not process this map again while | 4677 // transitions, so that we do not process this map again while |
4678 // following back pointers. | 4678 // following back pointers. |
4679 void ClearNonLiveTransitions(Heap* heap, Object* real_prototype); | 4679 void ClearNonLiveTransitions(Heap* heap, Object* real_prototype); |
4680 | 4680 |
| 4681 // Restore a possible back pointer in the prototype field of object. |
| 4682 // Return true in that case and false otherwise. Set *keep_entry to |
| 4683 // true when a live map transition has been found. |
| 4684 bool RestoreOneBackPointer(Object* object, |
| 4685 Object* real_prototype, |
| 4686 bool* keep_entry); |
| 4687 |
4681 // Computes a hash value for this map, to be used in HashTables and such. | 4688 // Computes a hash value for this map, to be used in HashTables and such. |
4682 int Hash(); | 4689 int Hash(); |
4683 | 4690 |
4684 // Compares this map to another to see if they describe equivalent objects. | 4691 // Compares this map to another to see if they describe equivalent objects. |
4685 // If |mode| is set to CLEAR_INOBJECT_PROPERTIES, |other| is treated as if | 4692 // If |mode| is set to CLEAR_INOBJECT_PROPERTIES, |other| is treated as if |
4686 // it had exactly zero inobject properties. | 4693 // it had exactly zero inobject properties. |
4687 // The "shared" flags of both this map and |other| are ignored. | 4694 // The "shared" flags of both this map and |other| are ignored. |
4688 bool EquivalentToForNormalization(Map* other, PropertyNormalizationMode mode); | 4695 bool EquivalentToForNormalization(Map* other, PropertyNormalizationMode mode); |
4689 | 4696 |
4690 // Returns true if this map and |other| describe equivalent objects. | 4697 // Returns true if this map and |other| describe equivalent objects. |
(...skipping 3545 matching lines...) Loading... |
8236 } else { | 8243 } else { |
8237 value &= ~(1 << bit_position); | 8244 value &= ~(1 << bit_position); |
8238 } | 8245 } |
8239 return value; | 8246 return value; |
8240 } | 8247 } |
8241 }; | 8248 }; |
8242 | 8249 |
8243 } } // namespace v8::internal | 8250 } } // namespace v8::internal |
8244 | 8251 |
8245 #endif // V8_OBJECTS_H_ | 8252 #endif // V8_OBJECTS_H_ |
OLD | NEW |