OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |