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

Unified Diff: runtime/vm/parser.cc

Issue 10562038: Remove obsolete String + code (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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--;
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698