Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1369)

Side by Side Diff: src/isolate.h

Issue 1310253002: Move StackGuard::InterruptRequested into StackLimitCheck. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_issue-cr-522380
Patch Set: Rebased. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/execution.cc ('k') | src/json-parser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <set> 9 #include <set>
10 10
(...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after
1471 Isolate* isolate_; 1471 Isolate* isolate_;
1472 }; 1472 };
1473 1473
1474 1474
1475 // Support for checking for stack-overflows. 1475 // Support for checking for stack-overflows.
1476 class StackLimitCheck BASE_EMBEDDED { 1476 class StackLimitCheck BASE_EMBEDDED {
1477 public: 1477 public:
1478 explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { } 1478 explicit StackLimitCheck(Isolate* isolate) : isolate_(isolate) { }
1479 1479
1480 // Use this to check for stack-overflows in C++ code. 1480 // Use this to check for stack-overflows in C++ code.
1481 inline bool HasOverflowed() const { 1481 bool HasOverflowed() const {
1482 StackGuard* stack_guard = isolate_->stack_guard(); 1482 StackGuard* stack_guard = isolate_->stack_guard();
1483 return GetCurrentStackPosition() < stack_guard->real_climit(); 1483 return GetCurrentStackPosition() < stack_guard->real_climit();
1484 } 1484 }
1485 1485
1486 // Use this to check for interrupt request in C++ code.
1487 bool InterruptRequested() {
1488 StackGuard* stack_guard = isolate_->stack_guard();
1489 return GetCurrentStackPosition() < stack_guard->climit();
1490 }
1491
1486 // Use this to check for stack-overflow when entering runtime from JS code. 1492 // Use this to check for stack-overflow when entering runtime from JS code.
1487 bool JsHasOverflowed(uintptr_t gap = 0) const; 1493 bool JsHasOverflowed(uintptr_t gap = 0) const;
1488 1494
1489 private: 1495 private:
1490 Isolate* isolate_; 1496 Isolate* isolate_;
1491 }; 1497 };
1492 1498
1493 1499
1494 // Support for temporarily postponing interrupts. When the outermost 1500 // Support for temporarily postponing interrupts. When the outermost
1495 // postpone scope is left the interrupts will be re-enabled and any 1501 // postpone scope is left the interrupts will be re-enabled and any
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1587 } 1593 }
1588 1594
1589 EmbeddedVector<char, 128> filename_; 1595 EmbeddedVector<char, 128> filename_;
1590 FILE* file_; 1596 FILE* file_;
1591 int scope_depth_; 1597 int scope_depth_;
1592 }; 1598 };
1593 1599
1594 } } // namespace v8::internal 1600 } } // namespace v8::internal
1595 1601
1596 #endif // V8_ISOLATE_H_ 1602 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/execution.cc ('k') | src/json-parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698