| 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 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1687 context_switcher_(NULL), | 1687 context_switcher_(NULL), |
| 1688 thread_manager_(NULL), | 1688 thread_manager_(NULL), |
| 1689 fp_stubs_generated_(false), | 1689 fp_stubs_generated_(false), |
| 1690 has_installed_extensions_(false), | 1690 has_installed_extensions_(false), |
| 1691 string_tracker_(NULL), | 1691 string_tracker_(NULL), |
| 1692 regexp_stack_(NULL), | 1692 regexp_stack_(NULL), |
| 1693 date_cache_(NULL), | 1693 date_cache_(NULL), |
| 1694 code_stub_interface_descriptors_(NULL), | 1694 code_stub_interface_descriptors_(NULL), |
| 1695 context_exit_happened_(false), | 1695 context_exit_happened_(false), |
| 1696 cpu_profiler_(NULL), | 1696 cpu_profiler_(NULL), |
| 1697 heap_profiler_(NULL), |
| 1697 deferred_handles_head_(NULL), | 1698 deferred_handles_head_(NULL), |
| 1698 optimizing_compiler_thread_(this), | 1699 optimizing_compiler_thread_(this), |
| 1699 marking_thread_(NULL), | 1700 marking_thread_(NULL), |
| 1700 sweeper_thread_(NULL) { | 1701 sweeper_thread_(NULL) { |
| 1701 id_ = NoBarrier_AtomicIncrement(&isolate_counter_, 1); | 1702 id_ = NoBarrier_AtomicIncrement(&isolate_counter_, 1); |
| 1702 TRACE_ISOLATE(constructor); | 1703 TRACE_ISOLATE(constructor); |
| 1703 | 1704 |
| 1704 memset(isolate_addresses_, 0, | 1705 memset(isolate_addresses_, 0, |
| 1705 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1)); | 1706 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1)); |
| 1706 | 1707 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1818 v8::Locker::StopPreemption(); | 1819 v8::Locker::StopPreemption(); |
| 1819 } | 1820 } |
| 1820 builtins_.TearDown(); | 1821 builtins_.TearDown(); |
| 1821 bootstrapper_->TearDown(); | 1822 bootstrapper_->TearDown(); |
| 1822 | 1823 |
| 1823 // Remove the external reference to the preallocated stack memory. | 1824 // Remove the external reference to the preallocated stack memory. |
| 1824 delete preallocated_message_space_; | 1825 delete preallocated_message_space_; |
| 1825 preallocated_message_space_ = NULL; | 1826 preallocated_message_space_ = NULL; |
| 1826 PreallocatedMemoryThreadStop(); | 1827 PreallocatedMemoryThreadStop(); |
| 1827 | 1828 |
| 1828 HeapProfiler::TearDown(); | 1829 delete heap_profiler_; |
| 1830 heap_profiler_ = NULL; |
| 1829 delete cpu_profiler_; | 1831 delete cpu_profiler_; |
| 1830 cpu_profiler_ = NULL; | 1832 cpu_profiler_ = NULL; |
| 1831 | 1833 |
| 1832 if (runtime_profiler_ != NULL) { | 1834 if (runtime_profiler_ != NULL) { |
| 1833 runtime_profiler_->TearDown(); | 1835 runtime_profiler_->TearDown(); |
| 1834 delete runtime_profiler_; | 1836 delete runtime_profiler_; |
| 1835 runtime_profiler_ = NULL; | 1837 runtime_profiler_ = NULL; |
| 1836 } | 1838 } |
| 1837 heap_.TearDown(); | 1839 heap_.TearDown(); |
| 1838 logger_->TearDown(); | 1840 logger_->TearDown(); |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2051 regexp_stack_ = new RegExpStack(); | 2053 regexp_stack_ = new RegExpStack(); |
| 2052 regexp_stack_->isolate_ = this; | 2054 regexp_stack_->isolate_ = this; |
| 2053 date_cache_ = new DateCache(); | 2055 date_cache_ = new DateCache(); |
| 2054 code_stub_interface_descriptors_ = | 2056 code_stub_interface_descriptors_ = |
| 2055 new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS]; | 2057 new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS]; |
| 2056 | 2058 |
| 2057 // Enable logging before setting up the heap | 2059 // Enable logging before setting up the heap |
| 2058 logger_->SetUp(); | 2060 logger_->SetUp(); |
| 2059 | 2061 |
| 2060 cpu_profiler_ = new CpuProfiler(this); | 2062 cpu_profiler_ = new CpuProfiler(this); |
| 2061 HeapProfiler::SetUp(); | 2063 heap_profiler_ = new HeapProfiler(heap()); |
| 2062 | 2064 |
| 2063 // Initialize other runtime facilities | 2065 // Initialize other runtime facilities |
| 2064 #if defined(USE_SIMULATOR) | 2066 #if defined(USE_SIMULATOR) |
| 2065 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS) | 2067 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS) |
| 2066 Simulator::Initialize(this); | 2068 Simulator::Initialize(this); |
| 2067 #endif | 2069 #endif |
| 2068 #endif | 2070 #endif |
| 2069 | 2071 |
| 2070 { // NOLINT | 2072 { // NOLINT |
| 2071 // Ensure that the thread has a valid stack guard. The v8::Locker object | 2073 // Ensure that the thread has a valid stack guard. The v8::Locker object |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2383 | 2385 |
| 2384 #ifdef DEBUG | 2386 #ifdef DEBUG |
| 2385 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2387 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 2386 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2388 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
| 2387 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2389 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 2388 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2390 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 2389 #undef ISOLATE_FIELD_OFFSET | 2391 #undef ISOLATE_FIELD_OFFSET |
| 2390 #endif | 2392 #endif |
| 2391 | 2393 |
| 2392 } } // namespace v8::internal | 2394 } } // namespace v8::internal |
| OLD | NEW |