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

Side by Side Diff: lib/src/codegen/js_module_item_order.dart

Issue 1235503010: fixes #219, able to compile multiple entry points (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: workaround tree mutation Created 5 years, 5 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) 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 'dart:collection' show HashMap; 5 import 'dart:collection' show HashMap;
6 import 'package:analyzer/src/generated/ast.dart'; 6 import 'package:analyzer/src/generated/ast.dart';
7 import 'package:analyzer/src/generated/element.dart'; 7 import 'package:analyzer/src/generated/element.dart';
8 import 'package:dev_compiler/src/dependency_graph.dart' show corelibOrder; 8 import 'package:dev_compiler/src/compiler.dart' show corelibOrder;
9 9
10 typedef void ModuleItemEmitter(AstNode item); 10 typedef void ModuleItemEmitter(AstNode item);
11 11
12 /// Helper that tracks order of elements visited by the compiler, detecting 12 /// Helper that tracks order of elements visited by the compiler, detecting
13 /// if the top level item can be loaded eagerly or not. 13 /// if the top level item can be loaded eagerly or not.
14 class ModuleItemLoadOrder { 14 class ModuleItemLoadOrder {
15 15
16 /// The order that elements should be emitted in, with a bit indicating if 16 /// The order that elements should be emitted in, with a bit indicating if
17 /// the element should be generated lazily. The value will be `false` if 17 /// the element should be generated lazily. The value will be `false` if
18 /// the item could not be loaded, and needs to be made lazy. 18 /// the item could not be loaded, and needs to be made lazy.
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 226 }
227 return _libraryCycleMemo[library] = result; 227 return _libraryCycleMemo[library] = result;
228 } 228 }
229 229
230 /// Returns whether this is a library imported with 'dart:' URI. 230 /// Returns whether this is a library imported with 'dart:' URI.
231 /// 231 ///
232 /// This is similar to [LibraryElement.isInSdk], but checking the URI instead 232 /// This is similar to [LibraryElement.isInSdk], but checking the URI instead
233 /// of the library naming convention, because the URI is reliable. 233 /// of the library naming convention, because the URI is reliable.
234 static bool _isDartUri(LibraryElement e) => e.source.uri.scheme == 'dart'; 234 static bool _isDartUri(LibraryElement e) => e.source.uri.scheme == 'dart';
235 } 235 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698