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 "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 1981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 2000 // Lookup a property. If found, the result is valid and has |
2001 // detailed information. | 2001 // detailed information. |
2002 void LookupOwn(Handle<Name> name, LookupResult* result); | |
2003 void Lookup(Handle<Name> name, LookupResult* result); | 2002 void Lookup(Handle<Name> name, LookupResult* result); |
2004 | 2003 |
2005 enum KeyCollectionType { OWN_ONLY, INCLUDE_PROTOS }; | 2004 enum KeyCollectionType { OWN_ONLY, INCLUDE_PROTOS }; |
2006 | 2005 |
2007 // Computes the enumerable keys for a JSObject. Used for implementing | 2006 // Computes the enumerable keys for a JSObject. Used for implementing |
2008 // "for (n in object) { }". | 2007 // "for (n in object) { }". |
2009 MUST_USE_RESULT static MaybeHandle<FixedArray> GetKeys( | 2008 MUST_USE_RESULT static MaybeHandle<FixedArray> GetKeys( |
2010 Handle<JSReceiver> object, | 2009 Handle<JSReceiver> object, |
2011 KeyCollectionType type); | 2010 KeyCollectionType type); |
2012 | 2011 |
2013 private: | 2012 private: |
| 2013 void LookupOwn(Handle<Name> name, LookupResult* result); |
2014 DISALLOW_IMPLICIT_CONSTRUCTORS(JSReceiver); | 2014 DISALLOW_IMPLICIT_CONSTRUCTORS(JSReceiver); |
2015 }; | 2015 }; |
2016 | 2016 |
2017 // Forward declaration for JSObject::GetOrCreateHiddenPropertiesHashTable. | 2017 // Forward declaration for JSObject::GetOrCreateHiddenPropertiesHashTable. |
2018 class ObjectHashTable; | 2018 class ObjectHashTable; |
2019 | 2019 |
2020 // Forward declaration for JSObject::Copy. | 2020 // Forward declaration for JSObject::Copy. |
2021 class AllocationSite; | 2021 class AllocationSite; |
2022 | 2022 |
2023 | 2023 |
(...skipping 9169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11193 } else { | 11193 } else { |
11194 value &= ~(1 << bit_position); | 11194 value &= ~(1 << bit_position); |
11195 } | 11195 } |
11196 return value; | 11196 return value; |
11197 } | 11197 } |
11198 }; | 11198 }; |
11199 | 11199 |
11200 } } // namespace v8::internal | 11200 } } // namespace v8::internal |
11201 | 11201 |
11202 #endif // V8_OBJECTS_H_ | 11202 #endif // V8_OBJECTS_H_ |
OLD | NEW |