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 "src/isolate.h" | 5 #include "src/isolate.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include <fstream> // NOLINT(readability/streams) | 9 #include <fstream> // NOLINT(readability/streams) |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 1821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1832 global_handles_(NULL), | 1832 global_handles_(NULL), |
1833 eternal_handles_(NULL), | 1833 eternal_handles_(NULL), |
1834 thread_manager_(NULL), | 1834 thread_manager_(NULL), |
1835 has_installed_extensions_(false), | 1835 has_installed_extensions_(false), |
1836 regexp_stack_(NULL), | 1836 regexp_stack_(NULL), |
1837 date_cache_(NULL), | 1837 date_cache_(NULL), |
1838 call_descriptor_data_(NULL), | 1838 call_descriptor_data_(NULL), |
1839 // TODO(bmeurer) Initialized lazily because it depends on flags; can | 1839 // TODO(bmeurer) Initialized lazily because it depends on flags; can |
1840 // be fixed once the default isolate cleanup is done. | 1840 // be fixed once the default isolate cleanup is done. |
1841 random_number_generator_(NULL), | 1841 random_number_generator_(NULL), |
1842 rail_mode_(PERFORMANCE_DEFAULT), | 1842 rail_mode_(PERFORMANCE_ANIMATION), |
1843 serializer_enabled_(enable_serializer), | 1843 serializer_enabled_(enable_serializer), |
1844 has_fatal_error_(false), | 1844 has_fatal_error_(false), |
1845 initialized_from_snapshot_(false), | 1845 initialized_from_snapshot_(false), |
1846 is_tail_call_elimination_enabled_(true), | 1846 is_tail_call_elimination_enabled_(true), |
1847 cpu_profiler_(NULL), | 1847 cpu_profiler_(NULL), |
1848 heap_profiler_(NULL), | 1848 heap_profiler_(NULL), |
1849 code_event_dispatcher_(new CodeEventDispatcher()), | 1849 code_event_dispatcher_(new CodeEventDispatcher()), |
1850 function_entry_hook_(NULL), | 1850 function_entry_hook_(NULL), |
1851 deferred_handles_head_(NULL), | 1851 deferred_handles_head_(NULL), |
1852 optimizing_compile_dispatcher_(NULL), | 1852 optimizing_compile_dispatcher_(NULL), |
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2988 } | 2988 } |
2989 if (new_length == 0) { | 2989 if (new_length == 0) { |
2990 heap()->set_detached_contexts(heap()->empty_fixed_array()); | 2990 heap()->set_detached_contexts(heap()->empty_fixed_array()); |
2991 } else if (new_length < length) { | 2991 } else if (new_length < length) { |
2992 heap()->RightTrimFixedArray<Heap::CONCURRENT_TO_SWEEPER>( | 2992 heap()->RightTrimFixedArray<Heap::CONCURRENT_TO_SWEEPER>( |
2993 *detached_contexts, length - new_length); | 2993 *detached_contexts, length - new_length); |
2994 } | 2994 } |
2995 } | 2995 } |
2996 | 2996 |
2997 void Isolate::SetRAILMode(RAILMode rail_mode) { | 2997 void Isolate::SetRAILMode(RAILMode rail_mode) { |
2998 rail_mode_ = rail_mode; | 2998 rail_mode_.SetValue(rail_mode); |
2999 if (FLAG_trace_rail) { | 2999 if (FLAG_trace_rail) { |
3000 PrintIsolate(this, "RAIL mode: %s\n", RAILModeName(rail_mode_)); | 3000 PrintIsolate(this, "RAIL mode: %s\n", RAILModeName(rail_mode)); |
3001 } | 3001 } |
3002 } | 3002 } |
3003 | 3003 |
3004 bool StackLimitCheck::JsHasOverflowed(uintptr_t gap) const { | 3004 bool StackLimitCheck::JsHasOverflowed(uintptr_t gap) const { |
3005 StackGuard* stack_guard = isolate_->stack_guard(); | 3005 StackGuard* stack_guard = isolate_->stack_guard(); |
3006 #ifdef USE_SIMULATOR | 3006 #ifdef USE_SIMULATOR |
3007 // The simulator uses a separate JS stack. | 3007 // The simulator uses a separate JS stack. |
3008 Address jssp_address = Simulator::current(isolate_)->get_sp(); | 3008 Address jssp_address = Simulator::current(isolate_)->get_sp(); |
3009 uintptr_t jssp = reinterpret_cast<uintptr_t>(jssp_address); | 3009 uintptr_t jssp = reinterpret_cast<uintptr_t>(jssp_address); |
3010 if (jssp - gap < stack_guard->real_jslimit()) return true; | 3010 if (jssp - gap < stack_guard->real_jslimit()) return true; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3042 // Then check whether this scope intercepts. | 3042 // Then check whether this scope intercepts. |
3043 if ((flag & intercept_mask_)) { | 3043 if ((flag & intercept_mask_)) { |
3044 intercepted_flags_ |= flag; | 3044 intercepted_flags_ |= flag; |
3045 return true; | 3045 return true; |
3046 } | 3046 } |
3047 return false; | 3047 return false; |
3048 } | 3048 } |
3049 | 3049 |
3050 } // namespace internal | 3050 } // namespace internal |
3051 } // namespace v8 | 3051 } // namespace v8 |
OLD | NEW |