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 "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #include "src/ast.h" | 9 #include "src/ast.h" |
10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
(...skipping 2336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2347 | 2347 |
2348 | 2348 |
2349 bool StackLimitCheck::JsHasOverflowed() const { | 2349 bool StackLimitCheck::JsHasOverflowed() const { |
2350 StackGuard* stack_guard = isolate_->stack_guard(); | 2350 StackGuard* stack_guard = isolate_->stack_guard(); |
2351 #ifdef USE_SIMULATOR | 2351 #ifdef USE_SIMULATOR |
2352 // The simulator uses a separate JS stack. | 2352 // The simulator uses a separate JS stack. |
2353 Address jssp_address = Simulator::current(isolate_)->get_sp(); | 2353 Address jssp_address = Simulator::current(isolate_)->get_sp(); |
2354 uintptr_t jssp = reinterpret_cast<uintptr_t>(jssp_address); | 2354 uintptr_t jssp = reinterpret_cast<uintptr_t>(jssp_address); |
2355 if (jssp < stack_guard->real_jslimit()) return true; | 2355 if (jssp < stack_guard->real_jslimit()) return true; |
2356 #endif // USE_SIMULATOR | 2356 #endif // USE_SIMULATOR |
2357 return reinterpret_cast<uintptr_t>(this) < stack_guard->real_climit(); | 2357 return GetCurrentStackPosition() < stack_guard->real_climit(); |
2358 } | 2358 } |
2359 | 2359 |
2360 | 2360 |
2361 bool PostponeInterruptsScope::Intercept(StackGuard::InterruptFlag flag) { | 2361 bool PostponeInterruptsScope::Intercept(StackGuard::InterruptFlag flag) { |
2362 // First check whether the previous scope intercepts. | 2362 // First check whether the previous scope intercepts. |
2363 if (prev_ && prev_->Intercept(flag)) return true; | 2363 if (prev_ && prev_->Intercept(flag)) return true; |
2364 // Then check whether this scope intercepts. | 2364 // Then check whether this scope intercepts. |
2365 if ((flag & intercept_mask_)) { | 2365 if ((flag & intercept_mask_)) { |
2366 intercepted_flags_ |= flag; | 2366 intercepted_flags_ |= flag; |
2367 return true; | 2367 return true; |
2368 } | 2368 } |
2369 return false; | 2369 return false; |
2370 } | 2370 } |
2371 | 2371 |
2372 } } // namespace v8::internal | 2372 } } // namespace v8::internal |
OLD | NEW |