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 3018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3029 } | 3029 } |
3030 | 3030 |
3031 result->set_map_no_write_barrier(bytecode_array_map()); | 3031 result->set_map_no_write_barrier(bytecode_array_map()); |
3032 BytecodeArray* instance = BytecodeArray::cast(result); | 3032 BytecodeArray* instance = BytecodeArray::cast(result); |
3033 instance->set_length(length); | 3033 instance->set_length(length); |
3034 instance->set_frame_size(frame_size); | 3034 instance->set_frame_size(frame_size); |
3035 instance->set_parameter_count(parameter_count); | 3035 instance->set_parameter_count(parameter_count); |
3036 instance->set_interrupt_budget(interpreter::Interpreter::InterruptBudget()); | 3036 instance->set_interrupt_budget(interpreter::Interpreter::InterruptBudget()); |
3037 instance->set_constant_pool(constant_pool); | 3037 instance->set_constant_pool(constant_pool); |
3038 instance->set_handler_table(empty_fixed_array()); | 3038 instance->set_handler_table(empty_fixed_array()); |
3039 instance->set_source_position_table(empty_fixed_array()); | 3039 instance->set_source_position_table(empty_byte_array()); |
3040 CopyBytes(instance->GetFirstBytecodeAddress(), raw_bytecodes, length); | 3040 CopyBytes(instance->GetFirstBytecodeAddress(), raw_bytecodes, length); |
3041 | 3041 |
3042 return result; | 3042 return result; |
3043 } | 3043 } |
3044 | 3044 |
3045 | 3045 |
3046 void Heap::CreateFillerObjectAt(Address addr, int size) { | 3046 void Heap::CreateFillerObjectAt(Address addr, int size) { |
3047 if (size == 0) return; | 3047 if (size == 0) return; |
3048 HeapObject* filler = HeapObject::FromAddress(addr); | 3048 HeapObject* filler = HeapObject::FromAddress(addr); |
3049 if (size == kPointerSize) { | 3049 if (size == kPointerSize) { |
(...skipping 3275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6325 } | 6325 } |
6326 | 6326 |
6327 | 6327 |
6328 // static | 6328 // static |
6329 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6329 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6330 return StaticVisitorBase::GetVisitorId(map); | 6330 return StaticVisitorBase::GetVisitorId(map); |
6331 } | 6331 } |
6332 | 6332 |
6333 } // namespace internal | 6333 } // namespace internal |
6334 } // namespace v8 | 6334 } // namespace v8 |
OLD | NEW |