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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 1065923002: [turbofan] Add JSStackCheck into loop bodies. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-compiler-toplevel
Patch Set: Rebased. Created 5 years, 8 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 | « src/compiler.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 306afb6c12b14b1fe1cc1735a03394ac24210e0b..36f684070cbb9dab81bd91adbbe6283e55669584 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -2487,6 +2487,12 @@ void AstGraphBuilder::VisitIfNotNull(Statement* stmt) {
void AstGraphBuilder::VisitIterationBody(IterationStatement* stmt,
LoopBuilder* loop) {
ControlScopeForIteration scope(this, stmt, loop);
+ // TODO(mstarzinger): For now we only allow to interrupt non-asm.js code,
+ // which is a gigantic hack and should be extended to all code at some point.
+ if (!info()->shared_info()->asm_function()) {
+ Node* node = NewNode(javascript()->StackCheck());
+ PrepareFrameState(node, stmt->StackCheckId());
+ }
Visit(stmt->body());
}
« no previous file with comments | « src/compiler.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698