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