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

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

Issue 23496037: Turn a Dart String + String into a JavaScript String + String. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/optimize.dart (revision 27280)
+++ sdk/lib/_internal/compiler/implementation/ssa/optimize.dart (working copy)
@@ -285,7 +285,7 @@
Selector selector = node.selector;
HInstruction input = node.inputs[1];
- if (selector.isCall()) {
+ if (selector.isCall() || selector.isOperator()) {
Element target;
if (input.isExtendableArray(compiler)) {
if (selector.applies(backend.jsArrayRemoveLast, compiler)) {
@@ -302,11 +302,11 @@
if (node.inputs[2].isString(compiler)) {
target = backend.jsStringSplit;
}
- } else if (selector.applies(backend.jsStringConcat, compiler)) {
- // `concat` is turned into a JavaScript '+' so we need to
+ } else if (selector.applies(backend.jsStringOperatorAdd, compiler)) {
+ // `operator+` is turned into a JavaScript '+' so we need to
// make sure the receiver is not null.
if (node.inputs[2].isString(compiler) && !input.canBeNull()) {
- target = backend.jsStringConcat;
+ target = backend.jsStringOperatorAdd;
}
} else if (selector.applies(backend.jsStringToString, compiler)
&& !input.canBeNull()) {
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/codegen.dart ('k') | tests/compiler/dart2js/string_add_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698