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 4678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4689 | 4689 |
4690 // Computes a hash value for this map, to be used in HashTables and such. | 4690 // Computes a hash value for this map, to be used in HashTables and such. |
4691 int Hash(); | 4691 int Hash(); |
4692 | 4692 |
4693 // Compares this map to another to see if they describe equivalent objects. | 4693 // Compares this map to another to see if they describe equivalent objects. |
4694 // If |mode| is set to CLEAR_INOBJECT_PROPERTIES, |other| is treated as if | 4694 // If |mode| is set to CLEAR_INOBJECT_PROPERTIES, |other| is treated as if |
4695 // it had exactly zero inobject properties. | 4695 // it had exactly zero inobject properties. |
4696 // The "shared" flags of both this map and |other| are ignored. | 4696 // The "shared" flags of both this map and |other| are ignored. |
4697 bool EquivalentToForNormalization(Map* other, PropertyNormalizationMode mode); | 4697 bool EquivalentToForNormalization(Map* other, PropertyNormalizationMode mode); |
4698 | 4698 |
4699 // Returns true if this map and |other| describe equivalent objects. | |
4700 // The "shared" flags of both this map and |other| are ignored. | |
4701 bool EquivalentTo(Map* other) { | |
4702 return EquivalentToForNormalization(other, KEEP_INOBJECT_PROPERTIES); | |
4703 } | |
4704 | |
4705 // Returns the contents of this map's descriptor array for the given string. | 4699 // Returns the contents of this map's descriptor array for the given string. |
4706 // May return NULL. |safe_to_add_transition| is set to false and NULL | 4700 // May return NULL. |safe_to_add_transition| is set to false and NULL |
4707 // is returned if adding transitions is not allowed. | 4701 // is returned if adding transitions is not allowed. |
4708 Object* GetDescriptorContents(String* sentinel_name, | 4702 Object* GetDescriptorContents(String* sentinel_name, |
4709 bool* safe_to_add_transitions); | 4703 bool* safe_to_add_transitions); |
4710 | 4704 |
4711 // Returns the map that this map transitions to if its elements_kind | 4705 // Returns the map that this map transitions to if its elements_kind |
4712 // is changed to |elements_kind|, or NULL if no such map is cached yet. | 4706 // is changed to |elements_kind|, or NULL if no such map is cached yet. |
4713 // |safe_to_add_transitions| is set to false if adding transitions is not | 4707 // |safe_to_add_transitions| is set to false if adding transitions is not |
4714 // allowed. | 4708 // allowed. |
(...skipping 3530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8245 } else { | 8239 } else { |
8246 value &= ~(1 << bit_position); | 8240 value &= ~(1 << bit_position); |
8247 } | 8241 } |
8248 return value; | 8242 return value; |
8249 } | 8243 } |
8250 }; | 8244 }; |
8251 | 8245 |
8252 } } // namespace v8::internal | 8246 } } // namespace v8::internal |
8253 | 8247 |
8254 #endif // V8_OBJECTS_H_ | 8248 #endif // V8_OBJECTS_H_ |
OLD | NEW |