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

Unified Diff: lib/compiler/implementation/ssa/nodes.dart

Issue 10544026: Simplify generated code for string interpolation by delaying the constant folding. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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: lib/compiler/implementation/ssa/nodes.dart
diff --git a/lib/compiler/implementation/ssa/nodes.dart b/lib/compiler/implementation/ssa/nodes.dart
index b84ddb4dcd280e92c5810067b2ffa8633000041c..8fa7e885db7893922c3dda37dd4419ba8759171a 100644
--- a/lib/compiler/implementation/ssa/nodes.dart
+++ b/lib/compiler/implementation/ssa/nodes.dart
@@ -51,6 +51,7 @@ interface HVisitor<R> {
R visitShiftRight(HShiftRight node);
R visitStatic(HStatic node);
R visitStaticStore(HStaticStore node);
+ R visitStringConcat(HStringConcat node);
R visitSubtract(HSubtract node);
R visitThis(HThis node);
R visitThrow(HThrow node);
@@ -301,6 +302,7 @@ class HBaseVisitor extends HGraphVisitor implements HVisitor {
visitSubtract(HSubtract node) => visitBinaryArithmetic(node);
visitStatic(HStatic node) => visitInstruction(node);
visitStaticStore(HStaticStore node) => visitInstruction(node);
+ visitStringConcat(HStringConcat node) => visitInstruction(node);
visitThis(HThis node) => visitParameterValue(node);
visitThrow(HThrow node) => visitControlFlow(node);
visitTry(HTry node) => visitControlFlow(node);
@@ -2205,6 +2207,14 @@ class HTypeConversion extends HCheck {
bool hasSideEffects() => checked;
}
+class HStringConcat extends HInstruction {
+ HStringConcat(inputs) : super(inputs);
+ HType get guaranteedType() => HType.STRING;
+
+ accept(HVisitor visitor) => visitor.visitStringConcat(this);
+ toString() => "string concat";
Lasse Reichstein Nielsen 2012/06/06 12:11:40 Should this class be allowed to have more than two
kasperl 2012/06/06 13:31:03 Changed the constructor to take exactly two argume
+}
+
/** Non-block-based (aka. traditional) loop information. */
class HLoopInformation {
final HBasicBlock header;

Powered by Google App Engine
This is Rietveld 408576698