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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 567393005: Revert r40367. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | « no previous file | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index 56630ad0fb40d9dc6d445baa7c0907c7033d287a..cdefacb4d6c93adbf812fe25f268681d5de0eeb3 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -2387,37 +2387,17 @@ void EffectGraphVisitor::VisitStringInterpolateNode(
StringInterpolateNode* node) {
ValueGraphVisitor for_argument(owner());
ArrayNode* arguments = node->value();
+ bool is_singleton = false;
if (arguments->length() == 1) {
- ZoneGrowableArray<PushArgumentInstr*>* values =
- new(I) ZoneGrowableArray<PushArgumentInstr*>(1);
arguments->ElementAt(0)->Visit(&for_argument);
- Append(for_argument);
- PushArgumentInstr* push_arg = PushArgument(for_argument.value());
- values->Add(push_arg);
- const int kNumberOfArguments = 1;
- const Array& kNoArgumentNames = Object::null_array();
- const Class& cls =
- Class::Handle(Library::LookupCoreClass(Symbols::StringBase()));
- ASSERT(!cls.IsNull());
- const Function& function = Function::Handle(
- Resolver::ResolveStatic(
- cls,
- Library::PrivateCoreLibName(Symbols::InterpolateSingle()),
- kNumberOfArguments,
- kNoArgumentNames));
- StaticCallInstr* call =
- new(I) StaticCallInstr(node->token_pos(),
- function,
- kNoArgumentNames,
- values,
- owner()->ic_data_array());
- ReturnDefinition(call);
- return;
+ is_singleton = true;
+ } else {
+ arguments->Visit(&for_argument);
}
- arguments->Visit(&for_argument);
Append(for_argument);
StringInterpolateInstr* instr =
- new(I) StringInterpolateInstr(for_argument.value(), node->token_pos());
+ new(I) StringInterpolateInstr(for_argument.value(), node->token_pos(),
+ is_singleton);
ReturnDefinition(instr);
}
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698