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

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

Issue 1266483003: format with dart_style 0.2.0-rc.3 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 4 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/codegen/js_metalet.dart ('k') | lib/src/codegen/js_names.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 '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/compiler.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
16 /// The order that elements should be emitted in, with a bit indicating if 15 /// 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 16 /// 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. 17 /// the item could not be loaded, and needs to be made lazy.
19 /// 18 ///
20 /// The order will match the original source order, unless something needed to 19 /// The order will match the original source order, unless something needed to
21 /// be moved sooner to satisfy dependencies. 20 /// be moved sooner to satisfy dependencies.
22 /// 21 ///
23 /// Sometimes it's impossible to ensure an ordering when confronting library 22 /// Sometimes it's impossible to ensure an ordering when confronting library
24 /// cycles. In that case, we mark the definition as lazy. 23 /// cycles. In that case, we mark the definition as lazy.
25 final _loaded = new Map<Element, bool>(); 24 final _loaded = new Map<Element, bool>();
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 225 }
227 return _libraryCycleMemo[library] = result; 226 return _libraryCycleMemo[library] = result;
228 } 227 }
229 228
230 /// Returns whether this is a library imported with 'dart:' URI. 229 /// Returns whether this is a library imported with 'dart:' URI.
231 /// 230 ///
232 /// This is similar to [LibraryElement.isInSdk], but checking the URI instead 231 /// This is similar to [LibraryElement.isInSdk], but checking the URI instead
233 /// of the library naming convention, because the URI is reliable. 232 /// of the library naming convention, because the URI is reliable.
234 static bool _isDartUri(LibraryElement e) => e.source.uri.scheme == 'dart'; 233 static bool _isDartUri(LibraryElement e) => e.source.uri.scheme == 'dart';
235 } 234 }
OLDNEW
« no previous file with comments | « lib/src/codegen/js_metalet.dart ('k') | lib/src/codegen/js_names.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698