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

Side by Side Diff: pkg/analyzer/lib/src/generated/constant.dart

Issue 680863002: Remove JavaStringBuilder (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.constant; 8 library engine.constant;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after
1352 first = false; 1352 first = false;
1353 } else { 1353 } else {
1354 result = _dartObjectComputer.concatenate(node, result, element.accept(th is)); 1354 result = _dartObjectComputer.concatenate(node, result, element.accept(th is));
1355 } 1355 }
1356 } 1356 }
1357 return result; 1357 return result;
1358 } 1358 }
1359 1359
1360 @override 1360 @override
1361 DartObjectImpl visitSymbolLiteral(SymbolLiteral node) { 1361 DartObjectImpl visitSymbolLiteral(SymbolLiteral node) {
1362 JavaStringBuilder builder = new JavaStringBuilder(); 1362 StringBuffer buffer = new StringBuffer();
1363 List<Token> components = node.components; 1363 List<Token> components = node.components;
1364 for (int i = 0; i < components.length; i++) { 1364 for (int i = 0; i < components.length; i++) {
1365 if (i > 0) { 1365 if (i > 0) {
1366 builder.appendChar(0x2E); 1366 buffer.writeCharCode(0x2E);
1367 } 1367 }
1368 builder.append(components[i].lexeme); 1368 buffer.write(components[i].lexeme);
1369 } 1369 }
1370 return new DartObjectImpl(_typeProvider.symbolType, new SymbolState(builder. toString())); 1370 return new DartObjectImpl(_typeProvider.symbolType, new SymbolState(buffer.t oString()));
1371 } 1371 }
1372 1372
1373 /** 1373 /**
1374 * This method is called just before retrieving an evaluation result from an A ST node. Unit tests 1374 * This method is called just before retrieving an evaluation result from an A ST node. Unit tests
1375 * will override it to introduce additional error checking. 1375 * will override it to introduce additional error checking.
1376 */ 1376 */
1377 void beforeGetEvaluationResult(AstNode node) { 1377 void beforeGetEvaluationResult(AstNode node) {
1378 } 1378 }
1379 1379
1380 /** 1380 /**
(...skipping 3307 matching lines...) Expand 10 before | Expand all | Expand 10 after
4688 4688
4689 @override 4689 @override
4690 String get typeName => "Type"; 4690 String get typeName => "Type";
4691 4691
4692 @override 4692 @override
4693 int get hashCode => _element == null ? 0 : _element.hashCode; 4693 int get hashCode => _element == null ? 0 : _element.hashCode;
4694 4694
4695 @override 4695 @override
4696 String toString() => _element == null ? "-unknown-" : _element.name; 4696 String toString() => _element == null ? "-unknown-" : _element.name;
4697 } 4697 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698