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

Unified Diff: runtime/vm/ast.cc

Issue 1455213002: Handle potentially const interpolation (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 | « runtime/vm/ast.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast.cc
diff --git a/runtime/vm/ast.cc b/runtime/vm/ast.cc
index 48bd0534e0b425094f3e700caaeeb38ae81486c7..8698e26baf59c6dbf19da96d7719500fb99b3265 100644
--- a/runtime/vm/ast.cc
+++ b/runtime/vm/ast.cc
@@ -122,6 +122,16 @@ void ArrayNode::VisitChildren(AstNodeVisitor* visitor) const {
}
+bool StringInterpolateNode::IsPotentiallyConst() const {
+ for (int i = 0; i < value_->length(); i++) {
+ if (!value_->ElementAt(i)->IsPotentiallyConst()) {
+ return false;
+ }
+ }
+ return true;
+}
+
+
bool LiteralNode::IsPotentiallyConst() const {
return true;
}
« no previous file with comments | « runtime/vm/ast.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698