| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/assert-scope.h" | 10 #include "src/assert-scope.h" |
| (...skipping 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2301 ElementsKind to_kind); | 2301 ElementsKind to_kind); |
| 2302 static void TransitionElementsKind(Handle<JSObject> object, | 2302 static void TransitionElementsKind(Handle<JSObject> object, |
| 2303 ElementsKind to_kind); | 2303 ElementsKind to_kind); |
| 2304 | 2304 |
| 2305 // Always use this to migrate an object to a new map. | 2305 // Always use this to migrate an object to a new map. |
| 2306 // |expected_additional_properties| is only used for fast-to-slow transitions | 2306 // |expected_additional_properties| is only used for fast-to-slow transitions |
| 2307 // and ignored otherwise. | 2307 // and ignored otherwise. |
| 2308 static void MigrateToMap(Handle<JSObject> object, Handle<Map> new_map, | 2308 static void MigrateToMap(Handle<JSObject> object, Handle<Map> new_map, |
| 2309 int expected_additional_properties = 0); | 2309 int expected_additional_properties = 0); |
| 2310 | 2310 |
| 2311 // Forces a prototype without any of the checks that the regular SetPrototype |
| 2312 // would do. |
| 2313 static void ForceSetPrototype(Handle<JSObject> object, Handle<Object> proto); |
| 2314 |
| 2311 // Convert the object to use the canonical dictionary | 2315 // Convert the object to use the canonical dictionary |
| 2312 // representation. If the object is expected to have additional properties | 2316 // representation. If the object is expected to have additional properties |
| 2313 // added this number can be indicated to have the backing store allocated to | 2317 // added this number can be indicated to have the backing store allocated to |
| 2314 // an initial capacity for holding these properties. | 2318 // an initial capacity for holding these properties. |
| 2315 static void NormalizeProperties(Handle<JSObject> object, | 2319 static void NormalizeProperties(Handle<JSObject> object, |
| 2316 PropertyNormalizationMode mode, | 2320 PropertyNormalizationMode mode, |
| 2317 int expected_additional_properties, | 2321 int expected_additional_properties, |
| 2318 const char* reason); | 2322 const char* reason); |
| 2319 | 2323 |
| 2320 // Convert and update the elements backing store to be a | 2324 // Convert and update the elements backing store to be a |
| (...skipping 8672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10993 } | 10997 } |
| 10994 return value; | 10998 return value; |
| 10995 } | 10999 } |
| 10996 }; | 11000 }; |
| 10997 | 11001 |
| 10998 | 11002 |
| 10999 } // NOLINT, false-positive due to second-order macros. | 11003 } // NOLINT, false-positive due to second-order macros. |
| 11000 } // NOLINT, false-positive due to second-order macros. | 11004 } // NOLINT, false-positive due to second-order macros. |
| 11001 | 11005 |
| 11002 #endif // V8_OBJECTS_H_ | 11006 #endif // V8_OBJECTS_H_ |
| OLD | NEW |