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

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

Issue 10831285: Revert "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 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(
1448 const SourceString('toString'), Selector.INVOCATION_0);
1449 node.visitChildren(this); 1447 node.visitChildren(this);
1450 } 1448 }
1451 1449
1452 visitBreakStatement(BreakStatement node) { 1450 visitBreakStatement(BreakStatement node) {
1453 TargetElement target; 1451 TargetElement target;
1454 if (node.target === null) { 1452 if (node.target === null) {
1455 target = statementScope.currentBreakTarget(); 1453 target = statementScope.currentBreakTarget();
1456 if (target === null) { 1454 if (target === null) {
1457 error(node, MessageKind.NO_BREAK_TARGET); 1455 error(node, MessageKind.NO_BREAK_TARGET);
1458 return; 1456 return;
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
2311 TopScope(LibraryElement library) : super(null, library); 2309 TopScope(LibraryElement library) : super(null, library);
2312 Element lookup(SourceString name) { 2310 Element lookup(SourceString name) {
2313 return library.find(name); 2311 return library.find(name);
2314 } 2312 }
2315 2313
2316 Element add(Element newElement) { 2314 Element add(Element newElement) {
2317 throw "Cannot add an element in the top scope"; 2315 throw "Cannot add an element in the top scope";
2318 } 2316 }
2319 String toString() => '$element'; 2317 String toString() => '$element';
2320 } 2318 }
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