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 1855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1866 | 1866 |
1867 void Isolate::GlobalTearDown() { | 1867 void Isolate::GlobalTearDown() { |
1868 delete thread_data_table_; | 1868 delete thread_data_table_; |
1869 } | 1869 } |
1870 | 1870 |
1871 | 1871 |
1872 void Isolate::Deinit() { | 1872 void Isolate::Deinit() { |
1873 if (state_ == INITIALIZED) { | 1873 if (state_ == INITIALIZED) { |
1874 TRACE_ISOLATE(deinit); | 1874 TRACE_ISOLATE(deinit); |
1875 | 1875 |
1876 if (FLAG_parallel_recompilation) optimizing_compiler_thread_.Stop(); | 1876 if (FLAG_parallel_recompilation) { |
| 1877 optimizing_compiler_thread_.Stop(); |
| 1878 } |
1877 | 1879 |
1878 if (FLAG_sweeper_threads > 0) { | 1880 if (FLAG_sweeper_threads > 0) { |
1879 for (int i = 0; i < FLAG_sweeper_threads; i++) { | 1881 for (int i = 0; i < FLAG_sweeper_threads; i++) { |
1880 sweeper_thread_[i]->Stop(); | 1882 sweeper_thread_[i]->Stop(); |
1881 delete sweeper_thread_[i]; | 1883 delete sweeper_thread_[i]; |
1882 } | 1884 } |
1883 delete[] sweeper_thread_; | 1885 delete[] sweeper_thread_; |
1884 } | 1886 } |
1885 | 1887 |
1886 if (FLAG_marking_threads > 0) { | 1888 if (FLAG_marking_threads > 0) { |
1887 for (int i = 0; i < FLAG_marking_threads; i++) { | 1889 for (int i = 0; i < FLAG_marking_threads; i++) { |
1888 marking_thread_[i]->Stop(); | 1890 marking_thread_[i]->Stop(); |
1889 delete marking_thread_[i]; | 1891 delete marking_thread_[i]; |
1890 } | 1892 } |
1891 delete[] marking_thread_; | 1893 delete[] marking_thread_; |
1892 } | 1894 } |
1893 | 1895 |
1894 if (FLAG_hydrogen_stats) GetHStatistics()->Print(); | 1896 if (FLAG_hydrogen_stats) GetHStatistics()->Print(); |
1895 | 1897 |
1896 // We must stop the logger before we tear down other components. | 1898 // We must stop the logger before we tear down other components. |
1897 Sampler* sampler = logger_->sampler(); | 1899 Sampler* sampler = logger_->sampler(); |
1898 if (sampler && sampler->IsActive()) sampler->Stop(); | 1900 if (sampler && sampler->IsActive()) { |
| 1901 sampler->Stop(); |
| 1902 } |
1899 | 1903 |
1900 delete deoptimizer_data_; | 1904 delete deoptimizer_data_; |
1901 deoptimizer_data_ = NULL; | 1905 deoptimizer_data_ = NULL; |
1902 if (FLAG_preemption) { | 1906 if (FLAG_preemption) { |
1903 v8::Locker locker(reinterpret_cast<v8::Isolate*>(this)); | 1907 v8::Locker locker(reinterpret_cast<v8::Isolate*>(this)); |
1904 v8::Locker::StopPreemption(); | 1908 v8::Locker::StopPreemption(); |
1905 } | 1909 } |
1906 builtins_.TearDown(); | 1910 builtins_.TearDown(); |
1907 bootstrapper_->TearDown(); | 1911 bootstrapper_->TearDown(); |
1908 | 1912 |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2497 | 2501 |
2498 #ifdef DEBUG | 2502 #ifdef DEBUG |
2499 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2503 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
2500 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2504 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
2501 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2505 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
2502 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2506 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
2503 #undef ISOLATE_FIELD_OFFSET | 2507 #undef ISOLATE_FIELD_OFFSET |
2504 #endif | 2508 #endif |
2505 | 2509 |
2506 } } // namespace v8::internal | 2510 } } // namespace v8::internal |
OLD | NEW |