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 3011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3022 { | 3022 { |
3023 AllocationResult allocation = AllocateRaw(size, OLD_SPACE); | 3023 AllocationResult allocation = AllocateRaw(size, OLD_SPACE); |
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_profiling_count(interpreter::Interpreter::InterruptBudget()); |
3032 instance->set_constant_pool(constant_pool); | 3033 instance->set_constant_pool(constant_pool); |
3033 instance->set_handler_table(empty_fixed_array()); | 3034 instance->set_handler_table(empty_fixed_array()); |
3034 instance->set_source_position_table(empty_fixed_array()); | 3035 instance->set_source_position_table(empty_fixed_array()); |
3035 CopyBytes(instance->GetFirstBytecodeAddress(), raw_bytecodes, length); | 3036 CopyBytes(instance->GetFirstBytecodeAddress(), raw_bytecodes, length); |
3036 | 3037 |
3037 return result; | 3038 return result; |
3038 } | 3039 } |
3039 | 3040 |
3040 | 3041 |
3041 void Heap::CreateFillerObjectAt(Address addr, int size) { | 3042 void Heap::CreateFillerObjectAt(Address addr, int size) { |
(...skipping 3220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6262 } | 6263 } |
6263 | 6264 |
6264 | 6265 |
6265 // static | 6266 // static |
6266 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6267 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6267 return StaticVisitorBase::GetVisitorId(map); | 6268 return StaticVisitorBase::GetVisitorId(map); |
6268 } | 6269 } |
6269 | 6270 |
6270 } // namespace internal | 6271 } // namespace internal |
6271 } // namespace v8 | 6272 } // namespace v8 |
OLD | NEW |