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

Unified Diff: runtime/vm/ast.h

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
« no previous file with comments | « no previous file | runtime/vm/ast_printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast.h
===================================================================
--- runtime/vm/ast.h (revision 28731)
+++ runtime/vm/ast.h (working copy)
@@ -60,6 +60,7 @@
V(TryCatch) \
V(Throw) \
V(InlinedFinally) \
+ V(StringInterpolate) \
#define FORWARD_DECLARATION(BaseName) class BaseName##Node;
@@ -306,6 +307,26 @@
};
+class StringInterpolateNode : public AstNode {
+ public:
+ StringInterpolateNode(intptr_t token_pos, ArrayNode* value)
+ : AstNode(token_pos), value_(value) { }
+
+ virtual void VisitChildren(AstNodeVisitor* visitor) const {
+ value_->Visit(visitor);
+ }
+
+ ArrayNode* value() const { return value_; }
+
+ DECLARE_COMMON_NODE_FUNCTIONS(StringInterpolateNode);
+
+ private:
+ ArrayNode* value_;
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(StringInterpolateNode);
+};
+
+
class LiteralNode : public AstNode {
public:
LiteralNode(intptr_t token_pos, const Instance& literal)
« no previous file with comments | « no previous file | runtime/vm/ast_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698