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

Unified Diff: runtime/vm/intermediate_language.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.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 28647)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -15,6 +15,7 @@
#include "vm/object.h"
#include "vm/object_store.h"
#include "vm/os.h"
+#include "vm/resolver.h"
#include "vm/scopes.h"
#include "vm/stub_code.h"
#include "vm/symbols.h"
@@ -2614,6 +2615,26 @@
}
+const Function& StringInterpolateInstr::CallFunction() const {
+ if (function_.IsNull()) {
+ const int kNumberOfArguments = 1;
+ const Array& kNoArgumentNames = Object::null_array();
+ const Class& cls =
+ Class::Handle(Library::LookupCoreClass(Symbols::StringBase()));
+ ASSERT(!cls.IsNull());
+ function_ =
+ Resolver::ResolveStatic(
+ cls,
+ Library::PrivateCoreLibName(Symbols::Interpolate()),
+ kNumberOfArguments,
+ kNoArgumentNames,
+ Resolver::kIsQualified);
+ }
+ ASSERT(!function_.IsNull());
+ return function_;
+}
+
+
InvokeMathCFunctionInstr::InvokeMathCFunctionInstr(
ZoneGrowableArray<Value*>* inputs,
intptr_t original_deopt_id,

Powered by Google App Engine
This is Rietveld 408576698