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

Unified Diff: runtime/vm/parser.h

Issue 484933003: Await it! (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 6 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 | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.h
diff --git a/runtime/vm/parser.h b/runtime/vm/parser.h
index bd7b9e9e48a6eb5f5f33910e969d42b00f3d43b9..13674985e6c5f2e1d0f476ca9b18de48534b6224 100644
--- a/runtime/vm/parser.h
+++ b/runtime/vm/parser.h
@@ -55,6 +55,8 @@ class ParsedFunction : public ZoneAllocated {
num_copied_params_(0),
num_stack_locals_(0),
have_seen_await_expr_(false),
+ saved_try_ctx_(NULL),
+ async_saved_try_ctx_(NULL),
isolate_(isolate) {
ASSERT(function.IsZoneHandle());
}
@@ -155,6 +157,23 @@ class ParsedFunction : public ZoneAllocated {
void reset_have_seen_await() { have_seen_await_expr_ = false; }
bool have_seen_await() const { return have_seen_await_expr_; }
+ void set_saved_try_ctx(LocalVariable* saved_try_ctx) {
+ ASSERT((saved_try_ctx != NULL) && !saved_try_ctx->is_captured());
+ saved_try_ctx_ = saved_try_ctx;
+ }
+ LocalVariable* saved_try_ctx() const { return saved_try_ctx_; }
+
+ void set_async_saved_try_ctx(LocalVariable* async_saved_try_ctx) {
+ ASSERT((async_saved_try_ctx != NULL) && async_saved_try_ctx->is_captured());
+ async_saved_try_ctx_ = async_saved_try_ctx;
+ }
+ LocalVariable* async_saved_try_ctx() const { return async_saved_try_ctx_; }
+
+ void reset_saved_try_ctx_vars() {
+ saved_try_ctx_ = NULL;
+ async_saved_try_ctx_ = NULL;
+ }
+
Isolate* isolate() const { return isolate_; }
private:
@@ -175,6 +194,8 @@ class ParsedFunction : public ZoneAllocated {
int num_copied_params_;
int num_stack_locals_;
bool have_seen_await_expr_;
+ LocalVariable* saved_try_ctx_;
+ LocalVariable* async_saved_try_ctx_;
Isolate* isolate_;
@@ -706,6 +727,10 @@ class Parser : public ValueObject {
InvocationMirror::Type type,
const Function* func);
+ void SetupSavedTryContext(LocalScope* saved_try_context_scope,
+ int16_t try_index,
+ SequenceNode* target);
+
void CheckOperatorArity(const MemberDesc& member);
void EnsureExpressionTemp();
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698