| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 abstract class Backend { | 80 abstract class Backend { |
| 81 final Compiler compiler; | 81 final Compiler compiler; |
| 82 final ConstantSystem constantSystem; | 82 final ConstantSystem constantSystem; |
| 83 | 83 |
| 84 Backend(this.compiler, | 84 Backend(this.compiler, |
| 85 [ConstantSystem constantSystem = DART_CONSTANT_SYSTEM]) | 85 [ConstantSystem constantSystem = DART_CONSTANT_SYSTEM]) |
| 86 : this.constantSystem = constantSystem; | 86 : this.constantSystem = constantSystem; |
| 87 | 87 |
| 88 void initializeHelperClasses() {} | 88 void initializeHelperClasses() {} |
| 89 | 89 |
| 90 void enqueueAllTopLevelFunctions(LibraryElement lib, Enqueuer world) { | |
| 91 lib.forEachExport((Element e) { | |
| 92 if (e.isFunction()) world.addToWorkList(e); | |
| 93 }); | |
| 94 } | |
| 95 | |
| 96 void enqueueHelpers(ResolutionEnqueuer world, TreeElements elements); | 90 void enqueueHelpers(ResolutionEnqueuer world, TreeElements elements); |
| 97 void codegen(CodegenWorkItem work); | 91 void codegen(CodegenWorkItem work); |
| 98 | 92 |
| 99 // The backend determines the native resolution enqueuer, with a no-op | 93 // The backend determines the native resolution enqueuer, with a no-op |
| 100 // default, so tools like dart2dart can ignore the native classes. | 94 // default, so tools like dart2dart can ignore the native classes. |
| 101 native.NativeEnqueuer nativeResolutionEnqueuer(world) { | 95 native.NativeEnqueuer nativeResolutionEnqueuer(world) { |
| 102 return new native.NativeEnqueuer(); | 96 return new native.NativeEnqueuer(); |
| 103 } | 97 } |
| 104 native.NativeEnqueuer nativeCodegenEnqueuer(world) { | 98 native.NativeEnqueuer nativeCodegenEnqueuer(world) { |
| 105 return new native.NativeEnqueuer(); | 99 return new native.NativeEnqueuer(); |
| (...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1678 | 1672 |
| 1679 void close() {} | 1673 void close() {} |
| 1680 | 1674 |
| 1681 toString() => name; | 1675 toString() => name; |
| 1682 | 1676 |
| 1683 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1677 /// Convenience method for getting an [api.CompilerOutputProvider]. |
| 1684 static NullSink outputProvider(String name, String extension) { | 1678 static NullSink outputProvider(String name, String extension) { |
| 1685 return new NullSink('$name.$extension'); | 1679 return new NullSink('$name.$extension'); |
| 1686 } | 1680 } |
| 1687 } | 1681 } |
| OLD | NEW |