| Index: runtime/lib/mirrors.cc
|
| diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
|
| index 9e2a1ddf04d455d805aa9c7c470309c8ce9f7070..da2545529427d180b5e164756931ad94c086aedc 100644
|
| --- a/runtime/lib/mirrors.cc
|
| +++ b/runtime/lib/mirrors.cc
|
| @@ -38,7 +38,6 @@ static RawInstance* CreateMirror(const String& mirror_class_name,
|
| return Instance::Cast(result).raw();
|
| }
|
|
|
| -
|
| // Conventions:
|
| // * For throwing a NSM in a class klass we use its runtime type as receiver,
|
| // i.e., klass.RareType().
|
| @@ -82,7 +81,6 @@ static void ThrowNoSuchMethod(const Instance& receiver,
|
| UNREACHABLE();
|
| }
|
|
|
| -
|
| static void EnsureConstructorsAreCompiled(const Function& func) {
|
| // Only generative constructors can have initializing formals.
|
| if (!func.IsGenerativeConstructor()) return;
|
| @@ -197,7 +195,6 @@ static RawInstance* CreateParameterMirrorList(const Function& func,
|
| return results.raw();
|
| }
|
|
|
| -
|
| static RawInstance* CreateTypeVariableMirror(const TypeParameter& param,
|
| const Instance& owner_mirror) {
|
| const Array& args = Array::Handle(Array::New(3));
|
| @@ -207,7 +204,6 @@ static RawInstance* CreateTypeVariableMirror(const TypeParameter& param,
|
| return CreateMirror(Symbols::_LocalTypeVariableMirror(), args);
|
| }
|
|
|
| -
|
| // We create a list in native code and let Dart code create the type mirror
|
| // object and the ordered map.
|
| static RawInstance* CreateTypeVariableList(const Class& cls) {
|
| @@ -230,7 +226,6 @@ static RawInstance* CreateTypeVariableList(const Class& cls) {
|
| return result.raw();
|
| }
|
|
|
| -
|
| static RawInstance* CreateTypedefMirror(const Class& cls,
|
| const AbstractType& type,
|
| const Bool& is_declaration,
|
| @@ -245,7 +240,6 @@ static RawInstance* CreateTypedefMirror(const Class& cls,
|
| return CreateMirror(Symbols::_LocalTypedefMirror(), args);
|
| }
|
|
|
| -
|
| static RawInstance* CreateFunctionTypeMirror(const AbstractType& type) {
|
| ASSERT(type.IsFunctionType());
|
| const Class& cls = Class::Handle(Type::Cast(type).type_class());
|
| @@ -257,7 +251,6 @@ static RawInstance* CreateFunctionTypeMirror(const AbstractType& type) {
|
| return CreateMirror(Symbols::_LocalFunctionTypeMirror(), args);
|
| }
|
|
|
| -
|
| static RawInstance* CreateMethodMirror(const Function& func,
|
| const Instance& owner_mirror,
|
| const AbstractType& instantiator) {
|
| @@ -289,7 +282,6 @@ static RawInstance* CreateMethodMirror(const Function& func,
|
| return CreateMirror(Symbols::_LocalMethodMirror(), args);
|
| }
|
|
|
| -
|
| static RawInstance* CreateVariableMirror(const Field& field,
|
| const Instance& owner_mirror) {
|
| const MirrorReference& field_ref =
|
| @@ -309,7 +301,6 @@ static RawInstance* CreateVariableMirror(const Field& field,
|
| return CreateMirror(Symbols::_LocalVariableMirror(), args);
|
| }
|
|
|
| -
|
| static RawInstance* CreateClassMirror(const Class& cls,
|
| const AbstractType& type,
|
| const Bool& is_declaration,
|
| @@ -348,7 +339,6 @@ static RawInstance* CreateClassMirror(const Class& cls,
|
| return CreateMirror(Symbols::_LocalClassMirror(), args);
|
| }
|
|
|
| -
|
| static RawInstance* CreateLibraryMirror(Thread* thread, const Library& lib) {
|
| Zone* zone = thread->zone();
|
| ASSERT(!lib.IsNull());
|
| @@ -386,7 +376,6 @@ static RawInstance* CreateLibraryMirror(Thread* thread, const Library& lib) {
|
| return CreateMirror(Symbols::_LocalLibraryMirror(), args);
|
| }
|
|
|
| -
|
| static RawInstance* CreateCombinatorMirror(const Object& identifiers,
|
| bool is_show) {
|
| const Array& args = Array::Handle(Array::New(2));
|
| @@ -395,7 +384,6 @@ static RawInstance* CreateCombinatorMirror(const Object& identifiers,
|
| return CreateMirror(Symbols::_LocalCombinatorMirror(), args);
|
| }
|
|
|
| -
|
| static RawInstance* CreateLibraryDependencyMirror(Thread* thread,
|
| const Instance& importer,
|
| const Namespace& ns,
|
| @@ -453,7 +441,6 @@ static RawInstance* CreateLibraryDependencyMirror(Thread* thread,
|
| return CreateMirror(Symbols::_LocalLibraryDependencyMirror(), args);
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(LibraryMirror_fromPrefix, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(LibraryPrefix, prefix,
|
| arguments->NativeArgAt(0));
|
| @@ -464,7 +451,6 @@ DEFINE_NATIVE_ENTRY(LibraryMirror_fromPrefix, 1) {
|
| return CreateLibraryMirror(thread, deferred_lib);
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(LibraryMirror_libraryDependencies, 2) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(Instance, lib_mirror, arguments->NativeArgAt(0));
|
| GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(1));
|
| @@ -525,7 +511,6 @@ DEFINE_NATIVE_ENTRY(LibraryMirror_libraryDependencies, 2) {
|
| return deps.raw();
|
| }
|
|
|
| -
|
| static RawInstance* CreateTypeMirror(const AbstractType& type) {
|
| if (type.IsTypeRef()) {
|
| AbstractType& ref_type = AbstractType::Handle(TypeRef::Cast(type).type());
|
| @@ -571,7 +556,6 @@ static RawInstance* CreateTypeMirror(const AbstractType& type) {
|
| return Instance::null();
|
| }
|
|
|
| -
|
| static RawInstance* CreateIsolateMirror() {
|
| Thread* thread = Thread::Current();
|
| Isolate* isolate = thread->isolate();
|
| @@ -587,7 +571,6 @@ static RawInstance* CreateIsolateMirror() {
|
| return CreateMirror(Symbols::_LocalIsolateMirror(), args);
|
| }
|
|
|
| -
|
| static void VerifyMethodKindShifts() {
|
| #ifdef DEBUG
|
| Thread* thread = Thread::Current();
|
| @@ -611,7 +594,6 @@ static void VerifyMethodKindShifts() {
|
| #endif
|
| }
|
|
|
| -
|
| static RawInstance* ReturnResult(const Object& result) {
|
| if (result.IsError()) {
|
| Exceptions::PropagateError(Error::Cast(result));
|
| @@ -624,7 +606,6 @@ static RawInstance* ReturnResult(const Object& result) {
|
| return Instance::null();
|
| }
|
|
|
| -
|
| // Invoke the function, or noSuchMethod if it is null. Propagate any unhandled
|
| // exceptions. Wrap and propagate any compilation errors.
|
| static RawInstance* InvokeDynamicFunction(const Instance& receiver,
|
| @@ -646,7 +627,6 @@ static RawInstance* InvokeDynamicFunction(const Instance& receiver,
|
| return ReturnResult(result);
|
| }
|
|
|
| -
|
| static RawInstance* InvokeLibraryGetter(const Library& library,
|
| const String& getter_name,
|
| const bool throw_nsm_if_absent) {
|
| @@ -702,7 +682,6 @@ static RawInstance* InvokeLibraryGetter(const Library& library,
|
| return Object::sentinel().raw();
|
| }
|
|
|
| -
|
| static RawInstance* InvokeClassGetter(const Class& klass,
|
| const String& getter_name,
|
| const bool throw_nsm_if_absent) {
|
| @@ -744,7 +723,6 @@ static RawInstance* InvokeClassGetter(const Class& klass,
|
| return field.StaticValue();
|
| }
|
|
|
| -
|
| static RawAbstractType* InstantiateType(const AbstractType& type,
|
| const AbstractType& instantiator) {
|
| ASSERT(type.IsFinalized());
|
| @@ -779,7 +757,6 @@ static RawAbstractType* InstantiateType(const AbstractType& type,
|
| return result.Canonicalize();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(MirrorSystem_libraries, 0) {
|
| const GrowableObjectArray& libraries =
|
| GrowableObjectArray::Handle(zone, isolate->object_store()->libraries());
|
| @@ -800,14 +777,12 @@ DEFINE_NATIVE_ENTRY(MirrorSystem_libraries, 0) {
|
| return library_mirrors.raw();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(MirrorSystem_isolate, 0) {
|
| VerifyMethodKindShifts();
|
|
|
| return CreateIsolateMirror();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(Mirrors_makeLocalClassMirror, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
|
| PROPAGATE_IF_MALFORMED(type);
|
| @@ -824,13 +799,11 @@ DEFINE_NATIVE_ENTRY(Mirrors_makeLocalClassMirror, 1) {
|
| Object::null_instance());
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(Mirrors_makeLocalTypeMirror, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
|
| return CreateTypeMirror(type);
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(Mirrors_instantiateGenericType, 2) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
|
| GET_NON_NULL_NATIVE_ARGUMENT(Array, args, arguments->NativeArgAt(1));
|
| @@ -893,7 +866,6 @@ DEFINE_NATIVE_ENTRY(Mirrors_instantiateGenericType, 2) {
|
| return instantiated_type.raw();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(Mirrors_mangleName, 2) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(String, name, arguments->NativeArgAt(0));
|
| GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(1));
|
| @@ -901,14 +873,12 @@ DEFINE_NATIVE_ENTRY(Mirrors_mangleName, 2) {
|
| return lib.IsPrivate(name) ? lib.PrivateName(name) : name.raw();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(MirrorReference_equals, 2) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, a, arguments->NativeArgAt(0));
|
| GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, b, arguments->NativeArgAt(1));
|
| return Bool::Get(a.referent() == b.referent()).raw();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(DeclarationMirror_metadata, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(Instance, reflectee, arguments->NativeArgAt(0));
|
| Object& decl = Object::Handle();
|
| @@ -949,7 +919,6 @@ DEFINE_NATIVE_ENTRY(DeclarationMirror_metadata, 1) {
|
| return metadata.raw();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(FunctionTypeMirror_call_method, 2) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(Instance, owner_mirror,
|
| arguments->NativeArgAt(0));
|
| @@ -961,7 +930,6 @@ DEFINE_NATIVE_ENTRY(FunctionTypeMirror_call_method, 2) {
|
| return CreateMethodMirror(func, owner_mirror, AbstractType::Handle());
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(FunctionTypeMirror_parameters, 2) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(Instance, owner, arguments->NativeArgAt(0));
|
| GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(1));
|
| @@ -969,7 +937,6 @@ DEFINE_NATIVE_ENTRY(FunctionTypeMirror_parameters, 2) {
|
| return CreateParameterMirrorList(func, owner);
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(FunctionTypeMirror_return_type, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
|
| const Function& func = Function::Handle(ref.GetFunctionReferent());
|
| @@ -979,7 +946,6 @@ DEFINE_NATIVE_ENTRY(FunctionTypeMirror_return_type, 1) {
|
| return type.Canonicalize();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(ClassMirror_libraryUri, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
|
| const Class& klass = Class::Handle(ref.GetClassReferent());
|
| @@ -988,7 +954,6 @@ DEFINE_NATIVE_ENTRY(ClassMirror_libraryUri, 1) {
|
| return library.url();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(ClassMirror_supertype, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
|
| PROPAGATE_IF_MALFORMED(type);
|
| @@ -999,7 +964,6 @@ DEFINE_NATIVE_ENTRY(ClassMirror_supertype, 1) {
|
| return super_type.raw();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(ClassMirror_supertype_instantiated, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
|
| PROPAGATE_IF_MALFORMED(type);
|
| @@ -1009,7 +973,6 @@ DEFINE_NATIVE_ENTRY(ClassMirror_supertype_instantiated, 1) {
|
| return InstantiateType(super_type, type);
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(ClassMirror_interfaces, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
|
| PROPAGATE_IF_MALFORMED(type);
|
| @@ -1046,7 +1009,6 @@ DEFINE_NATIVE_ENTRY(ClassMirror_interfaces_instantiated, 1) {
|
| return interfaces_inst.raw();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(ClassMirror_mixin, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
|
| PROPAGATE_IF_MALFORMED(type);
|
| @@ -1057,7 +1019,6 @@ DEFINE_NATIVE_ENTRY(ClassMirror_mixin, 1) {
|
| return mixin_type.raw();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(ClassMirror_mixin_instantiated, 2) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
|
| GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, instantiator,
|
| @@ -1073,7 +1034,6 @@ DEFINE_NATIVE_ENTRY(ClassMirror_mixin_instantiated, 2) {
|
| return InstantiateType(mixin_type, instantiator);
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(ClassMirror_members, 3) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(Instance, owner_mirror,
|
| arguments->NativeArgAt(0));
|
| @@ -1122,7 +1082,6 @@ DEFINE_NATIVE_ENTRY(ClassMirror_members, 3) {
|
| return member_mirrors.raw();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(ClassMirror_constructors, 3) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(Instance, owner_mirror,
|
| arguments->NativeArgAt(0));
|
| @@ -1156,7 +1115,6 @@ DEFINE_NATIVE_ENTRY(ClassMirror_constructors, 3) {
|
| return constructor_mirrors.raw();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(LibraryMirror_members, 2) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(Instance, owner_mirror,
|
| arguments->NativeArgAt(0));
|
| @@ -1209,7 +1167,6 @@ DEFINE_NATIVE_ENTRY(LibraryMirror_members, 2) {
|
| return member_mirrors.raw();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(ClassMirror_type_variables, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
|
| const Class& klass = Class::Handle(ref.GetClassReferent());
|
| @@ -1221,7 +1178,6 @@ DEFINE_NATIVE_ENTRY(ClassMirror_type_variables, 1) {
|
| return CreateTypeVariableList(klass);
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(ClassMirror_type_arguments, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(AbstractType, type, arguments->NativeArgAt(0));
|
|
|
| @@ -1259,7 +1215,6 @@ DEFINE_NATIVE_ENTRY(ClassMirror_type_arguments, 1) {
|
| return result.raw();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(TypeVariableMirror_owner, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(TypeParameter, param, arguments->NativeArgAt(0));
|
| const Class& owner = Class::Handle(param.parameterized_class());
|
| @@ -1269,13 +1224,11 @@ DEFINE_NATIVE_ENTRY(TypeVariableMirror_owner, 1) {
|
| Instance::null_instance());
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(TypeVariableMirror_upper_bound, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(TypeParameter, param, arguments->NativeArgAt(0));
|
| return param.bound();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(Mirrors_evalInLibraryWithPrivateKey, 2) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(String, expression, arguments->NativeArgAt(0));
|
| GET_NATIVE_ARGUMENT(String, private_key, arguments->NativeArgAt(1));
|
| @@ -1382,7 +1335,6 @@ DEFINE_NATIVE_ENTRY(InstanceMirror_invoke, 5) {
|
| args_descriptor);
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(InstanceMirror_invokeGetter, 3) {
|
| // Argument 0 is the mirror, which is unused by the native. It exists
|
| // because this native is an instance method in order to be polymorphic
|
| @@ -1418,7 +1370,6 @@ DEFINE_NATIVE_ENTRY(InstanceMirror_invokeGetter, 3) {
|
| args_descriptor);
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(InstanceMirror_invokeSetter, 4) {
|
| // Argument 0 is the mirror, which is unused by the native. It exists
|
| // because this native is an instance method in order to be polymorphic
|
| @@ -1445,7 +1396,6 @@ DEFINE_NATIVE_ENTRY(InstanceMirror_invokeSetter, 4) {
|
| args_descriptor);
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(InstanceMirror_computeType, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(Instance, instance, arguments->NativeArgAt(0));
|
| const AbstractType& type = AbstractType::Handle(instance.GetType(Heap::kNew));
|
| @@ -1454,7 +1404,6 @@ DEFINE_NATIVE_ENTRY(InstanceMirror_computeType, 1) {
|
| return type.Canonicalize();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(ClosureMirror_function, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(Instance, closure, arguments->NativeArgAt(0));
|
| ASSERT(!closure.IsNull());
|
| @@ -1489,7 +1438,6 @@ DEFINE_NATIVE_ENTRY(ClosureMirror_function, 1) {
|
| return Instance::null();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(ClassMirror_invoke, 5) {
|
| // Argument 0 is the mirror, which is unused by the native. It exists
|
| // because this native is an instance method in order to be polymorphic
|
| @@ -1570,7 +1518,6 @@ DEFINE_NATIVE_ENTRY(ClassMirror_invoke, 5) {
|
| return result.raw();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(ClassMirror_invokeGetter, 3) {
|
| // Argument 0 is the mirror, which is unused by the native. It exists
|
| // because this native is an instance method in order to be polymorphic
|
| @@ -1586,7 +1533,6 @@ DEFINE_NATIVE_ENTRY(ClassMirror_invokeGetter, 3) {
|
| return InvokeClassGetter(klass, getter_name, true);
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(ClassMirror_invokeSetter, 4) {
|
| // Argument 0 is the mirror, which is unused by the native. It exists
|
| // because this native is an instance method in order to be polymorphic
|
| @@ -1647,7 +1593,6 @@ DEFINE_NATIVE_ENTRY(ClassMirror_invokeSetter, 4) {
|
| return value.raw();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(ClassMirror_invokeConstructor, 5) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
|
| const Class& klass = Class::Handle(ref.GetClassReferent());
|
| @@ -1800,7 +1745,6 @@ DEFINE_NATIVE_ENTRY(ClassMirror_invokeConstructor, 5) {
|
| }
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(LibraryMirror_invoke, 5) {
|
| // Argument 0 is the mirror, which is unused by the native. It exists
|
| // because this native is an instance method in order to be polymorphic
|
| @@ -1866,7 +1810,6 @@ DEFINE_NATIVE_ENTRY(LibraryMirror_invoke, 5) {
|
| return result.raw();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(LibraryMirror_invokeGetter, 3) {
|
| // Argument 0 is the mirror, which is unused by the native. It exists
|
| // because this native is an instance method in order to be polymorphic
|
| @@ -1877,7 +1820,6 @@ DEFINE_NATIVE_ENTRY(LibraryMirror_invokeGetter, 3) {
|
| return InvokeLibraryGetter(library, getter_name, true);
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(LibraryMirror_invokeSetter, 4) {
|
| // Argument 0 is the mirror, which is unused by the native. It exists
|
| // because this native is an instance method in order to be polymorphic
|
| @@ -1934,7 +1876,6 @@ DEFINE_NATIVE_ENTRY(LibraryMirror_invokeSetter, 4) {
|
| return value.raw();
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(MethodMirror_owner, 2) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
|
| GET_NATIVE_ARGUMENT(AbstractType, instantiator, arguments->NativeArgAt(1));
|
| @@ -1952,7 +1893,6 @@ DEFINE_NATIVE_ENTRY(MethodMirror_owner, 2) {
|
| return CreateClassMirror(owner, type, Bool::True(), Object::null_instance());
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(MethodMirror_parameters, 2) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(Instance, owner, arguments->NativeArgAt(0));
|
| GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(1));
|
| @@ -1960,7 +1900,6 @@ DEFINE_NATIVE_ENTRY(MethodMirror_parameters, 2) {
|
| return CreateParameterMirrorList(func, owner);
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(MethodMirror_return_type, 2) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
|
| const Function& func = Function::Handle(ref.GetFunctionReferent());
|
| @@ -1972,14 +1911,12 @@ DEFINE_NATIVE_ENTRY(MethodMirror_return_type, 2) {
|
| return InstantiateType(type, instantiator);
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(MethodMirror_source, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
|
| const Function& func = Function::Handle(ref.GetFunctionReferent());
|
| return func.GetSource();
|
| }
|
|
|
| -
|
| static RawInstance* CreateSourceLocation(const String& uri,
|
| intptr_t line,
|
| intptr_t column) {
|
| @@ -1990,7 +1927,6 @@ static RawInstance* CreateSourceLocation(const String& uri,
|
| return CreateMirror(Symbols::_SourceLocation(), args);
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(DeclarationMirror_location, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(Instance, reflectee, arguments->NativeArgAt(0));
|
| Object& decl = Object::Handle(zone);
|
| @@ -2073,7 +2009,6 @@ DEFINE_NATIVE_ENTRY(DeclarationMirror_location, 1) {
|
| return CreateSourceLocation(uri, from_line, from_col);
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(TypedefMirror_referent, 1) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(Type, type, arguments->NativeArgAt(0));
|
| ASSERT(type.IsFunctionType());
|
| @@ -2086,7 +2021,6 @@ DEFINE_NATIVE_ENTRY(TypedefMirror_referent, 1) {
|
| return CreateFunctionTypeMirror(referent_type);
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(ParameterMirror_type, 3) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
|
| GET_NON_NULL_NATIVE_ARGUMENT(Smi, pos, arguments->NativeArgAt(1));
|
| @@ -2098,7 +2032,6 @@ DEFINE_NATIVE_ENTRY(ParameterMirror_type, 3) {
|
| return InstantiateType(type, instantiator);
|
| }
|
|
|
| -
|
| DEFINE_NATIVE_ENTRY(VariableMirror_type, 2) {
|
| GET_NON_NULL_NATIVE_ARGUMENT(MirrorReference, ref, arguments->NativeArgAt(0));
|
| const Field& field = Field::Handle(ref.GetFieldReferent());
|
|
|