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..e4a23fa5e014ae93941ecd42ad1ae35671789671 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_; } |
+ int32_t next_await_counter() { return jump_cnt_++; } |
srdjan
2014/08/20 17:50:06
Why does it need to be 32 bits (int32_t), could it
Michael Lippautz (Google)
2014/08/20 20:56:06
Done.
|
+ |
hausner
2014/08/20 19:47:48
@srdjan: I am fine with int32_t. This value is not
Michael Lippautz (Google)
2014/08/20 20:56:06
intptr_t it is
|
+ 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_; |
+ int32_t jump_cnt_; |
+ ZoneGrowableArray<JoinEntryInstr*>* await_joins_; |
+ ZoneGrowableArray<intptr_t>* await_levels_; |
+ |
DISALLOW_IMPLICIT_CONSTRUCTORS(FlowGraphBuilder); |
}; |
@@ -457,6 +468,11 @@ class EffectGraphVisitor : public AstNodeVisitor { |
void BuildLetTempExpressions(LetNode* node); |
+ void BuildAwaitJump(const LocalVariable& continuation_result, |
+ const LocalVariable& old_ctx, |
+ const intptr_t old_ctx_level, |
+ JoinEntryInstr* target); |
+ |
Isolate* isolate() const { return owner()->isolate(); } |
private: |