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 #include "src/heap/heap.h" | 5 #include "src/heap/heap.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/ast/scopeinfo.h" | 9 #include "src/ast/scopeinfo.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 2240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2251 LayoutDescriptor::FastPointerLayout()); | 2251 LayoutDescriptor::FastPointerLayout()); |
2252 } | 2252 } |
2253 | 2253 |
2254 null_map()->set_code_cache(empty_fixed_array()); | 2254 null_map()->set_code_cache(empty_fixed_array()); |
2255 null_map()->set_dependent_code(DependentCode::cast(empty_fixed_array())); | 2255 null_map()->set_dependent_code(DependentCode::cast(empty_fixed_array())); |
2256 null_map()->set_raw_transitions(Smi::FromInt(0)); | 2256 null_map()->set_raw_transitions(Smi::FromInt(0)); |
2257 null_map()->set_instance_descriptors(empty_descriptor_array()); | 2257 null_map()->set_instance_descriptors(empty_descriptor_array()); |
2258 if (FLAG_unbox_double_fields) { | 2258 if (FLAG_unbox_double_fields) { |
2259 null_map()->set_layout_descriptor(LayoutDescriptor::FastPointerLayout()); | 2259 null_map()->set_layout_descriptor(LayoutDescriptor::FastPointerLayout()); |
2260 } | 2260 } |
| 2261 null_map()->set_is_undetectable(); |
2261 | 2262 |
2262 // Fix prototype object for existing maps. | 2263 // Fix prototype object for existing maps. |
2263 meta_map()->set_prototype(null_value()); | 2264 meta_map()->set_prototype(null_value()); |
2264 meta_map()->set_constructor_or_backpointer(null_value()); | 2265 meta_map()->set_constructor_or_backpointer(null_value()); |
2265 | 2266 |
2266 fixed_array_map()->set_prototype(null_value()); | 2267 fixed_array_map()->set_prototype(null_value()); |
2267 fixed_array_map()->set_constructor_or_backpointer(null_value()); | 2268 fixed_array_map()->set_constructor_or_backpointer(null_value()); |
2268 | 2269 |
2269 undefined_map()->set_prototype(null_value()); | 2270 undefined_map()->set_prototype(null_value()); |
2270 undefined_map()->set_constructor_or_backpointer(null_value()); | 2271 undefined_map()->set_constructor_or_backpointer(null_value()); |
| 2272 undefined_map()->set_is_undetectable(); |
2271 | 2273 |
2272 null_map()->set_prototype(null_value()); | 2274 null_map()->set_prototype(null_value()); |
2273 null_map()->set_constructor_or_backpointer(null_value()); | 2275 null_map()->set_constructor_or_backpointer(null_value()); |
2274 | 2276 |
2275 { // Map allocation | 2277 { // Map allocation |
2276 #define ALLOCATE_MAP(instance_type, size, field_name) \ | 2278 #define ALLOCATE_MAP(instance_type, size, field_name) \ |
2277 { \ | 2279 { \ |
2278 Map* map; \ | 2280 Map* map; \ |
2279 if (!AllocateMap((instance_type), size).To(&map)) return false; \ | 2281 if (!AllocateMap((instance_type), size).To(&map)) return false; \ |
2280 set_##field_name##_map(map); \ | 2282 set_##field_name##_map(map); \ |
(...skipping 3901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6182 } | 6184 } |
6183 | 6185 |
6184 | 6186 |
6185 // static | 6187 // static |
6186 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6188 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6187 return StaticVisitorBase::GetVisitorId(map); | 6189 return StaticVisitorBase::GetVisitorId(map); |
6188 } | 6190 } |
6189 | 6191 |
6190 } // namespace internal | 6192 } // namespace internal |
6191 } // namespace v8 | 6193 } // namespace v8 |
OLD | NEW |