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

Unified Diff: runtime/vm/unit_test.cc

Issue 10310132: Remove TuckTemp, PickTemp, use temporary locals instead. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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/unit_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/unit_test.cc
===================================================================
--- runtime/vm/unit_test.cc (revision 7560)
+++ runtime/vm/unit_test.cc (working copy)
@@ -191,6 +191,19 @@
}
+LocalVariable* CodeGenTest::CreateTempConstVariable(const char* name_part) {
+ char name[64];
+ OS::SNPrint(name, 64, ":%s", name_part);
+ LocalVariable* temp =
+ new LocalVariable(0,
+ String::ZoneHandle(String::NewSymbol(name)),
+ Type::ZoneHandle(Type::DynamicType()));
+ temp->set_is_final();
+ node_sequence_->scope()->AddVariable(temp);
+ return temp;
+}
+
+
bool CompilerTest::TestCompileScript(const Library& library,
const Script& script) {
Isolate* isolate = Isolate::Current();
« no previous file with comments | « runtime/vm/unit_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698