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

Unified Diff: runtime/vm/intermediate_language.h

Issue 563973004: Call special VM interpolate for single element interpolation. (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
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 32f546399ce0ea7ac51c89990ee7bbfdc697486a..37481f138d231751ad92b1b5bd78ac40153e6d4d 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -3800,11 +3800,15 @@ class StringToCharCodeInstr : public TemplateDefinition<1> {
class StringInterpolateInstr : public TemplateDefinition<1> {
public:
- StringInterpolateInstr(Value* value, intptr_t token_pos)
- : token_pos_(token_pos), function_(Function::Handle()) {
+ StringInterpolateInstr(Value* value, intptr_t token_pos, bool singleton)
+ : token_pos_(token_pos),
+ function_(Function::Handle()),
+ singleton_(singleton) {
SetInputAt(0, value);
}
+ bool IsSingleton() const { return singleton_; }
Florian Schneider 2014/09/12 10:33:37 This accessor may be removed if not needed.
Lasse Reichstein Nielsen 2014/09/12 12:49:39 Done.
+
Value* value() const { return inputs_[0]; }
virtual intptr_t token_pos() const { return token_pos_; }
@@ -3823,6 +3827,7 @@ class StringInterpolateInstr : public TemplateDefinition<1> {
private:
const intptr_t token_pos_;
Function& function_;
+ const bool singleton_;
Florian Schneider 2014/09/12 10:33:37 I'd rename singleton_ to is_singleton_ for consist
Lasse Reichstein Nielsen 2014/09/12 12:49:39 Done.
DISALLOW_COPY_AND_ASSIGN(StringInterpolateInstr);
};

Powered by Google App Engine
This is Rietveld 408576698