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

Unified Diff: src/full-codegen/full-codegen.cc

Issue 2233923003: Desugar async/await to create the resulting Promise upfront (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Better approach for bailing out on stack overflow in the appropriate place in fullcodegen Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/contexts.h ('k') | src/js/promise.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/full-codegen.cc
diff --git a/src/full-codegen/full-codegen.cc b/src/full-codegen/full-codegen.cc
index a227137b4a3bb1e7c1021c71b8d5faaa8b32983c..2d9db83bf7d2811c2f03d2c5598d70d5a4516edb 100644
--- a/src/full-codegen/full-codegen.cc
+++ b/src/full-codegen/full-codegen.cc
@@ -896,6 +896,7 @@ void FullCodeGenerator::EmitContinue(Statement* target) {
// accumulator on the stack.
ClearAccumulator();
while (!current->IsContinueTarget(target)) {
+ if (HasStackOverflow()) return;
adamk 2016/08/22 18:47:39 These additional HasStackOverflow() are surprising
Dan Ehrenberg 2016/08/22 19:01:10 The new desugaring ends up making some significant
if (current->IsTryFinally()) {
Comment cmnt(masm(), "[ Deferred continue through finally");
current->Exit(&context_length);
@@ -936,6 +937,7 @@ void FullCodeGenerator::EmitBreak(Statement* target) {
// accumulator on the stack.
ClearAccumulator();
while (!current->IsBreakTarget(target)) {
+ if (HasStackOverflow()) return;
if (current->IsTryFinally()) {
Comment cmnt(masm(), "[ Deferred break through finally");
current->Exit(&context_length);
@@ -971,6 +973,7 @@ void FullCodeGenerator::EmitUnwindAndReturn() {
NestedStatement* current = nesting_stack_;
int context_length = 0;
while (current != NULL) {
+ if (HasStackOverflow()) return;
if (current->IsTryFinally()) {
Comment cmnt(masm(), "[ Deferred return through finally");
current->Exit(&context_length);
« no previous file with comments | « src/contexts.h ('k') | src/js/promise.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698