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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart

Issue 11558016: Don't rename 'call' in dart2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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/co19/co19-dart2dart.status » ('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 part of dart_backend; 5 part of dart_backend;
6 6
7 // TODO(ahe): This class is simply wrong. This backend should use 7 // TODO(ahe): This class is simply wrong. This backend should use
8 // elements when it can, not AST nodes. Perhaps a [Map<Element, 8 // elements when it can, not AST nodes. Perhaps a [Map<Element,
9 // TreeElements>] is what is needed. 9 // TreeElements>] is what is needed.
10 class ElementAst { 10 class ElementAst {
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 fixedMemberNames.add(name.split(r'$').last); 245 fixedMemberNames.add(name.split(r'$').last);
246 } 246 }
247 } 247 }
248 // Even class names are added due to a delicate problem we have: 248 // Even class names are added due to a delicate problem we have:
249 // if one imports dart:core with a prefix, we cannot tell prefix.name 249 // if one imports dart:core with a prefix, we cannot tell prefix.name
250 // from dynamic invocation (alas!). So we'd better err on preserving 250 // from dynamic invocation (alas!). So we'd better err on preserving
251 // those names. 251 // those names.
252 fixedMemberNames.add(element.name.slowToString()); 252 fixedMemberNames.add(element.name.slowToString());
253 }); 253 });
254 } 254 }
255 // The VM will automatically invoke the call method of objects
256 // that are invoked as functions. Make sure to not rename that.
257 fixedMemberNames.add('call');
255 // TODO(antonm): TypeError.srcType and TypeError.dstType are defined in 258 // TODO(antonm): TypeError.srcType and TypeError.dstType are defined in
256 // runtime/lib/error.dart. Overall, all DartVM specific libs should be 259 // runtime/lib/error.dart. Overall, all DartVM specific libs should be
257 // accounted for. 260 // accounted for.
258 fixedMemberNames.add('srcType'); 261 fixedMemberNames.add('srcType');
259 fixedMemberNames.add('dstType'); 262 fixedMemberNames.add('dstType');
260 263
261 /** 264 /**
262 * Tells whether we should output given element. Corelib classes like 265 * Tells whether we should output given element. Corelib classes like
263 * Object should not be in the resulting code. 266 * Object should not be in the resulting code.
264 */ 267 */
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 } 556 }
554 557
555 compareElements(e0, e1) { 558 compareElements(e0, e1) {
556 int result = compareBy((e) => e.getLibrary().uri.toString())(e0, e1); 559 int result = compareBy((e) => e.getLibrary().uri.toString())(e0, e1);
557 if (result != 0) return result; 560 if (result != 0) return result;
558 return compareBy((e) => e.position().charOffset)(e0, e1); 561 return compareBy((e) => e.position().charOffset)(e0, e1);
559 } 562 }
560 563
561 List<Element> sortElements(Collection<Element> elements) => 564 List<Element> sortElements(Collection<Element> elements) =>
562 sorted(elements, compareElements); 565 sorted(elements, compareElements);
OLDNEW
« no previous file with comments | « no previous file | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698