| 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 2238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2249 if (create_heap_objects) { | 2249 if (create_heap_objects) { |
| 2250 // Terminate the cache array with the sentinel so we can iterate. | 2250 // Terminate the cache array with the sentinel so we can iterate. |
| 2251 PushToPartialSnapshotCache(heap_.undefined_value()); | 2251 PushToPartialSnapshotCache(heap_.undefined_value()); |
| 2252 } | 2252 } |
| 2253 | 2253 |
| 2254 InitializeThreadLocal(); | 2254 InitializeThreadLocal(); |
| 2255 | 2255 |
| 2256 bootstrapper_->Initialize(create_heap_objects); | 2256 bootstrapper_->Initialize(create_heap_objects); |
| 2257 builtins_.SetUp(this, create_heap_objects); | 2257 builtins_.SetUp(this, create_heap_objects); |
| 2258 | 2258 |
| 2259 if (create_heap_objects) heap_.CreateStubsRequiringBuiltins(); |
| 2260 |
| 2259 // Only preallocate on the first initialization. | 2261 // Only preallocate on the first initialization. |
| 2260 if (FLAG_preallocate_message_memory && preallocated_message_space_ == NULL) { | 2262 if (FLAG_preallocate_message_memory && preallocated_message_space_ == NULL) { |
| 2261 // Start the thread which will set aside some memory. | 2263 // Start the thread which will set aside some memory. |
| 2262 PreallocatedMemoryThreadStart(); | 2264 PreallocatedMemoryThreadStart(); |
| 2263 preallocated_message_space_ = | 2265 preallocated_message_space_ = |
| 2264 new NoAllocationStringAllocator( | 2266 new NoAllocationStringAllocator( |
| 2265 preallocated_memory_thread_->data(), | 2267 preallocated_memory_thread_->data(), |
| 2266 preallocated_memory_thread_->length()); | 2268 preallocated_memory_thread_->length()); |
| 2267 PreallocatedStorageInit(preallocated_memory_thread_->length() / 4); | 2269 PreallocatedStorageInit(preallocated_memory_thread_->length() / 4); |
| 2268 } | 2270 } |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2325 kDeoptTableSerializeEntryCount - 1); | 2327 kDeoptTableSerializeEntryCount - 1); |
| 2326 } | 2328 } |
| 2327 | 2329 |
| 2328 if (!Serializer::enabled()) { | 2330 if (!Serializer::enabled()) { |
| 2329 // Ensure that all stubs which need to be generated ahead of time, but | 2331 // Ensure that all stubs which need to be generated ahead of time, but |
| 2330 // cannot be serialized into the snapshot have been generated. | 2332 // cannot be serialized into the snapshot have been generated. |
| 2331 HandleScope scope(this); | 2333 HandleScope scope(this); |
| 2332 CodeStub::GenerateFPStubs(this); | 2334 CodeStub::GenerateFPStubs(this); |
| 2333 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(this); | 2335 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(this); |
| 2334 StubFailureTrampolineStub::GenerateAheadOfTime(this); | 2336 StubFailureTrampolineStub::GenerateAheadOfTime(this); |
| 2337 StubFailureTailCallTrampolineStub::GenerateAheadOfTime(this); |
| 2335 // TODO(mstarzinger): The following is an ugly hack to make sure the | 2338 // TODO(mstarzinger): The following is an ugly hack to make sure the |
| 2336 // interface descriptor is initialized even when stubs have been | 2339 // interface descriptor is initialized even when stubs have been |
| 2337 // deserialized out of the snapshot without the graph builder. | 2340 // deserialized out of the snapshot without the graph builder. |
| 2338 FastCloneShallowArrayStub stub(FastCloneShallowArrayStub::CLONE_ELEMENTS, | 2341 FastCloneShallowArrayStub stub(FastCloneShallowArrayStub::CLONE_ELEMENTS, |
| 2339 DONT_TRACK_ALLOCATION_SITE, 0); | 2342 DONT_TRACK_ALLOCATION_SITE, 0); |
| 2340 stub.InitializeInterfaceDescriptor( | 2343 stub.InitializeInterfaceDescriptor( |
| 2341 this, code_stub_interface_descriptor(CodeStub::FastCloneShallowArray)); | 2344 this, code_stub_interface_descriptor(CodeStub::FastCloneShallowArray)); |
| 2342 CompareNilICStub::InitializeForIsolate(this); | 2345 CompareNilICStub::InitializeForIsolate(this); |
| 2343 ToBooleanStub::InitializeForIsolate(this); | 2346 ToBooleanStub::InitializeForIsolate(this); |
| 2344 ArrayConstructorStubBase::InstallDescriptors(this); | 2347 ArrayConstructorStubBase::InstallDescriptors(this); |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2542 | 2545 |
| 2543 #ifdef DEBUG | 2546 #ifdef DEBUG |
| 2544 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2547 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 2545 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2548 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
| 2546 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2549 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 2547 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2550 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 2548 #undef ISOLATE_FIELD_OFFSET | 2551 #undef ISOLATE_FIELD_OFFSET |
| 2549 #endif | 2552 #endif |
| 2550 | 2553 |
| 2551 } } // namespace v8::internal | 2554 } } // namespace v8::internal |
| OLD | NEW |