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

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

Issue 10826279: 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
« no previous file with comments | « no previous file | tests/compiler/dart2js/call_site_type_inferer_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 1467
1468 visitConditional(Conditional node) { 1468 visitConditional(Conditional node) {
1469 node.visitChildren(this); 1469 node.visitChildren(this);
1470 } 1470 }
1471 1471
1472 visitStringInterpolation(StringInterpolation node) { 1472 visitStringInterpolation(StringInterpolation node) {
1473 node.visitChildren(this); 1473 node.visitChildren(this);
1474 } 1474 }
1475 1475
1476 visitStringInterpolationPart(StringInterpolationPart node) { 1476 visitStringInterpolationPart(StringInterpolationPart node) {
1477 world.registerDynamicInvocation(
1478 const SourceString('toString'), Selector.INVOCATION_0);
1477 node.visitChildren(this); 1479 node.visitChildren(this);
1478 } 1480 }
1479 1481
1480 visitBreakStatement(BreakStatement node) { 1482 visitBreakStatement(BreakStatement node) {
1481 TargetElement target; 1483 TargetElement target;
1482 if (node.target === null) { 1484 if (node.target === null) {
1483 target = statementScope.currentBreakTarget(); 1485 target = statementScope.currentBreakTarget();
1484 if (target === null) { 1486 if (target === null) {
1485 error(node, MessageKind.NO_BREAK_TARGET); 1487 error(node, MessageKind.NO_BREAK_TARGET);
1486 return; 1488 return;
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
2397 TopScope(LibraryElement library) : super(null, library); 2399 TopScope(LibraryElement library) : super(null, library);
2398 Element lookup(SourceString name) { 2400 Element lookup(SourceString name) {
2399 return library.find(name); 2401 return library.find(name);
2400 } 2402 }
2401 2403
2402 Element add(Element newElement) { 2404 Element add(Element newElement) {
2403 throw "Cannot add an element in the top scope"; 2405 throw "Cannot add an element in the top scope";
2404 } 2406 }
2405 String toString() => '$element'; 2407 String toString() => '$element';
2406 } 2408 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/call_site_type_inferer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698