| 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 2402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2413 static bool HasHiddenProperties(Handle<JSObject> object); | 2413 static bool HasHiddenProperties(Handle<JSObject> object); |
| 2414 | 2414 |
| 2415 static void SetIdentityHash(Handle<JSObject> object, Handle<Smi> hash); | 2415 static void SetIdentityHash(Handle<JSObject> object, Handle<Smi> hash); |
| 2416 | 2416 |
| 2417 inline void ValidateElements(); | 2417 inline void ValidateElements(); |
| 2418 | 2418 |
| 2419 // Makes sure that this object can contain HeapObject as elements. | 2419 // Makes sure that this object can contain HeapObject as elements. |
| 2420 static inline void EnsureCanContainHeapObjectElements(Handle<JSObject> obj); | 2420 static inline void EnsureCanContainHeapObjectElements(Handle<JSObject> obj); |
| 2421 | 2421 |
| 2422 // Makes sure that this object can contain the specified elements. | 2422 // Makes sure that this object can contain the specified elements. |
| 2423 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( | 2423 static inline void EnsureCanContainElements( |
| 2424 Handle<JSObject> object, |
| 2424 Object** elements, | 2425 Object** elements, |
| 2425 uint32_t count, | 2426 uint32_t count, |
| 2426 EnsureElementsMode mode); | 2427 EnsureElementsMode mode); |
| 2427 static inline void EnsureCanContainElements( | 2428 static inline void EnsureCanContainElements( |
| 2428 Handle<JSObject> object, | 2429 Handle<JSObject> object, |
| 2429 Handle<FixedArrayBase> elements, | 2430 Handle<FixedArrayBase> elements, |
| 2430 uint32_t length, | 2431 uint32_t length, |
| 2431 EnsureElementsMode mode); | 2432 EnsureElementsMode mode); |
| 2432 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( | |
| 2433 FixedArrayBase* elements, | |
| 2434 uint32_t length, | |
| 2435 EnsureElementsMode mode); | |
| 2436 static void EnsureCanContainElements( | 2433 static void EnsureCanContainElements( |
| 2437 Handle<JSObject> object, | 2434 Handle<JSObject> object, |
| 2438 Arguments* arguments, | 2435 Arguments* arguments, |
| 2439 uint32_t first_arg, | 2436 uint32_t first_arg, |
| 2440 uint32_t arg_count, | 2437 uint32_t arg_count, |
| 2441 EnsureElementsMode mode); | 2438 EnsureElementsMode mode); |
| 2442 MUST_USE_RESULT MaybeObject* EnsureCanContainElements( | |
| 2443 Arguments* arguments, | |
| 2444 uint32_t first_arg, | |
| 2445 uint32_t arg_count, | |
| 2446 EnsureElementsMode mode); | |
| 2447 | 2439 |
| 2448 // Would we convert a fast elements array to dictionary mode given | 2440 // Would we convert a fast elements array to dictionary mode given |
| 2449 // an access at key? | 2441 // an access at key? |
| 2450 bool WouldConvertToSlowElements(Handle<Object> key); | 2442 bool WouldConvertToSlowElements(Handle<Object> key); |
| 2451 // Do we want to keep the elements in fast case when increasing the | 2443 // Do we want to keep the elements in fast case when increasing the |
| 2452 // capacity? | 2444 // capacity? |
| 2453 bool ShouldConvertToSlowElements(int new_capacity); | 2445 bool ShouldConvertToSlowElements(int new_capacity); |
| 2454 // Returns true if the backing storage for the slow-case elements of | 2446 // Returns true if the backing storage for the slow-case elements of |
| 2455 // this object takes up nearly as much space as a fast-case backing | 2447 // this object takes up nearly as much space as a fast-case backing |
| 2456 // storage would. In that case the JSObject should have fast | 2448 // storage would. In that case the JSObject should have fast |
| (...skipping 8342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10799 } else { | 10791 } else { |
| 10800 value &= ~(1 << bit_position); | 10792 value &= ~(1 << bit_position); |
| 10801 } | 10793 } |
| 10802 return value; | 10794 return value; |
| 10803 } | 10795 } |
| 10804 }; | 10796 }; |
| 10805 | 10797 |
| 10806 } } // namespace v8::internal | 10798 } } // namespace v8::internal |
| 10807 | 10799 |
| 10808 #endif // V8_OBJECTS_H_ | 10800 #endif // V8_OBJECTS_H_ |
| OLD | NEW |