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 1911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1922 } | 1922 } |
1923 | 1923 |
1924 // We must stop the logger before we tear down other components. | 1924 // We must stop the logger before we tear down other components. |
1925 Sampler* sampler = logger_->sampler(); | 1925 Sampler* sampler = logger_->sampler(); |
1926 if (sampler && sampler->IsActive()) sampler->Stop(); | 1926 if (sampler && sampler->IsActive()) sampler->Stop(); |
1927 | 1927 |
1928 delete deoptimizer_data_; | 1928 delete deoptimizer_data_; |
1929 deoptimizer_data_ = NULL; | 1929 deoptimizer_data_ = NULL; |
1930 if (FLAG_preemption) { | 1930 if (FLAG_preemption) { |
1931 v8::Locker locker(reinterpret_cast<v8::Isolate*>(this)); | 1931 v8::Locker locker(reinterpret_cast<v8::Isolate*>(this)); |
1932 v8::Locker::StopPreemption(); | 1932 v8::Locker::StopPreemption(reinterpret_cast<v8::Isolate*>(this)); |
1933 } | 1933 } |
1934 builtins_.TearDown(); | 1934 builtins_.TearDown(); |
1935 bootstrapper_->TearDown(); | 1935 bootstrapper_->TearDown(); |
1936 | 1936 |
1937 // Remove the external reference to the preallocated stack memory. | 1937 // Remove the external reference to the preallocated stack memory. |
1938 delete preallocated_message_space_; | 1938 delete preallocated_message_space_; |
1939 preallocated_message_space_ = NULL; | 1939 preallocated_message_space_ = NULL; |
1940 PreallocatedMemoryThreadStop(); | 1940 PreallocatedMemoryThreadStop(); |
1941 | 1941 |
1942 if (runtime_profiler_ != NULL) { | 1942 if (runtime_profiler_ != NULL) { |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2264 PreallocatedMemoryThreadStart(); | 2264 PreallocatedMemoryThreadStart(); |
2265 preallocated_message_space_ = | 2265 preallocated_message_space_ = |
2266 new NoAllocationStringAllocator( | 2266 new NoAllocationStringAllocator( |
2267 preallocated_memory_thread_->data(), | 2267 preallocated_memory_thread_->data(), |
2268 preallocated_memory_thread_->length()); | 2268 preallocated_memory_thread_->length()); |
2269 PreallocatedStorageInit(preallocated_memory_thread_->length() / 4); | 2269 PreallocatedStorageInit(preallocated_memory_thread_->length() / 4); |
2270 } | 2270 } |
2271 | 2271 |
2272 if (FLAG_preemption) { | 2272 if (FLAG_preemption) { |
2273 v8::Locker locker(reinterpret_cast<v8::Isolate*>(this)); | 2273 v8::Locker locker(reinterpret_cast<v8::Isolate*>(this)); |
2274 v8::Locker::StartPreemption(100); | 2274 v8::Locker::StartPreemption(reinterpret_cast<v8::Isolate*>(this), 100); |
2275 } | 2275 } |
2276 | 2276 |
2277 #ifdef ENABLE_DEBUGGER_SUPPORT | 2277 #ifdef ENABLE_DEBUGGER_SUPPORT |
2278 debug_->SetUp(create_heap_objects); | 2278 debug_->SetUp(create_heap_objects); |
2279 #endif | 2279 #endif |
2280 | 2280 |
2281 // If we are deserializing, read the state into the now-empty heap. | 2281 // If we are deserializing, read the state into the now-empty heap. |
2282 if (!create_heap_objects) { | 2282 if (!create_heap_objects) { |
2283 des->Deserialize(this); | 2283 des->Deserialize(this); |
2284 } | 2284 } |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2542 | 2542 |
2543 #ifdef DEBUG | 2543 #ifdef DEBUG |
2544 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2544 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
2545 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2545 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
2546 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2546 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
2547 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2547 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
2548 #undef ISOLATE_FIELD_OFFSET | 2548 #undef ISOLATE_FIELD_OFFSET |
2549 #endif | 2549 #endif |
2550 | 2550 |
2551 } } // namespace v8::internal | 2551 } } // namespace v8::internal |
OLD | NEW |