| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1799 // or null), its enumeration index is kept as is. | 1799 // or null), its enumeration index is kept as is. |
| 1800 // If adding a real property, map transitions must be removed. If adding | 1800 // If adding a real property, map transitions must be removed. If adding |
| 1801 // a transition, they must not be removed. All null descriptors are removed. | 1801 // a transition, they must not be removed. All null descriptors are removed. |
| 1802 Object* CopyInsert(Descriptor* descriptor, TransitionFlag transition_flag); | 1802 Object* CopyInsert(Descriptor* descriptor, TransitionFlag transition_flag); |
| 1803 | 1803 |
| 1804 // Remove all transitions. Return a copy of the array with all transitions | 1804 // Remove all transitions. Return a copy of the array with all transitions |
| 1805 // removed, or a Failure object if the new array could not be allocated. | 1805 // removed, or a Failure object if the new array could not be allocated. |
| 1806 Object* RemoveTransitions(); | 1806 Object* RemoveTransitions(); |
| 1807 | 1807 |
| 1808 // Sort the instance descriptors by the hash codes of their keys. | 1808 // Sort the instance descriptors by the hash codes of their keys. |
| 1809 // Does not check for duplicates. |
| 1810 void SortUnchecked(); |
| 1811 |
| 1812 // Sort the instance descriptors by the hash codes of their keys. |
| 1813 // Checks the result for duplicates. |
| 1809 void Sort(); | 1814 void Sort(); |
| 1810 | 1815 |
| 1811 // Search the instance descriptors for given name. | 1816 // Search the instance descriptors for given name. |
| 1812 inline int Search(String* name); | 1817 inline int Search(String* name); |
| 1813 | 1818 |
| 1814 // Tells whether the name is present int the array. | 1819 // Tells whether the name is present int the array. |
| 1815 bool Contains(String* name) { return kNotFound != Search(name); } | 1820 bool Contains(String* name) { return kNotFound != Search(name); } |
| 1816 | 1821 |
| 1817 // Perform a binary search in the instance descriptors represented | 1822 // Perform a binary search in the instance descriptors represented |
| 1818 // by this fixed array. low and high are descriptor indices. If there | 1823 // by this fixed array. low and high are descriptor indices. If there |
| (...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3382 // Indicates if this function can be lazy compiled. | 3387 // Indicates if this function can be lazy compiled. |
| 3383 // This is used to determine if we can safely flush code from a function | 3388 // This is used to determine if we can safely flush code from a function |
| 3384 // when doing GC if we expect that the function will no longer be used. | 3389 // when doing GC if we expect that the function will no longer be used. |
| 3385 inline bool allows_lazy_compilation(); | 3390 inline bool allows_lazy_compilation(); |
| 3386 inline void set_allows_lazy_compilation(bool flag); | 3391 inline void set_allows_lazy_compilation(bool flag); |
| 3387 | 3392 |
| 3388 // Check whether a inlined constructor can be generated with the given | 3393 // Check whether a inlined constructor can be generated with the given |
| 3389 // prototype. | 3394 // prototype. |
| 3390 bool CanGenerateInlineConstructor(Object* prototype); | 3395 bool CanGenerateInlineConstructor(Object* prototype); |
| 3391 | 3396 |
| 3397 // Prevents further attempts to generate inline constructors. |
| 3398 // To be called if generation failed for any reason. |
| 3399 void ForbidInlineConstructor(); |
| 3400 |
| 3392 // For functions which only contains this property assignments this provides | 3401 // For functions which only contains this property assignments this provides |
| 3393 // access to the names for the properties assigned. | 3402 // access to the names for the properties assigned. |
| 3394 DECL_ACCESSORS(this_property_assignments, Object) | 3403 DECL_ACCESSORS(this_property_assignments, Object) |
| 3395 inline int this_property_assignments_count(); | 3404 inline int this_property_assignments_count(); |
| 3396 inline void set_this_property_assignments_count(int value); | 3405 inline void set_this_property_assignments_count(int value); |
| 3397 String* GetThisPropertyAssignmentName(int index); | 3406 String* GetThisPropertyAssignmentName(int index); |
| 3398 bool IsThisPropertyAssignmentArgument(int index); | 3407 bool IsThisPropertyAssignmentArgument(int index); |
| 3399 int GetThisPropertyAssignmentArgument(int index); | 3408 int GetThisPropertyAssignmentArgument(int index); |
| 3400 Object* GetThisPropertyAssignmentConstant(int index); | 3409 Object* GetThisPropertyAssignmentConstant(int index); |
| 3401 | 3410 |
| (...skipping 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5360 } else { | 5369 } else { |
| 5361 value &= ~(1 << bit_position); | 5370 value &= ~(1 << bit_position); |
| 5362 } | 5371 } |
| 5363 return value; | 5372 return value; |
| 5364 } | 5373 } |
| 5365 }; | 5374 }; |
| 5366 | 5375 |
| 5367 } } // namespace v8::internal | 5376 } } // namespace v8::internal |
| 5368 | 5377 |
| 5369 #endif // V8_OBJECTS_H_ | 5378 #endif // V8_OBJECTS_H_ |
| OLD | NEW |