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

Unified Diff: runtime/vm/code_generator_test.cc

Issue 10832126: Store pointer instead of reference to LocalVariable in ast and flow graph. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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_test.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator_test.cc
===================================================================
--- runtime/vm/code_generator_test.cc (revision 10320)
+++ runtime/vm/code_generator_test.cc (working copy)
@@ -63,7 +63,7 @@
const Function& function = test->function();
function.set_num_fixed_parameters(num_params);
ASSERT(function.num_optional_parameters() == 0);
- node_seq->Add(new ReturnNode(kPos, new LoadLocalNode(kPos, *parameter)));
+ node_seq->Add(new ReturnNode(kPos, new LoadLocalNode(kPos, parameter)));
}
@@ -97,10 +97,10 @@
ASSERT(function.num_optional_parameters() == 0);
BinaryOpNode* add = new BinaryOpNode(kPos,
Token::kADD,
- new LoadLocalNode(kPos, *param1),
- new LoadLocalNode(kPos, *param2));
- node_seq->Add(new StoreLocalNode(kPos, *sum, add));
- node_seq->Add(new ReturnNode(kPos, new LoadLocalNode(kPos, *sum)));
+ new LoadLocalNode(kPos, param1),
+ new LoadLocalNode(kPos, param2));
+ node_seq->Add(new StoreLocalNode(kPos, sum, add));
+ node_seq->Add(new ReturnNode(kPos, new LoadLocalNode(kPos, sum)));
}
@@ -352,7 +352,7 @@
String& function_bar_name = String::ZoneHandle(Symbols::New("bar"));
ArgumentListNode* no_arguments = new ArgumentListNode(kPos);
const TypeArguments& no_type_arguments = TypeArguments::ZoneHandle();
- const LocalVariable& allocated = *test->CreateTempConstVariable("alloc");
+ const LocalVariable* allocated = test->CreateTempConstVariable("alloc");
InstanceCallNode* call_bar = new InstanceCallNode(
kPos,
new ConstructorCallNode(
@@ -490,7 +490,7 @@
const TypeArguments& no_type_arguments = TypeArguments::ZoneHandle();
ArgumentListNode* no_arguments = new ArgumentListNode(kPos);
- const LocalVariable& allocated = *test->CreateTempConstVariable("alloc");
+ const LocalVariable* allocated = test->CreateTempConstVariable("alloc");
test->node_sequence()->Add(new ReturnNode(kPos, new ConstructorCallNode(
kPos, no_type_arguments, constructor, no_arguments, allocated)));
}
« no previous file with comments | « runtime/vm/ast_test.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698