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

Side by Side Diff: lib/compiler/implementation/resolver.dart

Issue 10855174: Lazy implementation of final variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove lazy bailout initializers. Created 8 years, 3 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
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 interface TreeElements { 5 interface TreeElements {
6 Element operator[](Node node); 6 Element operator[](Node node);
7 Selector getSelector(Send send); 7 Selector getSelector(Send send);
8 DartType getType(TypeAnnotation annotation); 8 DartType getType(TypeAnnotation annotation);
9 } 9 }
10 10
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 error(node, 186 error(node,
187 MessageKind.CANNOT_FIND_CONSTRUCTOR2, 187 MessageKind.CANNOT_FIND_CONSTRUCTOR2,
188 [name, defaultClass.name]); 188 [name, defaultClass.name]);
189 } 189 }
190 } 190 }
191 191
192 TreeElements resolveField(Element element) { 192 TreeElements resolveField(Element element) {
193 Node tree = element.parseNode(compiler); 193 Node tree = element.parseNode(compiler);
194 ResolverVisitor visitor = new ResolverVisitor(compiler, element); 194 ResolverVisitor visitor = new ResolverVisitor(compiler, element);
195 initializerDo(tree, visitor.visit); 195 initializerDo(tree, visitor.visit);
196 if (!element.isInstanceMember()) {
197 compiler.enqueuer.resolution.registerStaticUse(
198 compiler.cyclicThrowHelper);
199 }
196 return visitor.mapping; 200 return visitor.mapping;
197 } 201 }
198 202
199 TreeElements resolveParameter(Element element) { 203 TreeElements resolveParameter(Element element) {
200 Node tree = element.parseNode(compiler); 204 Node tree = element.parseNode(compiler);
201 ResolverVisitor visitor = 205 ResolverVisitor visitor =
202 new ResolverVisitor(compiler, element.enclosingElement); 206 new ResolverVisitor(compiler, element.enclosingElement);
203 initializerDo(tree, visitor.visit); 207 initializerDo(tree, visitor.visit);
204 return visitor.mapping; 208 return visitor.mapping;
205 } 209 }
(...skipping 2430 matching lines...) Expand 10 before | Expand all | Expand 10 after
2636 TopScope(LibraryElement library) : super(null, library); 2640 TopScope(LibraryElement library) : super(null, library);
2637 Element lookup(SourceString name) { 2641 Element lookup(SourceString name) {
2638 return library.find(name); 2642 return library.find(name);
2639 } 2643 }
2640 2644
2641 Element add(Element newElement) { 2645 Element add(Element newElement) {
2642 throw "Cannot add an element in the top scope"; 2646 throw "Cannot add an element in the top scope";
2643 } 2647 }
2644 String toString() => '$element'; 2648 String toString() => '$element';
2645 } 2649 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698