| Index: runtime/vm/parser.cc
|
| ===================================================================
|
| --- runtime/vm/parser.cc (revision 8799)
|
| +++ runtime/vm/parser.cc (working copy)
|
| @@ -26,7 +26,6 @@
|
| DEFINE_FLAG(bool, trace_parser, false, "Trace parser operations.");
|
| DEFINE_FLAG(bool, warning_as_error, false, "Treat warnings as errors.");
|
| DEFINE_FLAG(bool, silent_warnings, false, "Silence warnings.");
|
| -DEFINE_FLAG(bool, allow_string_plus, false, "Allow + operator on strings.");
|
|
|
| static void CheckedModeHandler(bool value) {
|
| FLAG_enable_asserts = value;
|
| @@ -5938,29 +5937,8 @@
|
| op_pos, op_kind, left_operand, right_operand);
|
| break; // Equality and relational operators cannot be chained.
|
| } else {
|
| - StringConcatNode* str_concat = NULL;
|
| - if (op_kind == Token::kADD) {
|
| - if (left_operand->IsLiteralNode()) {
|
| - LiteralNode* lit = left_operand->AsLiteralNode();
|
| - if (lit->literal().IsString()) {
|
| - if (FLAG_allow_string_plus) {
|
| - str_concat = new StringConcatNode(lit->token_index());
|
| - str_concat->AddExpr(lit);
|
| - } else {
|
| - ErrorMsg(op_pos, "operator + on strings no longer allowed");
|
| - }
|
| - }
|
| - } else if (left_operand->IsStringConcatNode()) {
|
| - str_concat = left_operand->AsStringConcatNode();
|
| - }
|
| - }
|
| - if (str_concat != NULL) {
|
| - str_concat->AddExpr(right_operand);
|
| - left_operand = str_concat;
|
| - } else {
|
| - left_operand = OptimizeBinaryOpNode(
|
| - op_pos, op_kind, left_operand, right_operand);
|
| - }
|
| + left_operand = OptimizeBinaryOpNode(
|
| + op_pos, op_kind, left_operand, right_operand);
|
| }
|
| }
|
| current_preced--;
|
|
|