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

Side by Side Diff: pkg/compiler/lib/src/closure.dart

Issue 1970703002: Store ResolvedAst on AstElement (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 years, 7 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/common/codegen.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 library closureToClassMapper; 5 library closureToClassMapper;
6 6
7 import 'common.dart'; 7 import 'common.dart';
8 import 'common/names.dart' show Identifiers; 8 import 'common/names.dart' show Identifiers;
9 import 'common/resolution.dart' show ParsingContext, Resolution; 9 import 'common/resolution.dart' show ParsingContext, Resolution;
10 import 'common/tasks.dart' show CompilerTask; 10 import 'common/tasks.dart' show CompilerTask;
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 MemberElement get memberContext { 349 MemberElement get memberContext {
350 return closureClass.methodElement.memberContext; 350 return closureClass.methodElement.memberContext;
351 } 351 }
352 352
353 bool get hasNode => node != null; 353 bool get hasNode => node != null;
354 354
355 FunctionExpression parseNode(ParsingContext parsing) => node; 355 FunctionExpression parseNode(ParsingContext parsing) => node;
356 356
357 Element get analyzableElement => closureClass.methodElement.analyzableElement; 357 Element get analyzableElement => closureClass.methodElement.analyzableElement;
358 358
359 bool get hasResolvedAst => true;
360
359 ResolvedAst get resolvedAst { 361 ResolvedAst get resolvedAst {
360 return new ParsedResolvedAst(this, node, node.body, treeElements, 362 return new ParsedResolvedAst(this, node, node.body, treeElements,
361 expression.compilationUnit.script.resourceUri); 363 expression.compilationUnit.script.resourceUri);
362 } 364 }
363 365
364 accept(ElementVisitor visitor, arg) { 366 accept(ElementVisitor visitor, arg) {
365 return visitor.visitMethodElement(this, arg); 367 return visitor.visitMethodElement(this, arg);
366 } 368 }
367 } 369 }
368 370
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 /// 1179 ///
1178 /// Move the below classes to a JS model eventually. 1180 /// Move the below classes to a JS model eventually.
1179 /// 1181 ///
1180 abstract class JSEntity implements Entity { 1182 abstract class JSEntity implements Entity {
1181 Entity get declaredEntity; 1183 Entity get declaredEntity;
1182 } 1184 }
1183 1185
1184 abstract class PrivatelyNamedJSEntity implements JSEntity { 1186 abstract class PrivatelyNamedJSEntity implements JSEntity {
1185 Entity get rootOfScope; 1187 Entity get rootOfScope;
1186 } 1188 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/common/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698