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

Unified Diff: runtime/vm/flow_graph.h

Issue 678763004: Make CTX allocatable by the register allocator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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
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_;
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | runtime/vm/flow_graph.cc » ('j') | runtime/vm/flow_graph.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698