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

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: Merge. 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 8920ea03b826194960c438a5441f72dfa6d4b0e0..e67084dd79de649bd9eecbbf8eff615a501691f7 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 visitSwitch(HSwitch node);
R visitThis(HThis node);
@@ -304,6 +305,7 @@ class HBaseVisitor extends HGraphVisitor implements HVisitor {
visitSwitch(HSwitch node) => visitControlFlow(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);
@@ -2232,6 +2234,18 @@ class HTypeConversion extends HCheck {
bool hasSideEffects() => checked;
}
+class HStringConcat extends HInstruction {
+ HStringConcat(HInstruction left, HInstrunction right)
+ : super(<HInstruction>[left, right]);
+ HType get guaranteedType() => HType.STRING;
+
+ HInstruction get left() => inputs[0];
+ HInstruction get right() => inputs[1];
+
+ accept(HVisitor visitor) => visitor.visitStringConcat(this);
+ toString() => "string concat";
+}
+
/** Non-block-based (aka. traditional) loop information. */
class HLoopInformation {
final HBasicBlock header;

Powered by Google App Engine
This is Rietveld 408576698