| 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 } | 377 } |
| 378 | 378 |
| 379 | 379 |
| 380 static RawInstance* CreateLibraryMirror(const Library& lib) { | 380 static RawInstance* CreateLibraryMirror(const Library& lib) { |
| 381 const Array& args = Array::Handle(Array::New(3)); | 381 const Array& args = Array::Handle(Array::New(3)); |
| 382 args.SetAt(0, MirrorReference::Handle(MirrorReference::New(lib))); | 382 args.SetAt(0, MirrorReference::Handle(MirrorReference::New(lib))); |
| 383 String& str = String::Handle(); | 383 String& str = String::Handle(); |
| 384 str = lib.name(); | 384 str = lib.name(); |
| 385 args.SetAt(1, str); | 385 args.SetAt(1, str); |
| 386 str = lib.url(); | 386 str = lib.url(); |
| 387 if (str.Equals("dart:builtin") || str.Equals("dart:_blink")) { | 387 if (str.Equals("dart:_builtin") || str.Equals("dart:_blink")) { |
| 388 // Censored library (grumble). | 388 // Censored library (grumble). |
| 389 return Instance::null(); | 389 return Instance::null(); |
| 390 } | 390 } |
| 391 args.SetAt(2, str); | 391 args.SetAt(2, str); |
| 392 return CreateMirror(Symbols::_LocalLibraryMirror(), args); | 392 return CreateMirror(Symbols::_LocalLibraryMirror(), args); |
| 393 } | 393 } |
| 394 | 394 |
| 395 | 395 |
| 396 static RawInstance* CreateCombinatorMirror(const Object& identifiers, | 396 static RawInstance* CreateCombinatorMirror(const Object& identifiers, |
| 397 bool is_show) { | 397 bool is_show) { |
| (...skipping 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1978 } | 1978 } |
| 1979 | 1979 |
| 1980 DEFINE_NATIVE_ENTRY(TypeMirror_moreSpecificTest, 2) { | 1980 DEFINE_NATIVE_ENTRY(TypeMirror_moreSpecificTest, 2) { |
| 1981 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); | 1981 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, a, arguments->NativeArgAt(0)); |
| 1982 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); | 1982 GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, b, arguments->NativeArgAt(1)); |
| 1983 return Bool::Get(a.IsMoreSpecificThan(b, NULL)).raw(); | 1983 return Bool::Get(a.IsMoreSpecificThan(b, NULL)).raw(); |
| 1984 } | 1984 } |
| 1985 | 1985 |
| 1986 | 1986 |
| 1987 } // namespace dart | 1987 } // namespace dart |
| OLD | NEW |