Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Side by Side Diff: src/objects.h

Issue 1127983003: Use function wrapper argument to expose internal arrays to native scripts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased and fixed nits Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/object-observe.js ('k') | src/promise.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
1700 1697
1701 // The JSObject describes real heap allocated JavaScript objects with 1698 // The JSObject describes real heap allocated JavaScript objects with
1702 // properties. 1699 // properties.
1703 // Note that the map of JSObject changes during execution to enable inline 1700 // Note that the map of JSObject changes during execution to enable inline
1704 // caching. 1701 // caching.
1705 class JSObject: public JSReceiver { 1702 class JSObject: public JSReceiver {
1706 public: 1703 public:
1707 // [properties]: Backing storage for properties. 1704 // [properties]: Backing storage for properties.
1708 // properties is a FixedArray in the fast case and a Dictionary in the 1705 // properties is a FixedArray in the fast case and a Dictionary in the
1709 // slow case. 1706 // slow case.
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
2150 2147
2151 // ES5 Object.freeze 2148 // ES5 Object.freeze
2152 MUST_USE_RESULT static MaybeHandle<Object> Freeze(Handle<JSObject> object); 2149 MUST_USE_RESULT static MaybeHandle<Object> Freeze(Handle<JSObject> object);
2153 2150
2154 // Called the first time an object is observed with ES7 Object.observe. 2151 // Called the first time an object is observed with ES7 Object.observe.
2155 static void SetObserved(Handle<JSObject> object); 2152 static void SetObserved(Handle<JSObject> object);
2156 2153
2157 // Copy object. 2154 // Copy object.
2158 enum DeepCopyHints { kNoHints = 0, kObjectIsShallow = 1 }; 2155 enum DeepCopyHints { kNoHints = 0, kObjectIsShallow = 1 };
2159 2156
2160 static Handle<JSObject> Copy(Handle<JSObject> object);
2161 MUST_USE_RESULT static MaybeHandle<JSObject> DeepCopy( 2157 MUST_USE_RESULT static MaybeHandle<JSObject> DeepCopy(
2162 Handle<JSObject> object, 2158 Handle<JSObject> object,
2163 AllocationSiteUsageContext* site_context, 2159 AllocationSiteUsageContext* site_context,
2164 DeepCopyHints hints = kNoHints); 2160 DeepCopyHints hints = kNoHints);
2165 MUST_USE_RESULT static MaybeHandle<JSObject> DeepWalk( 2161 MUST_USE_RESULT static MaybeHandle<JSObject> DeepWalk(
2166 Handle<JSObject> object, 2162 Handle<JSObject> object,
2167 AllocationSiteCreationContext* site_context); 2163 AllocationSiteCreationContext* site_context);
2168 2164
2169 static Handle<Object> GetDataProperty(Handle<JSObject> object, 2165 static Handle<Object> GetDataProperty(Handle<JSObject> object,
2170 Handle<Name> key); 2166 Handle<Name> key);
(...skipping 8938 matching lines...) Expand 10 before | Expand all | Expand 10 after
11109 } else { 11105 } else {
11110 value &= ~(1 << bit_position); 11106 value &= ~(1 << bit_position);
11111 } 11107 }
11112 return value; 11108 return value;
11113 } 11109 }
11114 }; 11110 };
11115 11111
11116 } } // namespace v8::internal 11112 } } // namespace v8::internal
11117 11113
11118 #endif // V8_OBJECTS_H_ 11114 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/object-observe.js ('k') | src/promise.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698