Index: runtime/vm/flow_graph.h |
=================================================================== |
--- runtime/vm/flow_graph.h (revision 41279) |
+++ runtime/vm/flow_graph.h (working copy) |
@@ -111,6 +111,15 @@ |
return num_non_copied_params_; |
} |
+ LocalVariable* CurrentContextVar() const { |
+ return parsed_function().saved_current_context_var(); |
+ } |
+ |
+ intptr_t CurrentContextEnvIndex() const { |
+ return parsed_function().saved_current_context_var()->BitIndexIn( |
+ num_non_copied_params_); |
+ } |
+ |
// Flow graph orders. |
const GrowableArray<BlockEntryInstr*>& preorder() const { |
return preorder_; |
@@ -159,6 +168,15 @@ |
return constant_dead_; |
} |
+ ConstantInstr* constant_empty_context() const { |
+ return constant_empty_context_; |
+ } |
+ |
+ Definition* CurrentContext(Environment* env) const { |
+ while (env->outer() != NULL) env = env->outer(); |
Vyacheslav Egorov (Google)
2014/10/28 13:44:58
Kill this function. It's also a bit suspicious.
Florian Schneider
2014/10/28 19:04:31
Done.
|
+ return env->ValueAt(CurrentContextEnvIndex())->definition(); |
+ } |
+ |
intptr_t alloc_ssa_temp_index() { return current_ssa_temp_index_++; } |
void AllocateSSAIndexes(Definition* def) { |
@@ -333,6 +351,8 @@ |
GrowableArray<BlockEntryInstr*> optimized_block_order_; |
ConstantInstr* constant_null_; |
ConstantInstr* constant_dead_; |
+ ConstantInstr* constant_empty_context_; |
+ Definition* current_context_; |
Vyacheslav Egorov (Google)
2014/10/28 13:44:58
Kill this with fire.
Florian Schneider
2014/10/28 19:04:31
Done.
|
BlockEffects* block_effects_; |
bool licm_allowed_; |