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 3013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3024 if (!allocation.To(&result)) return allocation; | 3024 if (!allocation.To(&result)) return allocation; |
3025 } | 3025 } |
3026 | 3026 |
3027 result->set_map_no_write_barrier(bytecode_array_map()); | 3027 result->set_map_no_write_barrier(bytecode_array_map()); |
3028 BytecodeArray* instance = BytecodeArray::cast(result); | 3028 BytecodeArray* instance = BytecodeArray::cast(result); |
3029 instance->set_length(length); | 3029 instance->set_length(length); |
3030 instance->set_frame_size(frame_size); | 3030 instance->set_frame_size(frame_size); |
3031 instance->set_parameter_count(parameter_count); | 3031 instance->set_parameter_count(parameter_count); |
3032 instance->set_constant_pool(constant_pool); | 3032 instance->set_constant_pool(constant_pool); |
3033 instance->set_handler_table(empty_fixed_array()); | 3033 instance->set_handler_table(empty_fixed_array()); |
3034 instance->set_source_position_table(empty_byte_array()); | 3034 instance->set_source_position_table(empty_fixed_array()); |
3035 CopyBytes(instance->GetFirstBytecodeAddress(), raw_bytecodes, length); | 3035 CopyBytes(instance->GetFirstBytecodeAddress(), raw_bytecodes, length); |
3036 | 3036 |
3037 return result; | 3037 return result; |
3038 } | 3038 } |
3039 | 3039 |
3040 | 3040 |
3041 void Heap::CreateFillerObjectAt(Address addr, int size) { | 3041 void Heap::CreateFillerObjectAt(Address addr, int size) { |
3042 if (size == 0) return; | 3042 if (size == 0) return; |
3043 HeapObject* filler = HeapObject::FromAddress(addr); | 3043 HeapObject* filler = HeapObject::FromAddress(addr); |
3044 if (size == kPointerSize) { | 3044 if (size == kPointerSize) { |
(...skipping 3188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6233 } | 6233 } |
6234 | 6234 |
6235 | 6235 |
6236 // static | 6236 // static |
6237 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6237 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6238 return StaticVisitorBase::GetVisitorId(map); | 6238 return StaticVisitorBase::GetVisitorId(map); |
6239 } | 6239 } |
6240 | 6240 |
6241 } // namespace internal | 6241 } // namespace internal |
6242 } // namespace v8 | 6242 } // namespace v8 |
OLD | NEW |