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 <queue> | 8 #include <queue> |
9 #include "include/v8-debug.h" | 9 #include "include/v8-debug.h" |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1474 public: | 1474 public: |
1475 explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { } | 1475 explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { } |
1476 | 1476 |
1477 // Use this to check for stack-overflows in C++ code. | 1477 // Use this to check for stack-overflows in C++ code. |
1478 inline bool HasOverflowed() const { | 1478 inline bool HasOverflowed() const { |
1479 StackGuard* stack_guard = isolate_->stack_guard(); | 1479 StackGuard* stack_guard = isolate_->stack_guard(); |
1480 return GetCurrentStackPosition() < stack_guard->real_climit(); | 1480 return GetCurrentStackPosition() < stack_guard->real_climit(); |
1481 } | 1481 } |
1482 | 1482 |
1483 // Use this to check for stack-overflow when entering runtime from JS code. | 1483 // Use this to check for stack-overflow when entering runtime from JS code. |
1484 bool JsHasOverflowed() const; | 1484 bool JsHasOverflowed(uintptr_t gap = 0) const; |
1485 | 1485 |
1486 private: | 1486 private: |
1487 Isolate* isolate_; | 1487 Isolate* isolate_; |
1488 }; | 1488 }; |
1489 | 1489 |
1490 | 1490 |
1491 // Support for temporarily postponing interrupts. When the outermost | 1491 // Support for temporarily postponing interrupts. When the outermost |
1492 // postpone scope is left the interrupts will be re-enabled and any | 1492 // postpone scope is left the interrupts will be re-enabled and any |
1493 // interrupts that occurred while in the scope will be taken into | 1493 // interrupts that occurred while in the scope will be taken into |
1494 // account. | 1494 // account. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1584 } | 1584 } |
1585 | 1585 |
1586 EmbeddedVector<char, 128> filename_; | 1586 EmbeddedVector<char, 128> filename_; |
1587 FILE* file_; | 1587 FILE* file_; |
1588 int scope_depth_; | 1588 int scope_depth_; |
1589 }; | 1589 }; |
1590 | 1590 |
1591 } } // namespace v8::internal | 1591 } } // namespace v8::internal |
1592 | 1592 |
1593 #endif // V8_ISOLATE_H_ | 1593 #endif // V8_ISOLATE_H_ |
OLD | NEW |