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

Side by Side Diff: lib/compiler/implementation/resolver.dart

Issue 10824276: Register toString dynamic invocation in the presence of string interpolation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 interface TreeElements { 5 interface TreeElements {
6 Element operator[](Node node); 6 Element operator[](Node node);
7 Selector getSelector(Send send); 7 Selector getSelector(Send send);
8 Type getType(TypeAnnotation annotation); 8 Type getType(TypeAnnotation annotation);
9 } 9 }
10 10
(...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 1437
1438 visitConditional(Conditional node) { 1438 visitConditional(Conditional node) {
1439 node.visitChildren(this); 1439 node.visitChildren(this);
1440 } 1440 }
1441 1441
1442 visitStringInterpolation(StringInterpolation node) { 1442 visitStringInterpolation(StringInterpolation node) {
1443 node.visitChildren(this); 1443 node.visitChildren(this);
1444 } 1444 }
1445 1445
1446 visitStringInterpolationPart(StringInterpolationPart node) { 1446 visitStringInterpolationPart(StringInterpolationPart node) {
1447 world.registerDynamicInvocation(const SourceString('toString'), Selector.INV OCATION_0);
ahe 2012/08/13 13:26:55 Long line.
Anton Muhin 2012/08/13 13:49:42 Done.
1447 node.visitChildren(this); 1448 node.visitChildren(this);
1448 } 1449 }
1449 1450
1450 visitBreakStatement(BreakStatement node) { 1451 visitBreakStatement(BreakStatement node) {
1451 TargetElement target; 1452 TargetElement target;
1452 if (node.target === null) { 1453 if (node.target === null) {
1453 target = statementScope.currentBreakTarget(); 1454 target = statementScope.currentBreakTarget();
1454 if (target === null) { 1455 if (target === null) {
1455 error(node, MessageKind.NO_BREAK_TARGET); 1456 error(node, MessageKind.NO_BREAK_TARGET);
1456 return; 1457 return;
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
2309 TopScope(LibraryElement library) : super(null, library); 2310 TopScope(LibraryElement library) : super(null, library);
2310 Element lookup(SourceString name) { 2311 Element lookup(SourceString name) {
2311 return library.find(name); 2312 return library.find(name);
2312 } 2313 }
2313 2314
2314 Element add(Element newElement) { 2315 Element add(Element newElement) {
2315 throw "Cannot add an element in the top scope"; 2316 throw "Cannot add an element in the top scope";
2316 } 2317 }
2317 String toString() => '$element'; 2318 String toString() => '$element';
2318 } 2319 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/resolver_test.dart » ('j') | tests/compiler/dart2js/resolver_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698