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