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 3038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3049 AllocationResult allocation = AllocateRaw(size, OLD_SPACE); | 3049 AllocationResult allocation = AllocateRaw(size, OLD_SPACE); |
3050 if (!allocation.To(&result)) return allocation; | 3050 if (!allocation.To(&result)) return allocation; |
3051 } | 3051 } |
3052 | 3052 |
3053 result->set_map_no_write_barrier(bytecode_array_map()); | 3053 result->set_map_no_write_barrier(bytecode_array_map()); |
3054 BytecodeArray* instance = BytecodeArray::cast(result); | 3054 BytecodeArray* instance = BytecodeArray::cast(result); |
3055 instance->set_length(length); | 3055 instance->set_length(length); |
3056 instance->set_frame_size(frame_size); | 3056 instance->set_frame_size(frame_size); |
3057 instance->set_parameter_count(parameter_count); | 3057 instance->set_parameter_count(parameter_count); |
3058 instance->set_constant_pool(constant_pool); | 3058 instance->set_constant_pool(constant_pool); |
| 3059 instance->set_handler_table(empty_fixed_array()); |
3059 CopyBytes(instance->GetFirstBytecodeAddress(), raw_bytecodes, length); | 3060 CopyBytes(instance->GetFirstBytecodeAddress(), raw_bytecodes, length); |
3060 | 3061 |
3061 return result; | 3062 return result; |
3062 } | 3063 } |
3063 | 3064 |
3064 | 3065 |
3065 void Heap::CreateFillerObjectAt(Address addr, int size) { | 3066 void Heap::CreateFillerObjectAt(Address addr, int size) { |
3066 if (size == 0) return; | 3067 if (size == 0) return; |
3067 HeapObject* filler = HeapObject::FromAddress(addr); | 3068 HeapObject* filler = HeapObject::FromAddress(addr); |
3068 if (size == kPointerSize) { | 3069 if (size == kPointerSize) { |
(...skipping 3173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6242 } | 6243 } |
6243 | 6244 |
6244 | 6245 |
6245 // static | 6246 // static |
6246 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6247 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6247 return StaticVisitorBase::GetVisitorId(map); | 6248 return StaticVisitorBase::GetVisitorId(map); |
6248 } | 6249 } |
6249 | 6250 |
6250 } // namespace internal | 6251 } // namespace internal |
6251 } // namespace v8 | 6252 } // namespace v8 |
OLD | NEW |