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/assembler-inl.h" | 9 #include "src/assembler-inl.h" |
10 #include "src/ast/context-slot-cache.h" | 10 #include "src/ast/context-slot-cache.h" |
(...skipping 3085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3096 BytecodeArray* instance = BytecodeArray::cast(result); | 3096 BytecodeArray* instance = BytecodeArray::cast(result); |
3097 instance->set_length(length); | 3097 instance->set_length(length); |
3098 instance->set_frame_size(frame_size); | 3098 instance->set_frame_size(frame_size); |
3099 instance->set_parameter_count(parameter_count); | 3099 instance->set_parameter_count(parameter_count); |
3100 instance->set_interrupt_budget(interpreter::Interpreter::InterruptBudget()); | 3100 instance->set_interrupt_budget(interpreter::Interpreter::InterruptBudget()); |
3101 instance->set_osr_loop_nesting_level(0); | 3101 instance->set_osr_loop_nesting_level(0); |
3102 instance->set_bytecode_age(BytecodeArray::kNoAgeBytecodeAge); | 3102 instance->set_bytecode_age(BytecodeArray::kNoAgeBytecodeAge); |
3103 instance->set_constant_pool(constant_pool); | 3103 instance->set_constant_pool(constant_pool); |
3104 instance->set_handler_table(empty_fixed_array()); | 3104 instance->set_handler_table(empty_fixed_array()); |
3105 instance->set_source_position_table(empty_byte_array()); | 3105 instance->set_source_position_table(empty_byte_array()); |
| 3106 instance->set_stack_frame_cache(Smi::kZero); |
3106 CopyBytes(instance->GetFirstBytecodeAddress(), raw_bytecodes, length); | 3107 CopyBytes(instance->GetFirstBytecodeAddress(), raw_bytecodes, length); |
3107 | 3108 |
3108 return result; | 3109 return result; |
3109 } | 3110 } |
3110 | 3111 |
3111 HeapObject* Heap::CreateFillerObjectAt(Address addr, int size, | 3112 HeapObject* Heap::CreateFillerObjectAt(Address addr, int size, |
3112 ClearRecordedSlots mode) { | 3113 ClearRecordedSlots mode) { |
3113 if (size == 0) return nullptr; | 3114 if (size == 0) return nullptr; |
3114 HeapObject* filler = HeapObject::FromAddress(addr); | 3115 HeapObject* filler = HeapObject::FromAddress(addr); |
3115 if (size == kPointerSize) { | 3116 if (size == kPointerSize) { |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3457 if (!allocation.To(&result)) return allocation; | 3458 if (!allocation.To(&result)) return allocation; |
3458 } | 3459 } |
3459 | 3460 |
3460 result->set_map_no_write_barrier(bytecode_array_map()); | 3461 result->set_map_no_write_barrier(bytecode_array_map()); |
3461 BytecodeArray* copy = BytecodeArray::cast(result); | 3462 BytecodeArray* copy = BytecodeArray::cast(result); |
3462 copy->set_length(bytecode_array->length()); | 3463 copy->set_length(bytecode_array->length()); |
3463 copy->set_frame_size(bytecode_array->frame_size()); | 3464 copy->set_frame_size(bytecode_array->frame_size()); |
3464 copy->set_parameter_count(bytecode_array->parameter_count()); | 3465 copy->set_parameter_count(bytecode_array->parameter_count()); |
3465 copy->set_constant_pool(bytecode_array->constant_pool()); | 3466 copy->set_constant_pool(bytecode_array->constant_pool()); |
3466 copy->set_handler_table(bytecode_array->handler_table()); | 3467 copy->set_handler_table(bytecode_array->handler_table()); |
| 3468 copy->set_stack_frame_cache(bytecode_array->stack_frame_cache()); |
3467 copy->set_source_position_table(bytecode_array->source_position_table()); | 3469 copy->set_source_position_table(bytecode_array->source_position_table()); |
3468 copy->set_interrupt_budget(bytecode_array->interrupt_budget()); | 3470 copy->set_interrupt_budget(bytecode_array->interrupt_budget()); |
3469 copy->set_osr_loop_nesting_level(bytecode_array->osr_loop_nesting_level()); | 3471 copy->set_osr_loop_nesting_level(bytecode_array->osr_loop_nesting_level()); |
3470 copy->set_bytecode_age(bytecode_array->bytecode_age()); | 3472 copy->set_bytecode_age(bytecode_array->bytecode_age()); |
3471 bytecode_array->CopyBytecodesTo(copy); | 3473 bytecode_array->CopyBytecodesTo(copy); |
3472 return copy; | 3474 return copy; |
3473 } | 3475 } |
3474 | 3476 |
3475 void Heap::InitializeAllocationMemento(AllocationMemento* memento, | 3477 void Heap::InitializeAllocationMemento(AllocationMemento* memento, |
3476 AllocationSite* allocation_site) { | 3478 AllocationSite* allocation_site) { |
(...skipping 2924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6401 } | 6403 } |
6402 | 6404 |
6403 | 6405 |
6404 // static | 6406 // static |
6405 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6407 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6406 return StaticVisitorBase::GetVisitorId(map); | 6408 return StaticVisitorBase::GetVisitorId(map); |
6407 } | 6409 } |
6408 | 6410 |
6409 } // namespace internal | 6411 } // namespace internal |
6410 } // namespace v8 | 6412 } // namespace v8 |
OLD | NEW |