| 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 #ifndef V8_ISOLATE_H_ | 5 #ifndef V8_ISOLATE_H_ |
| 6 #define V8_ISOLATE_H_ | 6 #define V8_ISOLATE_H_ |
| 7 | 7 |
| 8 #include "include/v8-debug.h" | 8 #include "include/v8-debug.h" |
| 9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
| 10 #include "src/assert-scope.h" | 10 #include "src/assert-scope.h" |
| (...skipping 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1411 | 1411 |
| 1412 | 1412 |
| 1413 // Support for checking for stack-overflows. | 1413 // Support for checking for stack-overflows. |
| 1414 class StackLimitCheck BASE_EMBEDDED { | 1414 class StackLimitCheck BASE_EMBEDDED { |
| 1415 public: | 1415 public: |
| 1416 explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { } | 1416 explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { } |
| 1417 | 1417 |
| 1418 // Use this to check for stack-overflows in C++ code. | 1418 // Use this to check for stack-overflows in C++ code. |
| 1419 inline bool HasOverflowed() const { | 1419 inline bool HasOverflowed() const { |
| 1420 StackGuard* stack_guard = isolate_->stack_guard(); | 1420 StackGuard* stack_guard = isolate_->stack_guard(); |
| 1421 return reinterpret_cast<uintptr_t>(this) < stack_guard->real_climit(); | 1421 return GetCurrentStackPosition() < stack_guard->real_climit(); |
| 1422 } | 1422 } |
| 1423 | 1423 |
| 1424 // Use this to check for stack-overflow when entering runtime from JS code. | 1424 // Use this to check for stack-overflow when entering runtime from JS code. |
| 1425 bool JsHasOverflowed() const; | 1425 bool JsHasOverflowed() const; |
| 1426 | 1426 |
| 1427 private: | 1427 private: |
| 1428 Isolate* isolate_; | 1428 Isolate* isolate_; |
| 1429 }; | 1429 }; |
| 1430 | 1430 |
| 1431 | 1431 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1525 } | 1525 } |
| 1526 | 1526 |
| 1527 EmbeddedVector<char, 128> filename_; | 1527 EmbeddedVector<char, 128> filename_; |
| 1528 FILE* file_; | 1528 FILE* file_; |
| 1529 int scope_depth_; | 1529 int scope_depth_; |
| 1530 }; | 1530 }; |
| 1531 | 1531 |
| 1532 } } // namespace v8::internal | 1532 } } // namespace v8::internal |
| 1533 | 1533 |
| 1534 #endif // V8_ISOLATE_H_ | 1534 #endif // V8_ISOLATE_H_ |
| OLD | NEW |