OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 5502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5513 int number_of_ptr_entries, | 5513 int number_of_ptr_entries, |
5514 int number_of_int32_entries) { | 5514 int number_of_int32_entries) { |
5515 ASSERT(number_of_int64_entries > 0 || number_of_ptr_entries > 0 || | 5515 ASSERT(number_of_int64_entries > 0 || number_of_ptr_entries > 0 || |
5516 number_of_int32_entries > 0); | 5516 number_of_int32_entries > 0); |
5517 int size = ConstantPoolArray::SizeFor(number_of_int64_entries, | 5517 int size = ConstantPoolArray::SizeFor(number_of_int64_entries, |
5518 number_of_ptr_entries, | 5518 number_of_ptr_entries, |
5519 number_of_int32_entries); | 5519 number_of_int32_entries); |
5520 #ifndef V8_HOST_ARCH_64_BIT | 5520 #ifndef V8_HOST_ARCH_64_BIT |
5521 size += kPointerSize; | 5521 size += kPointerSize; |
5522 #endif | 5522 #endif |
| 5523 AllocationSpace space = SelectSpace(size, OLD_POINTER_SPACE, TENURED); |
5523 | 5524 |
5524 HeapObject* object; | 5525 HeapObject* object; |
5525 { MaybeObject* maybe_object = old_pointer_space_->AllocateRaw(size); | 5526 { MaybeObject* maybe_object = AllocateRaw(size, space, OLD_POINTER_SPACE); |
5526 if (!maybe_object->To<HeapObject>(&object)) return maybe_object; | 5527 if (!maybe_object->To<HeapObject>(&object)) return maybe_object; |
5527 } | 5528 } |
5528 object = EnsureDoubleAligned(this, object, size); | 5529 object = EnsureDoubleAligned(this, object, size); |
5529 HeapObject::cast(object)->set_map_no_write_barrier(constant_pool_array_map()); | 5530 HeapObject::cast(object)->set_map_no_write_barrier(constant_pool_array_map()); |
5530 | 5531 |
5531 ConstantPoolArray* constant_pool = | 5532 ConstantPoolArray* constant_pool = |
5532 reinterpret_cast<ConstantPoolArray*>(object); | 5533 reinterpret_cast<ConstantPoolArray*>(object); |
5533 constant_pool->SetEntryCounts(number_of_int64_entries, | 5534 constant_pool->SetEntryCounts(number_of_int64_entries, |
5534 number_of_ptr_entries, | 5535 number_of_ptr_entries, |
5535 number_of_int32_entries); | 5536 number_of_int32_entries); |
(...skipping 2402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7938 if (FLAG_concurrent_recompilation) { | 7939 if (FLAG_concurrent_recompilation) { |
7939 heap_->relocation_mutex_->Lock(); | 7940 heap_->relocation_mutex_->Lock(); |
7940 #ifdef DEBUG | 7941 #ifdef DEBUG |
7941 heap_->relocation_mutex_locked_by_optimizer_thread_ = | 7942 heap_->relocation_mutex_locked_by_optimizer_thread_ = |
7942 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); | 7943 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); |
7943 #endif // DEBUG | 7944 #endif // DEBUG |
7944 } | 7945 } |
7945 } | 7946 } |
7946 | 7947 |
7947 } } // namespace v8::internal | 7948 } } // namespace v8::internal |
OLD | NEW |