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

Side by Side Diff: runtime/lib/mirrors.cc

Issue 328923002: Lazy loading of deferred libraries (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 #include "lib/invocation_mirror.h" 5 #include "lib/invocation_mirror.h"
6 #include "vm/bootstrap_natives.h" 6 #include "vm/bootstrap_natives.h"
7 #include "vm/class_finalizer.h" 7 #include "vm/class_finalizer.h"
8 #include "vm/compiler.h" 8 #include "vm/compiler.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/exceptions.h" 10 #include "vm/exceptions.h"
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 } 378 }
379 379
380 380
381 static RawInstance* CreateLibraryMirror(const Library& lib) { 381 static RawInstance* CreateLibraryMirror(const Library& lib) {
382 const Array& args = Array::Handle(Array::New(3)); 382 const Array& args = Array::Handle(Array::New(3));
383 args.SetAt(0, MirrorReference::Handle(MirrorReference::New(lib))); 383 args.SetAt(0, MirrorReference::Handle(MirrorReference::New(lib)));
384 String& str = String::Handle(); 384 String& str = String::Handle();
385 str = lib.name(); 385 str = lib.name();
386 args.SetAt(1, str); 386 args.SetAt(1, str);
387 str = lib.url(); 387 str = lib.url();
388 if (str.Equals("dart:builtin") || str.Equals("dart:_blink")) { 388 if (str.Equals("dart:_builtin") || str.Equals("dart:_blink")) {
389 // Censored library (grumble). 389 // Censored library (grumble).
390 return Instance::null(); 390 return Instance::null();
391 } 391 }
392 args.SetAt(2, str); 392 args.SetAt(2, str);
393 return CreateMirror(Symbols::_LocalLibraryMirror(), args); 393 return CreateMirror(Symbols::_LocalLibraryMirror(), args);
394 } 394 }
395 395
396 396
397 static RawInstance* CreateCombinatorMirror(const Object& identifiers, 397 static RawInstance* CreateCombinatorMirror(const Object& identifiers,
398 bool is_show) { 398 bool is_show) {
(...skipping 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after
1966 } 1966 }
1967 1967
1968 DEFINE_NATIVE_ENTRY(TypeMirror_moreSpecificTest, 2) { 1968 DEFINE_NATIVE_ENTRY(TypeMirror_moreSpecificTest, 2) {
1969 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); 1969 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0));
1970 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); 1970 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1));
1971 return Bool::Get(a.IsMoreSpecificThan(b, NULL)).raw(); 1971 return Bool::Get(a.IsMoreSpecificThan(b, NULL)).raw();
1972 } 1972 }
1973 1973
1974 1974
1975 } // namespace dart 1975 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/lib_prefix.dart ('k') | runtime/lib/object.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698