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

Unified Diff: runtime/vm/unit_test.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
« runtime/vm/flow_graph_type_propagator.cc ('K') | « 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 41393)
+++ runtime/vm/unit_test.cc (working copy)
@@ -217,11 +217,14 @@
void CodeGenTest::Compile() {
+ if (function_.HasCode()) return;
ParsedFunction* parsed_function =
new ParsedFunction(Isolate::Current(), function_);
parsed_function->SetNodeSequence(node_sequence_);
parsed_function->set_instantiator(NULL);
parsed_function->set_default_parameter_values(default_parameter_values_);
+ node_sequence_->scope()->AddVariable(
+ parsed_function->current_context_var());
parsed_function->EnsureExpressionTemp();
node_sequence_->scope()->AddVariable(parsed_function->expression_temp_var());
parsed_function->AllocateVariables();
@@ -231,19 +234,6 @@
}
-LocalVariable* CodeGenTest::CreateTempConstVariable(const char* name_part) {
- char name[64];
- OS::SNPrint(name, 64, ":%s", name_part);
- LocalVariable* temp =
- new LocalVariable(0,
- String::ZoneHandle(Symbols::New(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();
« runtime/vm/flow_graph_type_propagator.cc ('K') | « runtime/vm/unit_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698