| 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 2230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2241 Handle<Map> old_map(object->map(), isolate()); | 2241 Handle<Map> old_map(object->map(), isolate()); |
| 2242 | 2242 |
| 2243 // The proxy's hash should be retained across reinitialization. | 2243 // The proxy's hash should be retained across reinitialization. |
| 2244 Handle<Object> hash(object->hash(), isolate()); | 2244 Handle<Object> hash(object->hash(), isolate()); |
| 2245 | 2245 |
| 2246 if (old_map->is_prototype_map()) { | 2246 if (old_map->is_prototype_map()) { |
| 2247 map = Map::Copy(map, "CopyAsPrototypeForJSGlobalProxy"); | 2247 map = Map::Copy(map, "CopyAsPrototypeForJSGlobalProxy"); |
| 2248 map->set_is_prototype_map(true); | 2248 map->set_is_prototype_map(true); |
| 2249 } | 2249 } |
| 2250 JSObject::NotifyMapChange(old_map, map, isolate()); | 2250 JSObject::NotifyMapChange(old_map, map, isolate()); |
| 2251 old_map->NotifyLeafMapLayoutChange(); |
| 2251 | 2252 |
| 2252 // Check that the already allocated object has the same size and type as | 2253 // Check that the already allocated object has the same size and type as |
| 2253 // objects allocated using the constructor. | 2254 // objects allocated using the constructor. |
| 2254 DCHECK(map->instance_size() == old_map->instance_size()); | 2255 DCHECK(map->instance_size() == old_map->instance_size()); |
| 2255 DCHECK(map->instance_type() == old_map->instance_type()); | 2256 DCHECK(map->instance_type() == old_map->instance_type()); |
| 2256 | 2257 |
| 2257 // Allocate the backing storage for the properties. | 2258 // Allocate the backing storage for the properties. |
| 2258 Handle<FixedArray> properties = empty_fixed_array(); | 2259 Handle<FixedArray> properties = empty_fixed_array(); |
| 2259 | 2260 |
| 2260 // In order to keep heap in consistent state there must be no allocations | 2261 // In order to keep heap in consistent state there must be no allocations |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2778 Handle<AccessorInfo> prototype = | 2779 Handle<AccessorInfo> prototype = |
| 2779 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs); | 2780 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs); |
| 2780 Descriptor d = Descriptor::AccessorConstant( | 2781 Descriptor d = Descriptor::AccessorConstant( |
| 2781 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs); | 2782 Handle<Name>(Name::cast(prototype->name())), prototype, rw_attribs); |
| 2782 map->AppendDescriptor(&d); | 2783 map->AppendDescriptor(&d); |
| 2783 } | 2784 } |
| 2784 } | 2785 } |
| 2785 | 2786 |
| 2786 } // namespace internal | 2787 } // namespace internal |
| 2787 } // namespace v8 | 2788 } // namespace v8 |
| OLD | NEW |