| 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 | 6 |
| 7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "src/v8.h" | 10 #include "src/v8.h" |
| (...skipping 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1791 SetIsolateThreadLocals(saved_isolate, saved_data); | 1791 SetIsolateThreadLocals(saved_isolate, saved_data); |
| 1792 } | 1792 } |
| 1793 | 1793 |
| 1794 | 1794 |
| 1795 void Isolate::GlobalTearDown() { | 1795 void Isolate::GlobalTearDown() { |
| 1796 delete thread_data_table_; | 1796 delete thread_data_table_; |
| 1797 thread_data_table_ = NULL; | 1797 thread_data_table_ = NULL; |
| 1798 } | 1798 } |
| 1799 | 1799 |
| 1800 | 1800 |
| 1801 void Isolate::ClearSerializerData() { |
| 1802 delete external_reference_table_; |
| 1803 external_reference_table_ = NULL; |
| 1804 delete external_reference_map_; |
| 1805 external_reference_map_ = NULL; |
| 1806 delete root_index_map_; |
| 1807 root_index_map_ = NULL; |
| 1808 } |
| 1809 |
| 1810 |
| 1801 void Isolate::Deinit() { | 1811 void Isolate::Deinit() { |
| 1802 TRACE_ISOLATE(deinit); | 1812 TRACE_ISOLATE(deinit); |
| 1803 | 1813 |
| 1804 debug()->Unload(); | 1814 debug()->Unload(); |
| 1805 | 1815 |
| 1806 FreeThreadResources(); | 1816 FreeThreadResources(); |
| 1807 | 1817 |
| 1808 if (concurrent_recompilation_enabled()) { | 1818 if (concurrent_recompilation_enabled()) { |
| 1809 optimizing_compiler_thread_->Stop(); | 1819 optimizing_compiler_thread_->Stop(); |
| 1810 delete optimizing_compiler_thread_; | 1820 delete optimizing_compiler_thread_; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1838 delete basic_block_profiler_; | 1848 delete basic_block_profiler_; |
| 1839 basic_block_profiler_ = NULL; | 1849 basic_block_profiler_ = NULL; |
| 1840 | 1850 |
| 1841 heap_.TearDown(); | 1851 heap_.TearDown(); |
| 1842 logger_->TearDown(); | 1852 logger_->TearDown(); |
| 1843 | 1853 |
| 1844 delete heap_profiler_; | 1854 delete heap_profiler_; |
| 1845 heap_profiler_ = NULL; | 1855 heap_profiler_ = NULL; |
| 1846 delete cpu_profiler_; | 1856 delete cpu_profiler_; |
| 1847 cpu_profiler_ = NULL; | 1857 cpu_profiler_ = NULL; |
| 1858 |
| 1859 ClearSerializerData(); |
| 1848 } | 1860 } |
| 1849 | 1861 |
| 1850 | 1862 |
| 1851 void Isolate::SetIsolateThreadLocals(Isolate* isolate, | 1863 void Isolate::SetIsolateThreadLocals(Isolate* isolate, |
| 1852 PerIsolateThreadData* data) { | 1864 PerIsolateThreadData* data) { |
| 1853 base::Thread::SetThreadLocal(isolate_key_, isolate); | 1865 base::Thread::SetThreadLocal(isolate_key_, isolate); |
| 1854 base::Thread::SetThreadLocal(per_isolate_thread_data_key_, data); | 1866 base::Thread::SetThreadLocal(per_isolate_thread_data_key_, data); |
| 1855 } | 1867 } |
| 1856 | 1868 |
| 1857 | 1869 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1926 delete code_range_; | 1938 delete code_range_; |
| 1927 code_range_ = NULL; | 1939 code_range_ = NULL; |
| 1928 delete global_handles_; | 1940 delete global_handles_; |
| 1929 global_handles_ = NULL; | 1941 global_handles_ = NULL; |
| 1930 delete eternal_handles_; | 1942 delete eternal_handles_; |
| 1931 eternal_handles_ = NULL; | 1943 eternal_handles_ = NULL; |
| 1932 | 1944 |
| 1933 delete string_stream_debug_object_cache_; | 1945 delete string_stream_debug_object_cache_; |
| 1934 string_stream_debug_object_cache_ = NULL; | 1946 string_stream_debug_object_cache_ = NULL; |
| 1935 | 1947 |
| 1936 delete external_reference_table_; | |
| 1937 external_reference_table_ = NULL; | |
| 1938 | |
| 1939 delete random_number_generator_; | 1948 delete random_number_generator_; |
| 1940 random_number_generator_ = NULL; | 1949 random_number_generator_ = NULL; |
| 1941 | 1950 |
| 1942 delete debug_; | 1951 delete debug_; |
| 1943 debug_ = NULL; | 1952 debug_ = NULL; |
| 1944 } | 1953 } |
| 1945 | 1954 |
| 1946 | 1955 |
| 1947 void Isolate::InitializeThreadLocal() { | 1956 void Isolate::InitializeThreadLocal() { |
| 1948 thread_local_top_.isolate_ = this; | 1957 thread_local_top_.isolate_ = this; |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2633 if (prev_ && prev_->Intercept(flag)) return true; | 2642 if (prev_ && prev_->Intercept(flag)) return true; |
| 2634 // Then check whether this scope intercepts. | 2643 // Then check whether this scope intercepts. |
| 2635 if ((flag & intercept_mask_)) { | 2644 if ((flag & intercept_mask_)) { |
| 2636 intercepted_flags_ |= flag; | 2645 intercepted_flags_ |= flag; |
| 2637 return true; | 2646 return true; |
| 2638 } | 2647 } |
| 2639 return false; | 2648 return false; |
| 2640 } | 2649 } |
| 2641 | 2650 |
| 2642 } } // namespace v8::internal | 2651 } } // namespace v8::internal |
| OLD | NEW |