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 library dart2js.compiler_base; | 5 library dart2js.compiler_base; |
6 | 6 |
7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
8 | 8 |
9 import '../compiler_new.dart' as api; | 9 import '../compiler_new.dart' as api; |
10 import 'backend_strategy.dart'; | 10 import 'backend_strategy.dart'; |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 } | 853 } |
854 registerCompileTimeError(currentElement, message); | 854 registerCompileTimeError(currentElement, message); |
855 } | 855 } |
856 | 856 |
857 /** | 857 /** |
858 * Reads the script specified by the [readableUri]. | 858 * Reads the script specified by the [readableUri]. |
859 * | 859 * |
860 * See [LibraryLoader] for terminology on URIs. | 860 * See [LibraryLoader] for terminology on URIs. |
861 */ | 861 */ |
862 Future<Script> readScript(Uri readableUri, [Spannable node]) { | 862 Future<Script> readScript(Uri readableUri, [Spannable node]) { |
863 throw new SpannableAssertionFailure( | 863 throw failedAt(node, 'Compiler.readScript not implemented.'); |
864 node, 'Compiler.readScript not implemented.'); | |
865 } | 864 } |
866 | 865 |
867 Future<Binary> readBinary(Uri readableUri, [Spannable node]) { | 866 Future<Binary> readBinary(Uri readableUri, [Spannable node]) { |
868 throw new SpannableAssertionFailure( | 867 throw failedAt(node, 'Compiler.readBinary not implemented.'); |
869 node, 'Compiler.readBinary not implemented.'); | |
870 } | 868 } |
871 | 869 |
872 Element lookupElementIn(ScopeContainerElement container, String name) { | 870 Element lookupElementIn(ScopeContainerElement container, String name) { |
873 Element element = container.localLookup(name); | 871 Element element = container.localLookup(name); |
874 if (element == null) { | 872 if (element == null) { |
875 throw 'Could not find $name in $container'; | 873 throw 'Could not find $name in $container'; |
876 } | 874 } |
877 return element; | 875 return element; |
878 } | 876 } |
879 | 877 |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1600 _ElementScanner(this.scanner); | 1598 _ElementScanner(this.scanner); |
1601 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); | 1599 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); |
1602 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); | 1600 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); |
1603 } | 1601 } |
1604 | 1602 |
1605 class _EmptyEnvironment implements Environment { | 1603 class _EmptyEnvironment implements Environment { |
1606 const _EmptyEnvironment(); | 1604 const _EmptyEnvironment(); |
1607 | 1605 |
1608 String valueOf(String key) => null; | 1606 String valueOf(String key) => null; |
1609 } | 1607 } |
OLD | NEW |