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

Side by Side Diff: src/objects.h

Issue 1241883002: Cleanup element normalization logic (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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/isolate.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')
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 2256 matching lines...) Expand 10 before | Expand all | Expand 10 after
2267 static inline int SizeOf(Map* map, HeapObject* object); 2267 static inline int SizeOf(Map* map, HeapObject* object);
2268 }; 2268 };
2269 2269
2270 Context* GetCreationContext(); 2270 Context* GetCreationContext();
2271 2271
2272 // Enqueue change record for Object.observe. May cause GC. 2272 // Enqueue change record for Object.observe. May cause GC.
2273 MUST_USE_RESULT static MaybeHandle<Object> EnqueueChangeRecord( 2273 MUST_USE_RESULT static MaybeHandle<Object> EnqueueChangeRecord(
2274 Handle<JSObject> object, const char* type, Handle<Name> name, 2274 Handle<JSObject> object, const char* type, Handle<Name> name,
2275 Handle<Object> old_value); 2275 Handle<Object> old_value);
2276 2276
2277 // Gets the current elements capacity and the number of used elements. 2277 // Gets the number of currently used elements.
2278 void GetElementsCapacityAndUsage(int* capacity, int* used); 2278 int GetFastElementsUsage();
2279 2279
2280 // Deletes an existing named property in a normalized object. 2280 // Deletes an existing named property in a normalized object.
2281 static void DeleteNormalizedProperty(Handle<JSObject> object, 2281 static void DeleteNormalizedProperty(Handle<JSObject> object,
2282 Handle<Name> name, int entry); 2282 Handle<Name> name, int entry);
2283 2283
2284 private: 2284 private:
2285 friend class JSReceiver; 2285 friend class JSReceiver;
2286 friend class Object; 2286 friend class Object;
2287 2287
2288 static void MigrateFastToFast(Handle<JSObject> object, Handle<Map> new_map); 2288 static void MigrateFastToFast(Handle<JSObject> object, Handle<Map> new_map);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
2323 // the inline-stored identity hash. 2323 // the inline-stored identity hash.
2324 static Handle<Object> SetHiddenPropertiesHashTable( 2324 static Handle<Object> SetHiddenPropertiesHashTable(
2325 Handle<JSObject> object, 2325 Handle<JSObject> object,
2326 Handle<Object> value); 2326 Handle<Object> value);
2327 2327
2328 MUST_USE_RESULT Object* GetIdentityHash(); 2328 MUST_USE_RESULT Object* GetIdentityHash();
2329 2329
2330 static Handle<Smi> GetOrCreateIdentityHash(Handle<JSObject> object); 2330 static Handle<Smi> GetOrCreateIdentityHash(Handle<JSObject> object);
2331 2331
2332 static Handle<SeededNumberDictionary> GetNormalizedElementDictionary( 2332 static Handle<SeededNumberDictionary> GetNormalizedElementDictionary(
2333 Handle<JSObject> object); 2333 Handle<JSObject> object, Handle<FixedArrayBase> elements);
2334 2334
2335 // Helper for fast versions of preventExtensions, seal, and freeze. 2335 // Helper for fast versions of preventExtensions, seal, and freeze.
2336 // attrs is one of NONE, SEALED, or FROZEN (depending on the operation). 2336 // attrs is one of NONE, SEALED, or FROZEN (depending on the operation).
2337 template <PropertyAttributes attrs> 2337 template <PropertyAttributes attrs>
2338 MUST_USE_RESULT static MaybeHandle<Object> PreventExtensionsWithTransition( 2338 MUST_USE_RESULT static MaybeHandle<Object> PreventExtensionsWithTransition(
2339 Handle<JSObject> object); 2339 Handle<JSObject> object);
2340 2340
2341 DISALLOW_IMPLICIT_CONSTRUCTORS(JSObject); 2341 DISALLOW_IMPLICIT_CONSTRUCTORS(JSObject);
2342 }; 2342 };
2343 2343
(...skipping 8443 matching lines...) Expand 10 before | Expand all | Expand 10 after
10787 } else { 10787 } else {
10788 value &= ~(1 << bit_position); 10788 value &= ~(1 << bit_position);
10789 } 10789 }
10790 return value; 10790 return value;
10791 } 10791 }
10792 }; 10792 };
10793 10793
10794 } } // namespace v8::internal 10794 } } // namespace v8::internal
10795 10795
10796 #endif // V8_OBJECTS_H_ 10796 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698