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 1890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1901 bootstrapper_->TearDown(); | 1901 bootstrapper_->TearDown(); |
1902 | 1902 |
1903 if (runtime_profiler_ != NULL) { | 1903 if (runtime_profiler_ != NULL) { |
1904 delete runtime_profiler_; | 1904 delete runtime_profiler_; |
1905 runtime_profiler_ = NULL; | 1905 runtime_profiler_ = NULL; |
1906 } | 1906 } |
1907 | 1907 |
1908 delete basic_block_profiler_; | 1908 delete basic_block_profiler_; |
1909 basic_block_profiler_ = NULL; | 1909 basic_block_profiler_ = NULL; |
1910 | 1910 |
1911 for (CancelableTask* task : cancelable_tasks_) { | 1911 for (Cancelable* task : cancelable_tasks_) { |
1912 task->Cancel(); | 1912 task->Cancel(); |
1913 } | 1913 } |
1914 cancelable_tasks_.clear(); | 1914 cancelable_tasks_.clear(); |
1915 | 1915 |
1916 heap_.TearDown(); | 1916 heap_.TearDown(); |
1917 logger_->TearDown(); | 1917 logger_->TearDown(); |
1918 | 1918 |
1919 delete heap_profiler_; | 1919 delete heap_profiler_; |
1920 heap_profiler_ = NULL; | 1920 heap_profiler_ = NULL; |
1921 delete cpu_profiler_; | 1921 delete cpu_profiler_; |
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2783 } | 2783 } |
2784 if (new_length == 0) { | 2784 if (new_length == 0) { |
2785 heap()->set_detached_contexts(heap()->empty_fixed_array()); | 2785 heap()->set_detached_contexts(heap()->empty_fixed_array()); |
2786 } else if (new_length < length) { | 2786 } else if (new_length < length) { |
2787 heap()->RightTrimFixedArray<Heap::CONCURRENT_TO_SWEEPER>( | 2787 heap()->RightTrimFixedArray<Heap::CONCURRENT_TO_SWEEPER>( |
2788 *detached_contexts, length - new_length); | 2788 *detached_contexts, length - new_length); |
2789 } | 2789 } |
2790 } | 2790 } |
2791 | 2791 |
2792 | 2792 |
2793 void Isolate::RegisterCancelableTask(CancelableTask* task) { | 2793 void Isolate::RegisterCancelableTask(Cancelable* task) { |
2794 cancelable_tasks_.insert(task); | 2794 cancelable_tasks_.insert(task); |
2795 } | 2795 } |
2796 | 2796 |
2797 | 2797 |
2798 void Isolate::RemoveCancelableTask(CancelableTask* task) { | 2798 void Isolate::RemoveCancelableTask(Cancelable* task) { |
2799 auto removed = cancelable_tasks_.erase(task); | 2799 auto removed = cancelable_tasks_.erase(task); |
2800 USE(removed); | 2800 USE(removed); |
2801 DCHECK(removed == 1); | 2801 DCHECK(removed == 1); |
2802 } | 2802 } |
2803 | 2803 |
2804 | 2804 |
2805 bool StackLimitCheck::JsHasOverflowed(uintptr_t gap) const { | 2805 bool StackLimitCheck::JsHasOverflowed(uintptr_t gap) const { |
2806 StackGuard* stack_guard = isolate_->stack_guard(); | 2806 StackGuard* stack_guard = isolate_->stack_guard(); |
2807 #ifdef USE_SIMULATOR | 2807 #ifdef USE_SIMULATOR |
2808 // The simulator uses a separate JS stack. | 2808 // The simulator uses a separate JS stack. |
(...skipping 22 matching lines...) Expand all Loading... |
2831 // Then check whether this scope intercepts. | 2831 // Then check whether this scope intercepts. |
2832 if ((flag & intercept_mask_)) { | 2832 if ((flag & intercept_mask_)) { |
2833 intercepted_flags_ |= flag; | 2833 intercepted_flags_ |= flag; |
2834 return true; | 2834 return true; |
2835 } | 2835 } |
2836 return false; | 2836 return false; |
2837 } | 2837 } |
2838 | 2838 |
2839 } // namespace internal | 2839 } // namespace internal |
2840 } // namespace v8 | 2840 } // namespace v8 |
OLD | NEW |