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

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

Issue 10854140: Fix type inference for self-recursive functions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add method for retreiving generated code for dart2js tests Created 8 years, 4 months 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 | « lib/compiler/implementation/compiler.dart ('k') | lib/compiler/implementation/enqueue.dart » ('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 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
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 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/compiler.dart ('k') | lib/compiler/implementation/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698