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 2136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2147 static void AllocateStorageForMap(Handle<JSObject> object, Handle<Map> map); | 2147 static void AllocateStorageForMap(Handle<JSObject> object, Handle<Map> map); |
2148 | 2148 |
2149 // Migrates the given object to a map whose field representations are the | 2149 // Migrates the given object to a map whose field representations are the |
2150 // lowest upper bound of all known representations for that field. | 2150 // lowest upper bound of all known representations for that field. |
2151 static void MigrateInstance(Handle<JSObject> instance); | 2151 static void MigrateInstance(Handle<JSObject> instance); |
2152 | 2152 |
2153 // Migrates the given object only if the target map is already available, | 2153 // Migrates the given object only if the target map is already available, |
2154 // or returns false if such a map is not yet available. | 2154 // or returns false if such a map is not yet available. |
2155 static bool TryMigrateInstance(Handle<JSObject> instance); | 2155 static bool TryMigrateInstance(Handle<JSObject> instance); |
2156 | 2156 |
2157 // Retrieve a value in a normalized object given a lookup result. | |
2158 // Handles the special representation of JS global objects. | |
2159 Object* GetNormalizedProperty(const LookupResult* result); | |
2160 | |
2161 // Sets the property value in a normalized object given (key, value, details). | 2157 // Sets the property value in a normalized object given (key, value, details). |
2162 // Handles the special representation of JS global objects. | 2158 // Handles the special representation of JS global objects. |
2163 static void SetNormalizedProperty(Handle<JSObject> object, | 2159 static void SetNormalizedProperty(Handle<JSObject> object, |
2164 Handle<Name> key, | 2160 Handle<Name> key, |
2165 Handle<Object> value, | 2161 Handle<Object> value, |
2166 PropertyDetails details); | 2162 PropertyDetails details); |
2167 | 2163 |
2168 static void OptimizeAsPrototype(Handle<JSObject> object, | 2164 static void OptimizeAsPrototype(Handle<JSObject> object, |
2169 PrototypeOptimizationMode mode); | 2165 PrototypeOptimizationMode mode); |
2170 static void ReoptimizeIfPrototype(Handle<JSObject> object); | 2166 static void ReoptimizeIfPrototype(Handle<JSObject> object); |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2473 MUST_USE_RESULT static MaybeHandle<JSObject> DeepCopy( | 2469 MUST_USE_RESULT static MaybeHandle<JSObject> DeepCopy( |
2474 Handle<JSObject> object, | 2470 Handle<JSObject> object, |
2475 AllocationSiteUsageContext* site_context, | 2471 AllocationSiteUsageContext* site_context, |
2476 DeepCopyHints hints = kNoHints); | 2472 DeepCopyHints hints = kNoHints); |
2477 MUST_USE_RESULT static MaybeHandle<JSObject> DeepWalk( | 2473 MUST_USE_RESULT static MaybeHandle<JSObject> DeepWalk( |
2478 Handle<JSObject> object, | 2474 Handle<JSObject> object, |
2479 AllocationSiteCreationContext* site_context); | 2475 AllocationSiteCreationContext* site_context); |
2480 | 2476 |
2481 static Handle<Object> GetDataProperty(Handle<JSObject> object, | 2477 static Handle<Object> GetDataProperty(Handle<JSObject> object, |
2482 Handle<Name> key); | 2478 Handle<Name> key); |
| 2479 static Handle<Object> GetDataProperty(LookupIterator* it); |
2483 | 2480 |
2484 DECLARE_CAST(JSObject) | 2481 DECLARE_CAST(JSObject) |
2485 | 2482 |
2486 // Dispatched behavior. | 2483 // Dispatched behavior. |
2487 void JSObjectShortPrint(StringStream* accumulator); | 2484 void JSObjectShortPrint(StringStream* accumulator); |
2488 DECLARE_PRINTER(JSObject) | 2485 DECLARE_PRINTER(JSObject) |
2489 DECLARE_VERIFIER(JSObject) | 2486 DECLARE_VERIFIER(JSObject) |
2490 #ifdef OBJECT_PRINT | 2487 #ifdef OBJECT_PRINT |
2491 void PrintProperties(OStream& os); // NOLINT | 2488 void PrintProperties(OStream& os); // NOLINT |
2492 void PrintElements(OStream& os); // NOLINT | 2489 void PrintElements(OStream& os); // NOLINT |
(...skipping 8703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11196 } else { | 11193 } else { |
11197 value &= ~(1 << bit_position); | 11194 value &= ~(1 << bit_position); |
11198 } | 11195 } |
11199 return value; | 11196 return value; |
11200 } | 11197 } |
11201 }; | 11198 }; |
11202 | 11199 |
11203 } } // namespace v8::internal | 11200 } } // namespace v8::internal |
11204 | 11201 |
11205 #endif // V8_OBJECTS_H_ | 11202 #endif // V8_OBJECTS_H_ |
OLD | NEW |