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

Side by Side Diff: src/objects.h

Issue 478043006: Rewrite StoreIC handling using the LookupIterator. Continued from patch 494153002 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/mips64/stub-cache-mips64.cc ('k') | src/objects.cc » ('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 "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assert-scope.h" 9 #include "src/assert-scope.h"
10 #include "src/builtins.h" 10 #include "src/builtins.h"
(...skipping 1979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1990 1990
1991 // Retrieves a permanent object identity hash code. The undefined value might 1991 // Retrieves a permanent object identity hash code. The undefined value might
1992 // be returned in case no hash was created yet. 1992 // be returned in case no hash was created yet.
1993 inline Object* GetIdentityHash(); 1993 inline Object* GetIdentityHash();
1994 1994
1995 // Retrieves a permanent object identity hash code. May create and store a 1995 // Retrieves a permanent object identity hash code. May create and store a
1996 // hash code if needed and none exists. 1996 // hash code if needed and none exists.
1997 inline static Handle<Smi> GetOrCreateIdentityHash( 1997 inline static Handle<Smi> GetOrCreateIdentityHash(
1998 Handle<JSReceiver> object); 1998 Handle<JSReceiver> object);
1999 1999
2000 // Lookup a property. If found, the result is valid and has
2001 // detailed information.
2002 void Lookup(Handle<Name> name, LookupResult* result);
2003
2004 enum KeyCollectionType { OWN_ONLY, INCLUDE_PROTOS }; 2000 enum KeyCollectionType { OWN_ONLY, INCLUDE_PROTOS };
2005 2001
2006 // Computes the enumerable keys for a JSObject. Used for implementing 2002 // Computes the enumerable keys for a JSObject. Used for implementing
2007 // "for (n in object) { }". 2003 // "for (n in object) { }".
2008 MUST_USE_RESULT static MaybeHandle<FixedArray> GetKeys( 2004 MUST_USE_RESULT static MaybeHandle<FixedArray> GetKeys(
2009 Handle<JSReceiver> object, 2005 Handle<JSReceiver> object,
2010 KeyCollectionType type); 2006 KeyCollectionType type);
2011 2007
2012 private: 2008 private:
2013 void LookupOwn(Handle<Name> name, LookupResult* result);
2014 DISALLOW_IMPLICIT_CONSTRUCTORS(JSReceiver); 2009 DISALLOW_IMPLICIT_CONSTRUCTORS(JSReceiver);
2015 }; 2010 };
2016 2011
2017 // Forward declaration for JSObject::GetOrCreateHiddenPropertiesHashTable. 2012 // Forward declaration for JSObject::GetOrCreateHiddenPropertiesHashTable.
2018 class ObjectHashTable; 2013 class ObjectHashTable;
2019 2014
2020 // Forward declaration for JSObject::Copy. 2015 // Forward declaration for JSObject::Copy.
2021 class AllocationSite; 2016 class AllocationSite;
2022 2017
2023 2018
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
2361 // Get the header size for a JSObject. Used to compute the index of 2356 // Get the header size for a JSObject. Used to compute the index of
2362 // internal fields as well as the number of internal fields. 2357 // internal fields as well as the number of internal fields.
2363 inline int GetHeaderSize(); 2358 inline int GetHeaderSize();
2364 2359
2365 inline int GetInternalFieldCount(); 2360 inline int GetInternalFieldCount();
2366 inline int GetInternalFieldOffset(int index); 2361 inline int GetInternalFieldOffset(int index);
2367 inline Object* GetInternalField(int index); 2362 inline Object* GetInternalField(int index);
2368 inline void SetInternalField(int index, Object* value); 2363 inline void SetInternalField(int index, Object* value);
2369 inline void SetInternalField(int index, Smi* value); 2364 inline void SetInternalField(int index, Smi* value);
2370 2365
2371 // The following lookup functions skip interceptors.
2372 void LookupOwnRealNamedProperty(Handle<Name> name, LookupResult* result);
2373
2374 // Returns the number of properties on this object filtering out properties 2366 // Returns the number of properties on this object filtering out properties
2375 // with the specified attributes (ignoring interceptors). 2367 // with the specified attributes (ignoring interceptors).
2376 int NumberOfOwnProperties(PropertyAttributes filter = NONE); 2368 int NumberOfOwnProperties(PropertyAttributes filter = NONE);
2377 // Fill in details for properties into storage starting at the specified 2369 // Fill in details for properties into storage starting at the specified
2378 // index. 2370 // index.
2379 void GetOwnPropertyNames( 2371 void GetOwnPropertyNames(
2380 FixedArray* storage, int index, PropertyAttributes filter = NONE); 2372 FixedArray* storage, int index, PropertyAttributes filter = NONE);
2381 2373
2382 // Returns the number of properties on this object filtering out properties 2374 // Returns the number of properties on this object filtering out properties
2383 // with the specified attributes (ignoring interceptors). 2375 // with the specified attributes (ignoring interceptors).
(...skipping 8814 matching lines...) Expand 10 before | Expand all | Expand 10 after
11198 } else { 11190 } else {
11199 value &= ~(1 << bit_position); 11191 value &= ~(1 << bit_position);
11200 } 11192 }
11201 return value; 11193 return value;
11202 } 11194 }
11203 }; 11195 };
11204 11196
11205 } } // namespace v8::internal 11197 } } // namespace v8::internal
11206 11198
11207 #endif // V8_OBJECTS_H_ 11199 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips64/stub-cache-mips64.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698