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

Unified Diff: src/ast.h

Issue 1387383005: Eagerly extract stack limit from Isolate in InitializeAstVisitor() (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/ast-numbering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index ffae46225b525afc9718222bf4fbc82d0490bd02..030796891b0c49838eeb05f044426f2be46d6074 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -3161,23 +3161,23 @@ class AstVisitor BASE_EMBEDDED {
\
bool CheckStackOverflow() { \
if (stack_overflow_) return true; \
- StackLimitCheck check(isolate_); \
- if (!check.HasOverflowed()) return false; \
- stack_overflow_ = true; \
- return true; \
+ if (GetCurrentStackPosition() < stack_limit_) { \
+ stack_overflow_ = true; \
+ return true; \
+ } \
+ return false; \
} \
\
private: \
void InitializeAstVisitor(Isolate* isolate, Zone* zone) { \
- isolate_ = isolate; \
zone_ = zone; \
+ stack_limit_ = isolate->stack_guard()->real_climit(); \
stack_overflow_ = false; \
} \
Zone* zone() { return zone_; } \
- Isolate* isolate() { return isolate_; } \
\
- Isolate* isolate_; \
Zone* zone_; \
+ uintptr_t stack_limit_; \
bool stack_overflow_
« no previous file with comments | « no previous file | src/ast-numbering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698