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

Unified Diff: runtime/vm/flow_graph_builder.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/ast_transformer.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.h
diff --git a/runtime/vm/flow_graph_builder.h b/runtime/vm/flow_graph_builder.h
index ad595691629ddf39b438dfef904c4b1becc811d3..fe23674a8bc71b5bac5ebb0939efc3372414ee1a 100644
--- a/runtime/vm/flow_graph_builder.h
+++ b/runtime/vm/flow_graph_builder.h
@@ -179,6 +179,13 @@ class FlowGraphBuilder: public ValueObject {
void set_catch_try_index(intptr_t value) { catch_try_index_ = value; }
intptr_t catch_try_index() const { return catch_try_index_; }
+ intptr_t next_await_counter() { return jump_cnt_++; }
+
+ ZoneGrowableArray<intptr_t>* await_levels() const { return await_levels_; }
+ ZoneGrowableArray<JoinEntryInstr*>* await_joins() const {
+ return await_joins_;
+ }
+
void AddCatchEntry(CatchBlockEntryInstr* entry);
intptr_t num_copied_params() const {
@@ -267,6 +274,10 @@ class FlowGraphBuilder: public ValueObject {
// Do not generate a different graph based on this flag.
const bool is_optimizing_;
+ intptr_t jump_cnt_;
+ ZoneGrowableArray<JoinEntryInstr*>* await_joins_;
+ ZoneGrowableArray<intptr_t>* await_levels_;
+
DISALLOW_IMPLICIT_CONSTRUCTORS(FlowGraphBuilder);
};
@@ -457,6 +468,10 @@ class EffectGraphVisitor : public AstNodeVisitor {
void BuildLetTempExpressions(LetNode* node);
+ void BuildAwaitJump(LocalScope* lookup_scope,
+ const intptr_t old_ctx_level,
+ JoinEntryInstr* target);
+
Isolate* isolate() const { return owner()->isolate(); }
private:
« no previous file with comments | « runtime/vm/ast_transformer.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698