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

Side by Side Diff: pkg/compiler/lib/src/elements/modelx.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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 elements.modelx; 5 library elements.modelx;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/resolution.dart' show Resolution, ParsingContext; 8 import '../common/resolution.dart' show Resolution, ParsingContext;
9 import '../compiler.dart' show Compiler; 9 import '../compiler.dart' show Compiler;
10 import '../constants/constant_constructors.dart'; 10 import '../constants/constant_constructors.dart';
(...skipping 2282 matching lines...) Expand 10 before | Expand all | Expand 10 after
2293 this.constructor = constructor, 2293 this.constructor = constructor,
2294 super(constructor.name, ElementKind.GENERATIVE_CONSTRUCTOR_BODY, 2294 super(constructor.name, ElementKind.GENERATIVE_CONSTRUCTOR_BODY,
2295 Modifiers.EMPTY, constructor.enclosingElement) { 2295 Modifiers.EMPTY, constructor.enclosingElement) {
2296 functionSignature = constructor.functionSignature; 2296 functionSignature = constructor.functionSignature;
2297 } 2297 }
2298 2298
2299 bool get hasNode => _resolvedAst.kind == ResolvedAstKind.PARSED; 2299 bool get hasNode => _resolvedAst.kind == ResolvedAstKind.PARSED;
2300 2300
2301 FunctionExpression get node => _resolvedAst.node; 2301 FunctionExpression get node => _resolvedAst.node;
2302 2302
2303 bool get hasResolvedAst => true;
2304
2303 ResolvedAst get resolvedAst { 2305 ResolvedAst get resolvedAst {
2304 if (_resolvedAst.kind == ResolvedAstKind.PARSED) { 2306 if (_resolvedAst.kind == ResolvedAstKind.PARSED) {
2305 return new ParsedResolvedAst(declaration, _resolvedAst.node, 2307 return new ParsedResolvedAst(declaration, _resolvedAst.node,
2306 _resolvedAst.body, _resolvedAst.elements, _resolvedAst.sourceUri); 2308 _resolvedAst.body, _resolvedAst.elements, _resolvedAst.sourceUri);
2307 } else { 2309 } else {
2308 return new SynthesizedResolvedAst(declaration, _resolvedAst.kind); 2310 return new SynthesizedResolvedAst(declaration, _resolvedAst.kind);
2309 } 2311 }
2310 } 2312 }
2311 2313
2312 List<MetadataAnnotation> get metadata => constructor.metadata; 2314 List<MetadataAnnotation> get metadata => constructor.metadata;
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
3282 body = node.asFunctionExpression().body; 3284 body = node.asFunctionExpression().body;
3283 } 3285 }
3284 return new ParsedResolvedAst( 3286 return new ParsedResolvedAst(
3285 declaration, 3287 declaration,
3286 node, 3288 node,
3287 body, 3289 body,
3288 definingElement.treeElements, 3290 definingElement.treeElements,
3289 definingElement.compilationUnit.script.resourceUri); 3291 definingElement.compilationUnit.script.resourceUri);
3290 } 3292 }
3291 } 3293 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_builder_task.dart ('k') | pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698