| 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 3156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3167 } | 3167 } |
| 3168 | 3168 |
| 3169 void Isolate::SetRAILMode(RAILMode rail_mode) { | 3169 void Isolate::SetRAILMode(RAILMode rail_mode) { |
| 3170 rail_mode_.SetValue(rail_mode); | 3170 rail_mode_.SetValue(rail_mode); |
| 3171 if (FLAG_trace_rail) { | 3171 if (FLAG_trace_rail) { |
| 3172 PrintIsolate(this, "RAIL mode: %s\n", RAILModeName(rail_mode)); | 3172 PrintIsolate(this, "RAIL mode: %s\n", RAILModeName(rail_mode)); |
| 3173 } | 3173 } |
| 3174 } | 3174 } |
| 3175 | 3175 |
| 3176 void Isolate::IsolateInBackgroundNotification() { | 3176 void Isolate::IsolateInBackgroundNotification() { |
| 3177 is_isolate_in_background_ = false; | 3177 is_isolate_in_background_ = true; |
| 3178 heap()->ActivateMemoryReducerIfNeeded(); | 3178 heap()->ActivateMemoryReducerIfNeeded(); |
| 3179 } | 3179 } |
| 3180 | 3180 |
| 3181 void Isolate::IsolateInForegroundNotification() { | 3181 void Isolate::IsolateInForegroundNotification() { |
| 3182 is_isolate_in_background_ = true; | 3182 is_isolate_in_background_ = false; |
| 3183 } | 3183 } |
| 3184 | 3184 |
| 3185 bool StackLimitCheck::JsHasOverflowed(uintptr_t gap) const { | 3185 bool StackLimitCheck::JsHasOverflowed(uintptr_t gap) const { |
| 3186 StackGuard* stack_guard = isolate_->stack_guard(); | 3186 StackGuard* stack_guard = isolate_->stack_guard(); |
| 3187 #ifdef USE_SIMULATOR | 3187 #ifdef USE_SIMULATOR |
| 3188 // The simulator uses a separate JS stack. | 3188 // The simulator uses a separate JS stack. |
| 3189 Address jssp_address = Simulator::current(isolate_)->get_sp(); | 3189 Address jssp_address = Simulator::current(isolate_)->get_sp(); |
| 3190 uintptr_t jssp = reinterpret_cast<uintptr_t>(jssp_address); | 3190 uintptr_t jssp = reinterpret_cast<uintptr_t>(jssp_address); |
| 3191 if (jssp - gap < stack_guard->real_jslimit()) return true; | 3191 if (jssp - gap < stack_guard->real_jslimit()) return true; |
| 3192 #endif // USE_SIMULATOR | 3192 #endif // USE_SIMULATOR |
| (...skipping 12 matching lines...) Expand all Loading... |
| 3205 // Then check whether this scope intercepts. | 3205 // Then check whether this scope intercepts. |
| 3206 if ((flag & intercept_mask_)) { | 3206 if ((flag & intercept_mask_)) { |
| 3207 intercepted_flags_ |= flag; | 3207 intercepted_flags_ |= flag; |
| 3208 return true; | 3208 return true; |
| 3209 } | 3209 } |
| 3210 return false; | 3210 return false; |
| 3211 } | 3211 } |
| 3212 | 3212 |
| 3213 } // namespace internal | 3213 } // namespace internal |
| 3214 } // namespace v8 | 3214 } // namespace v8 |
| OLD | NEW |