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

Side by Side Diff: runtime/lib/mirrors_impl.dart

Issue 1935703002: - reset 'dirty' flag to false after the libraries mirrors is computed, this ensures that we compute… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | runtime/lib/string.cc » ('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) 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 // VM-specific implementation of the dart:mirrors library. 5 // VM-specific implementation of the dart:mirrors library.
6 6
7 import "dart:collection" show UnmodifiableListView, UnmodifiableMapView; 7 import "dart:collection" show UnmodifiableListView, UnmodifiableMapView;
8 import "dart:async" show Future; 8 import "dart:async" show Future;
9 9
10 var dirty = false; 10 var dirty = false;
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 class _LocalMirrorSystem extends MirrorSystem { 220 class _LocalMirrorSystem extends MirrorSystem {
221 final TypeMirror dynamicType = new _SpecialTypeMirror('dynamic'); 221 final TypeMirror dynamicType = new _SpecialTypeMirror('dynamic');
222 final TypeMirror voidType = new _SpecialTypeMirror('void'); 222 final TypeMirror voidType = new _SpecialTypeMirror('void');
223 223
224 var _libraries; 224 var _libraries;
225 Map<Uri, LibraryMirror> get libraries { 225 Map<Uri, LibraryMirror> get libraries {
226 if ((_libraries == null) || dirty) { 226 if ((_libraries == null) || dirty) {
227 _libraries = new Map<Uri, LibraryMirror>.fromIterable( 227 _libraries = new Map<Uri, LibraryMirror>.fromIterable(
228 _computeLibraries(), key: (e) => e.uri); 228 _computeLibraries(), key: (e) => e.uri);
229 dirty = false;
229 } 230 }
230 return _libraries; 231 return _libraries;
231 } 232 }
232 static _computeLibraries() native "MirrorSystem_libraries"; 233 static _computeLibraries() native "MirrorSystem_libraries";
233 234
234 var _isolate; 235 var _isolate;
235 IsolateMirror get isolate { 236 IsolateMirror get isolate {
236 if (_isolate == null) { 237 if (_isolate == null) {
237 _isolate = _computeIsolate(); 238 _isolate = _computeIsolate();
238 } 239 }
(...skipping 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1669 if (typeMirror == null) { 1670 if (typeMirror == null) {
1670 typeMirror = makeLocalTypeMirror(key); 1671 typeMirror = makeLocalTypeMirror(key);
1671 _instantiationCache[key] = typeMirror; 1672 _instantiationCache[key] = typeMirror;
1672 if (typeMirror is ClassMirror && !typeMirror._isGeneric) { 1673 if (typeMirror is ClassMirror && !typeMirror._isGeneric) {
1673 _declarationCache[key] = typeMirror; 1674 _declarationCache[key] = typeMirror;
1674 } 1675 }
1675 } 1676 }
1676 return typeMirror; 1677 return typeMirror;
1677 } 1678 }
1678 } 1679 }
OLDNEW
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | runtime/lib/string.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698