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

Unified Diff: runtime/vm/parser.cc

Issue 678763004: Make CTX allocatable by the register allocator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: incorporated latest comments 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/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 41393)
+++ runtime/vm/parser.cc (working copy)
@@ -864,10 +864,8 @@
if (parsed_function->has_expression_temp_var()) {
node_sequence->scope()->AddVariable(parsed_function->expression_temp_var());
}
- if (parsed_function->has_saved_current_context_var()) {
- node_sequence->scope()->AddVariable(
- parsed_function->saved_current_context_var());
- }
+ node_sequence->scope()->AddVariable(
+ parsed_function->current_context_var());
if (parsed_function->has_finally_return_temp_var()) {
node_sequence->scope()->AddVariable(
parsed_function->finally_return_temp_var());
@@ -1068,9 +1066,7 @@
if (parsed_function->has_expression_temp_var()) {
body->scope()->AddVariable(parsed_function->expression_temp_var());
}
- if (parsed_function->has_saved_current_context_var()) {
- body->scope()->AddVariable(parsed_function->saved_current_context_var());
- }
+ body->scope()->AddVariable(parsed_function->current_context_var());
if (parsed_function->has_finally_return_temp_var()) {
body->scope()->AddVariable(parsed_function->finally_return_temp_var());
}
@@ -1387,7 +1383,6 @@
ASSERT(!owner.IsNull());
AstNode* result = NULL;
if (owner.IsSignatureClass() && name.Equals(Symbols::Call())) {
- EnsureSavedCurrentContext();
result = new ClosureCallNode(token_pos, getter_call, args);
} else {
result = BuildClosureCall(token_pos, getter_call, args);
@@ -8695,19 +8690,6 @@
}
-void Parser::EnsureSavedCurrentContext() {
- // Used later by the flow_graph_builder to save current context.
- if (!parsed_function()->has_saved_current_context_var()) {
- LocalVariable* temp = new(I) LocalVariable(
- current_function().token_pos(),
- Symbols::SavedCurrentContextVar(),
- Type::ZoneHandle(I, Type::DynamicType()));
- ASSERT(temp != NULL);
- parsed_function()->set_saved_current_context_var(temp);
- }
-}
-
-
LocalVariable* Parser::CreateTempConstVariable(intptr_t token_pos,
const char* s) {
char name[64];

Powered by Google App Engine
This is Rietveld 408576698