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

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 27192005: Add new style of string interpolation optimization: new nodes, working constant folding. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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/intermediate_language_x64.cc
===================================================================
--- runtime/vm/intermediate_language_x64.cc (revision 28647)
+++ runtime/vm/intermediate_language_x64.cc (working copy)
@@ -960,6 +960,32 @@
}
+LocationSummary* StringInterpolateInstr::MakeLocationSummary() const {
+ const intptr_t kNumInputs = 1;
+ const intptr_t kNumTemps = 0;
+ LocationSummary* summary =
+ new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
+ summary->set_in(0, Location::RegisterLocation(RAX));
+ summary->set_out(Location::RegisterLocation(RAX));
+ return summary;
+}
+
+
+void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ Register array = locs()->in(0).reg();
+ __ pushq(array);
+ const int kNumberOfArguments = 1;
+ const Array& kNoArgumentNames = Object::null_array();
+ compiler->GenerateStaticCall(deopt_id(),
+ token_pos(),
+ CallFunction(),
+ kNumberOfArguments,
+ kNoArgumentNames,
+ locs());
+ ASSERT(locs()->out().reg() == RAX);
+}
+
+
LocationSummary* LoadUntaggedInstr::MakeLocationSummary() const {
const intptr_t kNumInputs = 1;
return LocationSummary::Make(kNumInputs,

Powered by Google App Engine
This is Rietveld 408576698