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_interrupt_budget(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 3245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6287 } | 6288 } |
6288 | 6289 |
6289 | 6290 |
6290 // static | 6291 // static |
6291 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6292 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6292 return StaticVisitorBase::GetVisitorId(map); | 6293 return StaticVisitorBase::GetVisitorId(map); |
6293 } | 6294 } |
6294 | 6295 |
6295 } // namespace internal | 6296 } // namespace internal |
6296 } // namespace v8 | 6297 } // namespace v8 |
OLD | NEW |