| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1687 Handle<JSReceiver> object, | 1687 Handle<JSReceiver> object, |
| 1688 KeyCollectionType type); | 1688 KeyCollectionType type); |
| 1689 | 1689 |
| 1690 private: | 1690 private: |
| 1691 DISALLOW_IMPLICIT_CONSTRUCTORS(JSReceiver); | 1691 DISALLOW_IMPLICIT_CONSTRUCTORS(JSReceiver); |
| 1692 }; | 1692 }; |
| 1693 | 1693 |
| 1694 // Forward declaration for JSObject::GetOrCreateHiddenPropertiesHashTable. | 1694 // Forward declaration for JSObject::GetOrCreateHiddenPropertiesHashTable. |
| 1695 class ObjectHashTable; | 1695 class ObjectHashTable; |
| 1696 | 1696 |
| 1697 // Forward declaration for JSObject::Copy. |
| 1698 class AllocationSite; |
| 1699 |
| 1697 | 1700 |
| 1698 // The JSObject describes real heap allocated JavaScript objects with | 1701 // The JSObject describes real heap allocated JavaScript objects with |
| 1699 // properties. | 1702 // properties. |
| 1700 // Note that the map of JSObject changes during execution to enable inline | 1703 // Note that the map of JSObject changes during execution to enable inline |
| 1701 // caching. | 1704 // caching. |
| 1702 class JSObject: public JSReceiver { | 1705 class JSObject: public JSReceiver { |
| 1703 public: | 1706 public: |
| 1704 // [properties]: Backing storage for properties. | 1707 // [properties]: Backing storage for properties. |
| 1705 // properties is a FixedArray in the fast case and a Dictionary in the | 1708 // properties is a FixedArray in the fast case and a Dictionary in the |
| 1706 // slow case. | 1709 // slow case. |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2147 | 2150 |
| 2148 // ES5 Object.freeze | 2151 // ES5 Object.freeze |
| 2149 MUST_USE_RESULT static MaybeHandle<Object> Freeze(Handle<JSObject> object); | 2152 MUST_USE_RESULT static MaybeHandle<Object> Freeze(Handle<JSObject> object); |
| 2150 | 2153 |
| 2151 // Called the first time an object is observed with ES7 Object.observe. | 2154 // Called the first time an object is observed with ES7 Object.observe. |
| 2152 static void SetObserved(Handle<JSObject> object); | 2155 static void SetObserved(Handle<JSObject> object); |
| 2153 | 2156 |
| 2154 // Copy object. | 2157 // Copy object. |
| 2155 enum DeepCopyHints { kNoHints = 0, kObjectIsShallow = 1 }; | 2158 enum DeepCopyHints { kNoHints = 0, kObjectIsShallow = 1 }; |
| 2156 | 2159 |
| 2160 static Handle<JSObject> Copy(Handle<JSObject> object); |
| 2157 MUST_USE_RESULT static MaybeHandle<JSObject> DeepCopy( | 2161 MUST_USE_RESULT static MaybeHandle<JSObject> DeepCopy( |
| 2158 Handle<JSObject> object, | 2162 Handle<JSObject> object, |
| 2159 AllocationSiteUsageContext* site_context, | 2163 AllocationSiteUsageContext* site_context, |
| 2160 DeepCopyHints hints = kNoHints); | 2164 DeepCopyHints hints = kNoHints); |
| 2161 MUST_USE_RESULT static MaybeHandle<JSObject> DeepWalk( | 2165 MUST_USE_RESULT static MaybeHandle<JSObject> DeepWalk( |
| 2162 Handle<JSObject> object, | 2166 Handle<JSObject> object, |
| 2163 AllocationSiteCreationContext* site_context); | 2167 AllocationSiteCreationContext* site_context); |
| 2164 | 2168 |
| 2165 static Handle<Object> GetDataProperty(Handle<JSObject> object, | 2169 static Handle<Object> GetDataProperty(Handle<JSObject> object, |
| 2166 Handle<Name> key); | 2170 Handle<Name> key); |
| (...skipping 8938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11105 } else { | 11109 } else { |
| 11106 value &= ~(1 << bit_position); | 11110 value &= ~(1 << bit_position); |
| 11107 } | 11111 } |
| 11108 return value; | 11112 return value; |
| 11109 } | 11113 } |
| 11110 }; | 11114 }; |
| 11111 | 11115 |
| 11112 } } // namespace v8::internal | 11116 } } // namespace v8::internal |
| 11113 | 11117 |
| 11114 #endif // V8_OBJECTS_H_ | 11118 #endif // V8_OBJECTS_H_ |
| OLD | NEW |