| OLD | NEW |
| 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 dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * If true, print a warning for each method that was resolved, but not | 8 * If true, print a warning for each method that was resolved, but not |
| 9 * compiled. | 9 * compiled. |
| 10 */ | 10 */ |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 CompilerTask fileReadingTask; | 365 CompilerTask fileReadingTask; |
| 366 DeferredLoadTask deferredLoadTask; | 366 DeferredLoadTask deferredLoadTask; |
| 367 String buildId; | 367 String buildId; |
| 368 | 368 |
| 369 static const SourceString MAIN = const SourceString('main'); | 369 static const SourceString MAIN = const SourceString('main'); |
| 370 static const SourceString CALL_OPERATOR_NAME = const SourceString('call'); | 370 static const SourceString CALL_OPERATOR_NAME = const SourceString('call'); |
| 371 static const SourceString NO_SUCH_METHOD = const SourceString('noSuchMethod'); | 371 static const SourceString NO_SUCH_METHOD = const SourceString('noSuchMethod'); |
| 372 static const int NO_SUCH_METHOD_ARG_COUNT = 1; | 372 static const int NO_SUCH_METHOD_ARG_COUNT = 1; |
| 373 static const SourceString CREATE_INVOCATION_MIRROR = | 373 static const SourceString CREATE_INVOCATION_MIRROR = |
| 374 const SourceString('createInvocationMirror'); | 374 const SourceString('createInvocationMirror'); |
| 375 static const SourceString INVOKE_ON = const SourceString('invokeOn'); | 375 static const SourceString INVOKE_ON = const SourceString('_invokeOn'); |
| 376 static const SourceString RUNTIME_TYPE = const SourceString('runtimeType'); | 376 static const SourceString RUNTIME_TYPE = const SourceString('runtimeType'); |
| 377 static const SourceString START_ROOT_ISOLATE = | 377 static const SourceString START_ROOT_ISOLATE = |
| 378 const SourceString('startRootIsolate'); | 378 const SourceString('startRootIsolate'); |
| 379 | 379 |
| 380 final Selector iteratorSelector = | 380 final Selector iteratorSelector = |
| 381 new Selector.getter(const SourceString('iterator'), null); | 381 new Selector.getter(const SourceString('iterator'), null); |
| 382 final Selector currentSelector = | 382 final Selector currentSelector = |
| 383 new Selector.getter(const SourceString('current'), null); | 383 new Selector.getter(const SourceString('current'), null); |
| 384 final Selector moveNextSelector = | 384 final Selector moveNextSelector = |
| 385 new Selector.call(const SourceString('moveNext'), null, 0); | 385 new Selector.call(const SourceString('moveNext'), null, 0); |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 | 692 |
| 693 assertMethod = jsHelperLibrary.find(const SourceString('assertHelper')); | 693 assertMethod = jsHelperLibrary.find(const SourceString('assertHelper')); |
| 694 identicalFunction = coreLibrary.find(const SourceString('identical')); | 694 identicalFunction = coreLibrary.find(const SourceString('identical')); |
| 695 | 695 |
| 696 initializeSpecialClasses(); | 696 initializeSpecialClasses(); |
| 697 | 697 |
| 698 functionClass.ensureResolved(this); | 698 functionClass.ensureResolved(this); |
| 699 functionApplyMethod = | 699 functionApplyMethod = |
| 700 functionClass.lookupLocalMember(const SourceString('apply')); | 700 functionClass.lookupLocalMember(const SourceString('apply')); |
| 701 jsInvocationMirrorClass.ensureResolved(this); | 701 jsInvocationMirrorClass.ensureResolved(this); |
| 702 invokeOnMethod = jsInvocationMirrorClass.lookupLocalMember( | 702 invokeOnMethod = jsInvocationMirrorClass.lookupLocalMember(INVOKE_ON); |
| 703 const SourceString('invokeOn')); | |
| 704 | 703 |
| 705 if (preserveComments) { | 704 if (preserveComments) { |
| 706 var uri = new Uri.fromComponents(scheme: 'dart', path: 'mirrors'); | 705 var uri = new Uri.fromComponents(scheme: 'dart', path: 'mirrors'); |
| 707 LibraryElement libraryElement = | 706 LibraryElement libraryElement = |
| 708 libraryLoader.loadLibrary(uri, null, uri); | 707 libraryLoader.loadLibrary(uri, null, uri); |
| 709 documentClass = libraryElement.find(const SourceString('Comment')); | 708 documentClass = libraryElement.find(const SourceString('Comment')); |
| 710 } | 709 } |
| 711 } | 710 } |
| 712 | 711 |
| 713 void importHelperLibrary(LibraryElement library) { | 712 void importHelperLibrary(LibraryElement library) { |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1280 | 1279 |
| 1281 void close() {} | 1280 void close() {} |
| 1282 | 1281 |
| 1283 toString() => name; | 1282 toString() => name; |
| 1284 | 1283 |
| 1285 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1284 /// Convenience method for getting an [api.CompilerOutputProvider]. |
| 1286 static NullSink outputProvider(String name, String extension) { | 1285 static NullSink outputProvider(String name, String extension) { |
| 1287 return new NullSink('$name.$extension'); | 1286 return new NullSink('$name.$extension'); |
| 1288 } | 1287 } |
| 1289 } | 1288 } |
| OLD | NEW |