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

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

Issue 10553007: Remove support for String operator + from dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update co19 status 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: dart/lib/compiler/implementation/ssa/nodes.dart
diff --git a/dart/lib/compiler/implementation/ssa/nodes.dart b/dart/lib/compiler/implementation/ssa/nodes.dart
index 0d6bb70f794abbcb31a2ea8f7c1da901b83f25c2..8f108d4c341d7504b214b09d4472e487752e0bd9 100644
--- a/dart/lib/compiler/implementation/ssa/nodes.dart
+++ b/dart/lib/compiler/implementation/ssa/nodes.dart
@@ -1397,11 +1397,7 @@ class HAdd extends HBinaryArithmetic {
: super(target, left, right);
accept(HVisitor visitor) => visitor.visitAdd(this);
- bool get builtin() {
- return (left.isNumber() && right.isNumber())
- || (left.isString() && right.isString())
- || (left.isString() && right is HConstant);
- }
+ bool get builtin() => left.isNumber() && right.isNumber();
kasperl 2012/06/18 11:35:55 This isn't needed anymore.
ahe 2012/06/18 11:47:19 Because this is what the superclass does already.
HType computeTypeFromInputTypes() {
if (left.isInteger() && right.isInteger()) return left.propagatedType;
@@ -1409,7 +1405,6 @@ class HAdd extends HBinaryArithmetic {
if (left.isDouble() || right.isDouble()) return HType.DOUBLE;
return HType.NUMBER;
}
- if (left.isString()) return HType.STRING;
return HType.UNKNOWN;
}
@@ -1418,11 +1413,6 @@ class HAdd extends HBinaryArithmetic {
if (propagatedType.isInteger()) {
return HType.INTEGER;
}
- // TODO(floitsch): remove string specialization once string+ is removed
- // from dart2js.
- if (propagatedType.isString() || left.isString() || right.isString()) {
- return HType.STRING;
- }
// If the desired output is a number or any of the inputs is a number
// ask for a number. Note that we might return the input's (say 'left')
// type depending on its (the 'left's) type. But that shouldn't matter.
@@ -1433,7 +1423,6 @@ class HAdd extends HBinaryArithmetic {
}
HType get likelyType() {
- if (left.isString() || right.isString()) return HType.STRING;
if (left.isTypeUnknown() || left.isNumber()) return HType.NUMBER;
return HType.UNKNOWN;
}

Powered by Google App Engine
This is Rietveld 408576698