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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirrors.dart

Issue 330913004: Move Compiler.libraries to LibraryLoader. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix compiler_isolate.dart Created 6 years, 6 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 | Annotate | Revision Log
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 dart2js.mirrors; 5 library dart2js.mirrors;
6 6
7 import 'dart:collection' show UnmodifiableListView, UnmodifiableMapView; 7 import 'dart:collection' show UnmodifiableListView, UnmodifiableMapView;
8 8
9 import '../elements/elements.dart'; 9 import '../elements/elements.dart';
10 import '../scanner/scannerlib.dart'; 10 import '../scanner/scannerlib.dart';
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 UnmodifiableMapView<Uri, LibraryMirror> _filteredLibraries; 277 UnmodifiableMapView<Uri, LibraryMirror> _filteredLibraries;
278 278
279 Dart2JsMirrorSystem(this.compiler); 279 Dart2JsMirrorSystem(this.compiler);
280 280
281 IsolateMirror get isolate => null; 281 IsolateMirror get isolate => null;
282 282
283 void _ensureLibraries() { 283 void _ensureLibraries() {
284 if (_filteredLibraries == null) { 284 if (_filteredLibraries == null) {
285 var filteredLibs = new Map<Uri, LibraryMirror>(); 285 var filteredLibs = new Map<Uri, LibraryMirror>();
286 _libraryMap = new Map<LibraryElement, Dart2JsLibraryMirror>(); 286 _libraryMap = new Map<LibraryElement, Dart2JsLibraryMirror>();
287 compiler.libraries.forEach((_, LibraryElement v) { 287 compiler.libraryLoader.libraries.forEach((LibraryElement v) {
288 var mirror = new Dart2JsLibraryMirror(mirrorSystem, v); 288 var mirror = new Dart2JsLibraryMirror(mirrorSystem, v);
289 if (_includeLibrary(mirror)) { 289 if (_includeLibrary(mirror)) {
290 filteredLibs[mirror.uri] = mirror; 290 filteredLibs[mirror.uri] = mirror;
291 } 291 }
292 _libraryMap[v] = mirror; 292 _libraryMap[v] = mirror;
293 }); 293 });
294 294
295 _filteredLibraries = 295 _filteredLibraries =
296 new UnmodifiableMapView<Uri, LibraryMirror>(filteredLibs); 296 new UnmodifiableMapView<Uri, LibraryMirror>(filteredLibs);
297 } 297 }
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 node, variable._variable.treeElements, variable.mirrorSystem); 489 node, variable._variable.treeElements, variable.mirrorSystem);
490 } 490 }
491 491
492 static ResolvedNode defaultValueSyntaxOf(Dart2JsParameterMirror parameter) { 492 static ResolvedNode defaultValueSyntaxOf(Dart2JsParameterMirror parameter) {
493 if (!parameter.hasDefaultValue) return null; 493 if (!parameter.hasDefaultValue) return null;
494 var node = parameter._element.initializer; 494 var node = parameter._element.initializer;
495 var treeElements = parameter._element.treeElements; 495 var treeElements = parameter._element.treeElements;
496 return new ResolvedNode(node, treeElements, parameter.mirrorSystem); 496 return new ResolvedNode(node, treeElements, parameter.mirrorSystem);
497 } 497 }
498 } 498 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698