| 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 class DartBackend extends Backend { | 5 class DartBackend extends Backend { |
| 6 final List<CompilerTask> tasks; | 6 final List<CompilerTask> tasks; |
| 7 final UnparseValidator unparseValidator; | 7 final UnparseValidator unparseValidator; |
| 8 | 8 |
| 9 Map<Element, TreeElements> get resolvedElements() => | 9 Map<Element, TreeElements> get resolvedElements() => |
| 10 compiler.enqueuer.resolution.resolvedElements; | 10 compiler.enqueuer.resolution.resolvedElements; |
| 11 Map<ClassElement, Set<Element>> resolvedClassMembers; | 11 Map<ClassElement, Set<Element>> resolvedClassMembers; |
| 12 | 12 |
| 13 DartBackend(Compiler compiler, [bool validateUnparse = false]) | 13 DartBackend(Compiler compiler, [bool validateUnparse = false]) |
| 14 : tasks = <CompilerTask>[], | 14 : tasks = <CompilerTask>[], |
| 15 unparseValidator = new UnparseValidator(compiler, validateUnparse), | 15 unparseValidator = new UnparseValidator(compiler, validateUnparse), |
| 16 resolvedClassMembers = new Map<ClassElement, Set<Element>>(), | 16 resolvedClassMembers = new Map<ClassElement, Set<Element>>(), |
| 17 super(compiler) { | 17 super(compiler) { |
| 18 tasks.add(unparseValidator); | 18 tasks.add(unparseValidator); |
| 19 } | 19 } |
| 20 | 20 |
| 21 void enqueueHelpers(Enqueuer world) { | 21 void enqueueHelpers(Enqueuer world) { |
| 22 // TODO(antonm): Implement this method, if needed. | 22 // TODO(antonm): Implement this method, if needed. |
| 23 } | 23 } |
| 24 | 24 |
| 25 CodeBuffer codegen(WorkItem work) { return new CodeBuffer(); } | 25 void codegen(WorkItem work) { } |
| 26 | 26 |
| 27 void processNativeClasses(Enqueuer world, | 27 void processNativeClasses(Enqueuer world, |
| 28 Collection<LibraryElement> libraries) { | 28 Collection<LibraryElement> libraries) { |
| 29 } | 29 } |
| 30 | 30 |
| 31 /** | 31 /** |
| 32 * Adds given class element with its member element to resolved classes | 32 * Adds given class element with its member element to resolved classes |
| 33 * collections. | 33 * collections. |
| 34 */ | 34 */ |
| 35 void addMemberToClass(Element element, ClassElement classElement) { | 35 void addMemberToClass(Element element, ClassElement classElement) { |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 } | 162 } |
| 163 typeAnnotation.visitChildren(this); | 163 typeAnnotation.visitChildren(this); |
| 164 } | 164 } |
| 165 | 165 |
| 166 void collect() { | 166 void collect() { |
| 167 compiler.withCurrentElement(rootElement, () { | 167 compiler.withCurrentElement(rootElement, () { |
| 168 rootElement.parseNode(compiler).accept(this); | 168 rootElement.parseNode(compiler).accept(this); |
| 169 }); | 169 }); |
| 170 } | 170 } |
| 171 } | 171 } |
| OLD | NEW |