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 1814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1825 Handle<Object> value, | 1825 Handle<Object> value, |
1826 PropertyDetails details); | 1826 PropertyDetails details); |
1827 | 1827 |
1828 static void OptimizeAsPrototype(Handle<JSObject> object, | 1828 static void OptimizeAsPrototype(Handle<JSObject> object, |
1829 PrototypeOptimizationMode mode); | 1829 PrototypeOptimizationMode mode); |
1830 static void ReoptimizeIfPrototype(Handle<JSObject> object); | 1830 static void ReoptimizeIfPrototype(Handle<JSObject> object); |
1831 static void RegisterPrototypeUser(Handle<JSObject> prototype, | 1831 static void RegisterPrototypeUser(Handle<JSObject> prototype, |
1832 Handle<HeapObject> user); | 1832 Handle<HeapObject> user); |
1833 static void UnregisterPrototypeUser(Handle<JSObject> prototype, | 1833 static void UnregisterPrototypeUser(Handle<JSObject> prototype, |
1834 Handle<HeapObject> user); | 1834 Handle<HeapObject> user); |
| 1835 static void InvalidatePrototypeChains(Map* map); |
1835 | 1836 |
1836 // Retrieve interceptors. | 1837 // Retrieve interceptors. |
1837 InterceptorInfo* GetNamedInterceptor(); | 1838 InterceptorInfo* GetNamedInterceptor(); |
1838 InterceptorInfo* GetIndexedInterceptor(); | 1839 InterceptorInfo* GetIndexedInterceptor(); |
1839 | 1840 |
1840 // Used from JSReceiver. | 1841 // Used from JSReceiver. |
1841 MUST_USE_RESULT static Maybe<PropertyAttributes> | 1842 MUST_USE_RESULT static Maybe<PropertyAttributes> |
1842 GetPropertyAttributesWithInterceptor(Handle<JSObject> holder, | 1843 GetPropertyAttributesWithInterceptor(Handle<JSObject> holder, |
1843 Handle<Object> receiver, | 1844 Handle<Object> receiver, |
1844 Handle<Name> name); | 1845 Handle<Name> name); |
(...skipping 4176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6021 inline FixedArrayBase* GetInitialElements(); | 6022 inline FixedArrayBase* GetInitialElements(); |
6022 | 6023 |
6023 // [raw_transitions]: Provides access to the transitions storage field. | 6024 // [raw_transitions]: Provides access to the transitions storage field. |
6024 // Don't call set_raw_transitions() directly to overwrite transitions, use | 6025 // Don't call set_raw_transitions() directly to overwrite transitions, use |
6025 // the TransitionArray::ReplaceTransitions() wrapper instead! | 6026 // the TransitionArray::ReplaceTransitions() wrapper instead! |
6026 DECL_ACCESSORS(raw_transitions, Object) | 6027 DECL_ACCESSORS(raw_transitions, Object) |
6027 // [prototype_info]: Per-prototype metadata. Aliased with transitions | 6028 // [prototype_info]: Per-prototype metadata. Aliased with transitions |
6028 // (which prototype maps don't have). | 6029 // (which prototype maps don't have). |
6029 DECL_ACCESSORS(prototype_info, Object) | 6030 DECL_ACCESSORS(prototype_info, Object) |
6030 | 6031 |
| 6032 // [prototype chain validity cell]: Associated with a prototype object, |
| 6033 // stored in that object's map's PrototypeInfo, indicates that prototype |
| 6034 // chains through this object are currently valid. The cell will be |
| 6035 // invalidated and replaced when the prototype chain changes. |
| 6036 static Handle<Cell> GetOrCreatePrototypeChainValidityCell(Handle<Map> map, |
| 6037 Isolate* isolate); |
| 6038 static const int kPrototypeChainValid = 0; |
| 6039 static const int kPrototypeChainInvalid = 1; |
| 6040 |
6031 Map* FindRootMap(); | 6041 Map* FindRootMap(); |
6032 Map* FindFieldOwner(int descriptor); | 6042 Map* FindFieldOwner(int descriptor); |
6033 | 6043 |
6034 inline int GetInObjectPropertyOffset(int index); | 6044 inline int GetInObjectPropertyOffset(int index); |
6035 | 6045 |
6036 int NumberOfFields(); | 6046 int NumberOfFields(); |
6037 | 6047 |
6038 // TODO(ishell): candidate with JSObject::MigrateToMap(). | 6048 // TODO(ishell): candidate with JSObject::MigrateToMap(). |
6039 bool InstancesNeedRewriting(Map* target, int target_number_of_fields, | 6049 bool InstancesNeedRewriting(Map* target, int target_number_of_fields, |
6040 int target_inobject, int target_unused, | 6050 int target_inobject, int target_unused, |
(...skipping 5034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11075 } else { | 11085 } else { |
11076 value &= ~(1 << bit_position); | 11086 value &= ~(1 << bit_position); |
11077 } | 11087 } |
11078 return value; | 11088 return value; |
11079 } | 11089 } |
11080 }; | 11090 }; |
11081 | 11091 |
11082 } } // namespace v8::internal | 11092 } } // namespace v8::internal |
11083 | 11093 |
11084 #endif // V8_OBJECTS_H_ | 11094 #endif // V8_OBJECTS_H_ |
OLD | NEW |