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

Side by Side Diff: lib/src/closure/closure_annotator.dart

Issue 1879373004: Implement modular compilation (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 8 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 | « lib/src/closure/closure_annotation.dart ('k') | lib/src/codegen/ast_builder.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 import 'package:analyzer/dart/ast/ast.dart' hide ConstantEvaluator; 5 import 'package:analyzer/dart/ast/ast.dart' hide ConstantEvaluator;
6 import 'package:analyzer/dart/element/element.dart'; 6 import 'package:analyzer/dart/element/element.dart';
7 import 'package:analyzer/dart/element/type.dart'; 7 import 'package:analyzer/dart/element/type.dart';
8 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider; 8 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
9 9
10 import '../js/js_ast.dart' as JS show Node, Expression, TypeRef; 10 import '../js_ast/js_ast.dart' as JS show Node, TypeRef;
11 11
12 import 'closure_annotation.dart'; 12 import 'closure_annotation.dart';
13 13
14 /// Mixin that can generate [ClosureAnnotation]s for Dart elements and types. 14 /// Mixin that can generate [ClosureAnnotation]s for Dart elements and types.
15 abstract class ClosureAnnotator { 15 abstract class ClosureAnnotator {
16 TypeProvider get types; 16 TypeProvider get types;
17 17
18 JS.TypeRef emitTypeRef(DartType type); 18 JS.TypeRef emitTypeRef(DartType type);
19 19
20 // TODO(ochafik): Handle destructured params when Closure supports it. 20 // TODO(ochafik): Handle destructured params when Closure supports it.
(...skipping 12 matching lines...) Expand all
33 type: e is VariableElement 33 type: e is VariableElement
34 ? emitTypeRef(e.type /*, forceTypeDefExpansion: true*/) 34 ? emitTypeRef(e.type /*, forceTypeDefExpansion: true*/)
35 : null, 35 : null,
36 superType: e is ClassElement ? emitTypeRef(e.supertype) : null, 36 superType: e is ClassElement ? emitTypeRef(e.supertype) : null,
37 interfaces: 37 interfaces:
38 e is ClassElement ? e.interfaces.map(emitTypeRef).toList() : null, 38 e is ClassElement ? e.interfaces.map(emitTypeRef).toList() : null,
39 isOverride: e.isOverride, 39 isOverride: e.isOverride,
40 isTypedef: e is FunctionTypeAliasElement); 40 isTypedef: e is FunctionTypeAliasElement);
41 } 41 }
42 } 42 }
OLDNEW
« no previous file with comments | « lib/src/closure/closure_annotation.dart ('k') | lib/src/codegen/ast_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698