| 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 2399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2410 #undef ALLOCATE_PRIMITIVE_MAP | 2410 #undef ALLOCATE_PRIMITIVE_MAP |
| 2411 #undef ALLOCATE_VARSIZE_MAP | 2411 #undef ALLOCATE_VARSIZE_MAP |
| 2412 #undef ALLOCATE_MAP | 2412 #undef ALLOCATE_MAP |
| 2413 } | 2413 } |
| 2414 | 2414 |
| 2415 { // Empty arrays | 2415 { // Empty arrays |
| 2416 { | 2416 { |
| 2417 ByteArray* byte_array; | 2417 ByteArray* byte_array; |
| 2418 if (!AllocateByteArray(0, TENURED).To(&byte_array)) return false; | 2418 if (!AllocateByteArray(0, TENURED).To(&byte_array)) return false; |
| 2419 set_empty_byte_array(byte_array); | 2419 set_empty_byte_array(byte_array); |
| 2420 | |
| 2421 BytecodeArray* bytecode_array = nullptr; | |
| 2422 AllocationResult allocation = | |
| 2423 AllocateBytecodeArray(0, nullptr, 0, 0, empty_fixed_array()); | |
| 2424 if (!allocation.To(&bytecode_array)) { | |
| 2425 return false; | |
| 2426 } | |
| 2427 set_empty_bytecode_array(bytecode_array); | |
| 2428 } | 2420 } |
| 2429 | 2421 |
| 2430 #define ALLOCATE_EMPTY_FIXED_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ | 2422 #define ALLOCATE_EMPTY_FIXED_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ |
| 2431 { \ | 2423 { \ |
| 2432 FixedTypedArrayBase* obj; \ | 2424 FixedTypedArrayBase* obj; \ |
| 2433 if (!AllocateEmptyFixedTypedArray(kExternal##Type##Array).To(&obj)) \ | 2425 if (!AllocateEmptyFixedTypedArray(kExternal##Type##Array).To(&obj)) \ |
| 2434 return false; \ | 2426 return false; \ |
| 2435 set_empty_fixed_##type##_array(obj); \ | 2427 set_empty_fixed_##type##_array(obj); \ |
| 2436 } | 2428 } |
| 2437 | 2429 |
| (...skipping 3784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6222 } | 6214 } |
| 6223 | 6215 |
| 6224 | 6216 |
| 6225 // static | 6217 // static |
| 6226 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6218 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6227 return StaticVisitorBase::GetVisitorId(map); | 6219 return StaticVisitorBase::GetVisitorId(map); |
| 6228 } | 6220 } |
| 6229 | 6221 |
| 6230 } // namespace internal | 6222 } // namespace internal |
| 6231 } // namespace v8 | 6223 } // namespace v8 |
| OLD | NEW |