| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/factory.h" | 5 #include "src/factory.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/allocation-site-scopes.h" | 8 #include "src/allocation-site-scopes.h" |
| 9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 2312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2323 Handle<Map> old_map(object->map(), isolate()); | 2323 Handle<Map> old_map(object->map(), isolate()); |
| 2324 | 2324 |
| 2325 // The proxy's hash should be retained across reinitialization. | 2325 // The proxy's hash should be retained across reinitialization. |
| 2326 Handle<Object> hash(object->hash(), isolate()); | 2326 Handle<Object> hash(object->hash(), isolate()); |
| 2327 | 2327 |
| 2328 if (old_map->is_prototype_map()) { | 2328 if (old_map->is_prototype_map()) { |
| 2329 map = Map::Copy(map, "CopyAsPrototypeForJSGlobalProxy"); | 2329 map = Map::Copy(map, "CopyAsPrototypeForJSGlobalProxy"); |
| 2330 map->set_is_prototype_map(true); | 2330 map->set_is_prototype_map(true); |
| 2331 } | 2331 } |
| 2332 JSObject::NotifyMapChange(old_map, map, isolate()); | 2332 JSObject::NotifyMapChange(old_map, map, isolate()); |
| 2333 old_map->NotifyLeafMapLayoutChange(); |
| 2333 | 2334 |
| 2334 // Check that the already allocated object has the same size and type as | 2335 // Check that the already allocated object has the same size and type as |
| 2335 // objects allocated using the constructor. | 2336 // objects allocated using the constructor. |
| 2336 DCHECK(map->instance_size() == old_map->instance_size()); | 2337 DCHECK(map->instance_size() == old_map->instance_size()); |
| 2337 DCHECK(map->instance_type() == old_map->instance_type()); | 2338 DCHECK(map->instance_type() == old_map->instance_type()); |
| 2338 | 2339 |
| 2339 // Allocate the backing storage for the properties. | 2340 // Allocate the backing storage for the properties. |
| 2340 Handle<FixedArray> properties = empty_fixed_array(); | 2341 Handle<FixedArray> properties = empty_fixed_array(); |
| 2341 | 2342 |
| 2342 // In order to keep heap in consistent state there must be no allocations | 2343 // In order to keep heap in consistent state there must be no allocations |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2866 Handle<AccessorInfo> prototype = | 2867 Handle<AccessorInfo> prototype = |
| 2867 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs); | 2868 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs); |
| 2868 Descriptor d = Descriptor::AccessorConstant( | 2869 Descriptor d = Descriptor::AccessorConstant( |
| 2869 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs); | 2870 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs); |
| 2870 map->AppendDescriptor(&d); | 2871 map->AppendDescriptor(&d); |
| 2871 } | 2872 } |
| 2872 } | 2873 } |
| 2873 | 2874 |
| 2874 } // namespace internal | 2875 } // namespace internal |
| 2875 } // namespace v8 | 2876 } // namespace v8 |
| OLD | NEW |