OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2213 static Handle<Object> SetNormalizedProperty(Handle<JSObject> object, | 2213 static Handle<Object> SetNormalizedProperty(Handle<JSObject> object, |
2214 Handle<Name> key, | 2214 Handle<Name> key, |
2215 Handle<Object> value, | 2215 Handle<Object> value, |
2216 PropertyDetails details); | 2216 PropertyDetails details); |
2217 | 2217 |
2218 MUST_USE_RESULT MaybeObject* SetNormalizedProperty(Name* name, | 2218 MUST_USE_RESULT MaybeObject* SetNormalizedProperty(Name* name, |
2219 Object* value, | 2219 Object* value, |
2220 PropertyDetails details); | 2220 PropertyDetails details); |
2221 | 2221 |
2222 static void OptimizeAsPrototype(Handle<JSObject> object); | 2222 static void OptimizeAsPrototype(Handle<JSObject> object); |
2223 MUST_USE_RESULT MaybeObject* OptimizeAsPrototype(); | |
2224 | 2223 |
2225 // Retrieve interceptors. | 2224 // Retrieve interceptors. |
2226 InterceptorInfo* GetNamedInterceptor(); | 2225 InterceptorInfo* GetNamedInterceptor(); |
2227 InterceptorInfo* GetIndexedInterceptor(); | 2226 InterceptorInfo* GetIndexedInterceptor(); |
2228 | 2227 |
2229 // Used from JSReceiver. | 2228 // Used from JSReceiver. |
2230 PropertyAttributes GetPropertyAttributePostInterceptor(JSObject* receiver, | 2229 PropertyAttributes GetPropertyAttributePostInterceptor(JSObject* receiver, |
2231 Name* name, | 2230 Name* name, |
2232 bool continue_search); | 2231 bool continue_search); |
2233 PropertyAttributes GetPropertyAttributeWithInterceptor(JSObject* receiver, | 2232 PropertyAttributes GetPropertyAttributeWithInterceptor(JSObject* receiver, |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2307 Handle<Name> key); | 2306 Handle<Name> key); |
2308 // Returns true if the object has a property with the hidden string as name. | 2307 // Returns true if the object has a property with the hidden string as name. |
2309 bool HasHiddenProperties(); | 2308 bool HasHiddenProperties(); |
2310 | 2309 |
2311 static int GetIdentityHash(Handle<JSObject> object); | 2310 static int GetIdentityHash(Handle<JSObject> object); |
2312 static void SetIdentityHash(Handle<JSObject> object, Smi* hash); | 2311 static void SetIdentityHash(Handle<JSObject> object, Smi* hash); |
2313 | 2312 |
2314 inline void ValidateElements(); | 2313 inline void ValidateElements(); |
2315 | 2314 |
2316 // Makes sure that this object can contain HeapObject as elements. | 2315 // Makes sure that this object can contain HeapObject as elements. |
2317 MUST_USE_RESULT inline MaybeObject* EnsureCanContainHeapObjectElements(); | 2316 static inline void EnsureCanContainHeapObjectElements(Handle<JSObject> obj); |
2318 | 2317 |
2319 // Makes sure that this object can contain the specified elements. | 2318 // Makes sure that this object can contain the specified elements. |
2320 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( | 2319 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( |
2321 Object** elements, | 2320 Object** elements, |
2322 uint32_t count, | 2321 uint32_t count, |
2323 EnsureElementsMode mode); | 2322 EnsureElementsMode mode); |
2324 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( | 2323 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( |
2325 FixedArrayBase* elements, | 2324 FixedArrayBase* elements, |
2326 uint32_t length, | 2325 uint32_t length, |
2327 EnsureElementsMode mode); | 2326 EnsureElementsMode mode); |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2562 // SeededNumberDictionary dictionary. Returns the backing after conversion. | 2561 // SeededNumberDictionary dictionary. Returns the backing after conversion. |
2563 static Handle<SeededNumberDictionary> NormalizeElements( | 2562 static Handle<SeededNumberDictionary> NormalizeElements( |
2564 Handle<JSObject> object); | 2563 Handle<JSObject> object); |
2565 | 2564 |
2566 MUST_USE_RESULT MaybeObject* NormalizeElements(); | 2565 MUST_USE_RESULT MaybeObject* NormalizeElements(); |
2567 | 2566 |
2568 static void UpdateMapCodeCache(Handle<JSObject> object, | 2567 static void UpdateMapCodeCache(Handle<JSObject> object, |
2569 Handle<Name> name, | 2568 Handle<Name> name, |
2570 Handle<Code> code); | 2569 Handle<Code> code); |
2571 | 2570 |
2572 MUST_USE_RESULT MaybeObject* UpdateMapCodeCache(Name* name, Code* code); | |
2573 | |
2574 // Transform slow named properties to fast variants. | 2571 // Transform slow named properties to fast variants. |
2575 // Returns failure if allocation failed. | 2572 // Returns failure if allocation failed. |
2576 static void TransformToFastProperties(Handle<JSObject> object, | 2573 static void TransformToFastProperties(Handle<JSObject> object, |
2577 int unused_property_fields); | 2574 int unused_property_fields); |
2578 | 2575 |
2579 MUST_USE_RESULT MaybeObject* TransformToFastProperties( | 2576 MUST_USE_RESULT MaybeObject* TransformToFastProperties( |
2580 int unused_property_fields); | 2577 int unused_property_fields); |
2581 | 2578 |
2582 // Access fast-case object properties at index. | 2579 // Access fast-case object properties at index. |
2583 MUST_USE_RESULT inline MaybeObject* FastPropertyAt( | 2580 MUST_USE_RESULT inline MaybeObject* FastPropertyAt( |
(...skipping 3203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5787 DescriptorArray* descriptors, | 5784 DescriptorArray* descriptors, |
5788 Descriptor* descriptor, | 5785 Descriptor* descriptor, |
5789 int index, | 5786 int index, |
5790 TransitionFlag flag); | 5787 TransitionFlag flag); |
5791 MUST_USE_RESULT MaybeObject* AsElementsKind(ElementsKind kind); | 5788 MUST_USE_RESULT MaybeObject* AsElementsKind(ElementsKind kind); |
5792 | 5789 |
5793 MUST_USE_RESULT MaybeObject* CopyAsElementsKind(ElementsKind kind, | 5790 MUST_USE_RESULT MaybeObject* CopyAsElementsKind(ElementsKind kind, |
5794 TransitionFlag flag); | 5791 TransitionFlag flag); |
5795 MUST_USE_RESULT MaybeObject* CopyForObserved(); | 5792 MUST_USE_RESULT MaybeObject* CopyForObserved(); |
5796 | 5793 |
| 5794 static Handle<Map> CopyNormalized(Handle<Map> map, |
| 5795 PropertyNormalizationMode mode, |
| 5796 NormalizedMapSharingMode sharing); |
5797 MUST_USE_RESULT MaybeObject* CopyNormalized(PropertyNormalizationMode mode, | 5797 MUST_USE_RESULT MaybeObject* CopyNormalized(PropertyNormalizationMode mode, |
5798 NormalizedMapSharingMode sharing); | 5798 NormalizedMapSharingMode sharing); |
5799 | 5799 |
5800 inline void AppendDescriptor(Descriptor* desc, | 5800 inline void AppendDescriptor(Descriptor* desc, |
5801 const DescriptorArray::WhitenessWitness&); | 5801 const DescriptorArray::WhitenessWitness&); |
5802 | 5802 |
5803 // Returns a copy of the map, with all transitions dropped from the | 5803 // Returns a copy of the map, with all transitions dropped from the |
5804 // instance descriptors. | 5804 // instance descriptors. |
5805 static Handle<Map> Copy(Handle<Map> map); | 5805 static Handle<Map> Copy(Handle<Map> map); |
5806 MUST_USE_RESULT MaybeObject* Copy(); | 5806 MUST_USE_RESULT MaybeObject* Copy(); |
(...skipping 4401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10208 } else { | 10208 } else { |
10209 value &= ~(1 << bit_position); | 10209 value &= ~(1 << bit_position); |
10210 } | 10210 } |
10211 return value; | 10211 return value; |
10212 } | 10212 } |
10213 }; | 10213 }; |
10214 | 10214 |
10215 } } // namespace v8::internal | 10215 } } // namespace v8::internal |
10216 | 10216 |
10217 #endif // V8_OBJECTS_H_ | 10217 #endif // V8_OBJECTS_H_ |
OLD | NEW |