OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 2480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2491 // Gets the number of currently used elements. | 2491 // Gets the number of currently used elements. |
2492 int GetFastElementsUsage(); | 2492 int GetFastElementsUsage(); |
2493 | 2493 |
2494 static bool AllCanRead(LookupIterator* it); | 2494 static bool AllCanRead(LookupIterator* it); |
2495 static bool AllCanWrite(LookupIterator* it); | 2495 static bool AllCanWrite(LookupIterator* it); |
2496 | 2496 |
2497 private: | 2497 private: |
2498 friend class JSReceiver; | 2498 friend class JSReceiver; |
2499 friend class Object; | 2499 friend class Object; |
2500 | 2500 |
2501 static void MigrateFastToFast(Handle<JSObject> object, Handle<Map> new_map); | |
2502 static void MigrateFastToSlow(Handle<JSObject> object, | |
2503 Handle<Map> new_map, | |
2504 int expected_additional_properties); | |
2505 | |
2506 // Used from Object::GetProperty(). | 2501 // Used from Object::GetProperty(). |
2507 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithFailedAccessCheck( | 2502 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithFailedAccessCheck( |
2508 LookupIterator* it); | 2503 LookupIterator* it); |
2509 | 2504 |
2510 MUST_USE_RESULT static Maybe<bool> SetPropertyWithFailedAccessCheck( | 2505 MUST_USE_RESULT static Maybe<bool> SetPropertyWithFailedAccessCheck( |
2511 LookupIterator* it, Handle<Object> value, ShouldThrow should_throw); | 2506 LookupIterator* it, Handle<Object> value, ShouldThrow should_throw); |
2512 | 2507 |
2513 // Add a property to a slow-case object. | 2508 // Add a property to a slow-case object. |
2514 static void AddSlowProperty(Handle<JSObject> object, | 2509 static void AddSlowProperty(Handle<JSObject> object, |
2515 Handle<Name> name, | 2510 Handle<Name> name, |
(...skipping 8340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10856 } | 10851 } |
10857 return value; | 10852 return value; |
10858 } | 10853 } |
10859 }; | 10854 }; |
10860 | 10855 |
10861 | 10856 |
10862 } // NOLINT, false-positive due to second-order macros. | 10857 } // NOLINT, false-positive due to second-order macros. |
10863 } // NOLINT, false-positive due to second-order macros. | 10858 } // NOLINT, false-positive due to second-order macros. |
10864 | 10859 |
10865 #endif // V8_OBJECTS_H_ | 10860 #endif // V8_OBJECTS_H_ |
OLD | NEW |