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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart

Issue 171873002: Fix for interpolation codegen bug (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
index 8116646ac79b2fe535e0de28e9b0d28c43a6c1ea..09f02972a2a0c5614dd9ff127af4586f60c89b0e 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
@@ -263,10 +263,10 @@ class SsaInstructionSimplifier extends HBaseVisitor
target = backend.jsArrayAdd;
}
}
- } else if (input.isString(compiler)) {
+ } else if (input.isStringOrNull(compiler)) {
if (selector.applies(backend.jsStringSplit, compiler)) {
HInstruction argument = node.inputs[2];
- if (argument.isString(compiler) && !argument.canBeNull()) {
+ if (argument.isString(compiler)) {
target = backend.jsStringSplit;
}
} else if (selector.applies(backend.jsStringOperatorAdd, compiler)) {
@@ -274,7 +274,6 @@ class SsaInstructionSimplifier extends HBaseVisitor
// make sure the receiver and the argument are not null.
HInstruction argument = node.inputs[2];
if (argument.isString(compiler)
- && !argument.canBeNull()
&& !input.canBeNull()) {
target = backend.jsStringOperatorAdd;
}
@@ -792,7 +791,7 @@ class SsaInstructionSimplifier extends HBaseVisitor
HInstruction visitStringify(HStringify node) {
HInstruction input = node.inputs[0];
- if (input.isString(compiler) && !input.canBeNull()) return input;
+ if (input.isString(compiler)) return input;
if (input.isConstant()) {
HConstant constant = input;
if (!constant.constant.isPrimitive()) return node;

Powered by Google App Engine
This is Rietveld 408576698