diff --git a/src/CLR/CorLib/corlib_native.cpp b/src/CLR/CorLib/corlib_native.cpp index 0aed936532..014960563e 100644 --- a/src/CLR/CorLib/corlib_native.cpp +++ b/src/CLR/CorLib/corlib_native.cpp @@ -8,6 +8,76 @@ static const CLR_RT_MethodHandler method_lookup[] = { + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + Library_corlib_native_System_Globalization_CultureInfo::get_CurrentUICultureInternal___STATIC__SystemGlobalizationCultureInfo, + Library_corlib_native_System_Globalization_CultureInfo::set_CurrentUICultureInternal___STATIC__VOID__SystemGlobalizationCultureInfo, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + Library_corlib_native_System_Reflection_ConstructorInfo::GetCustomAttributes___SZARRAY_OBJECT__BOOLEAN, + Library_corlib_native_System_Reflection_ConstructorInfo::Invoke___OBJECT__SZARRAY_OBJECT, + NULL, + NULL, + NULL, + NULL, + Library_corlib_native_System_Reflection_FieldInfo::SetValue___VOID__OBJECT__OBJECT, + NULL, + Library_corlib_native_System_Reflection_FieldInfo::GetCustomAttributesNative___SZARRAY_OBJECT__BOOLEAN, + NULL, + Library_corlib_native_System_Type::get_DeclaringType___SystemType, + NULL, + NULL, + NULL, + NULL, + Library_corlib_native_System_Type::GetMethod___SystemReflectionMethodInfo__STRING__SystemReflectionBindingFlags, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + Library_corlib_native_System_Type::IsInstanceOfType___BOOLEAN__OBJECT, + NULL, + Library_corlib_native_System_Type::InvokeMember___OBJECT__STRING__SystemReflectionBindingFlags__SystemReflectionBinder__OBJECT__SZARRAY_OBJECT, + Library_corlib_native_System_Type::GetConstructor___SystemReflectionConstructorInfo__SZARRAY_SystemType, + Library_corlib_native_System_Type::GetMethod___SystemReflectionMethodInfo__STRING__SZARRAY_SystemType, + Library_corlib_native_System_Type::GetMethod___SystemReflectionMethodInfo__STRING, + NULL, + NULL, + NULL, + Library_corlib_native_System_Type::get_IsNotPublic___BOOLEAN, + Library_corlib_native_System_Type::get_IsPublic___BOOLEAN, + Library_corlib_native_System_Type::get_IsClass___BOOLEAN, + Library_corlib_native_System_Type::get_IsInterface___BOOLEAN, + Library_corlib_native_System_Type::get_IsValueType___BOOLEAN, + Library_corlib_native_System_Type::get_IsAbstract___BOOLEAN, + Library_corlib_native_System_Type::get_IsEnum___BOOLEAN, + Library_corlib_native_System_Type::get_IsSerializable___BOOLEAN, + Library_corlib_native_System_Type::get_IsArray___BOOLEAN, + NULL, + NULL, + Library_corlib_native_System_Type::GetTypeInternal___STATIC__SystemType__STRING__STRING__BOOLEAN__SZARRAY_I4, + Library_corlib_native_System_Type::GetTypeFromHandle___STATIC__SystemType__SystemRuntimeTypeHandle, + NULL, NULL, Library_corlib_native_System_Object::Equals___BOOLEAN__OBJECT, Library_corlib_native_System_Object::GetHashCode___I4, @@ -17,22 +87,74 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, Library_corlib_native_System_Object::ReferenceEquals___STATIC__BOOLEAN__OBJECT__OBJECT, NULL, - Library_corlib_native_System_ValueType::Equals___BOOLEAN__OBJECT, NULL, NULL, NULL, NULL, - Library_corlib_native_System_Exception::get_StackTrace___STRING, NULL, NULL, + Library_corlib_native_System_String::CompareTo___I4__OBJECT, + NULL, + Library_corlib_native_System_String::get_Chars___CHAR__I4, + NULL, + Library_corlib_native_System_String::ToCharArray___SZARRAY_CHAR, + Library_corlib_native_System_String::ToCharArray___SZARRAY_CHAR__I4__I4, + Library_corlib_native_System_String::get_Length___I4, + Library_corlib_native_System_String::Split___SZARRAY_STRING__SZARRAY_CHAR, + Library_corlib_native_System_String::Split___SZARRAY_STRING__SZARRAY_CHAR__I4, + Library_corlib_native_System_String::Substring___STRING__I4, + Library_corlib_native_System_String::Substring___STRING__I4__I4, + Library_corlib_native_System_String::Trim___STRING__SZARRAY_CHAR, + Library_corlib_native_System_String::TrimStart___STRING__SZARRAY_CHAR, + Library_corlib_native_System_String::TrimEnd___STRING__SZARRAY_CHAR, + Library_corlib_native_System_String::_ctor___VOID__SZARRAY_CHAR__I4__I4, + Library_corlib_native_System_String::_ctor___VOID__SZARRAY_CHAR, + Library_corlib_native_System_String::_ctor___VOID__CHAR__I4, + Library_corlib_native_System_String::CompareTo___I4__STRING, + Library_corlib_native_System_String::IndexOf___I4__CHAR, + Library_corlib_native_System_String::IndexOf___I4__CHAR__I4, + Library_corlib_native_System_String::IndexOf___I4__CHAR__I4__I4, + Library_corlib_native_System_String::IndexOfAny___I4__SZARRAY_CHAR, + Library_corlib_native_System_String::IndexOfAny___I4__SZARRAY_CHAR__I4, + Library_corlib_native_System_String::IndexOfAny___I4__SZARRAY_CHAR__I4__I4, + Library_corlib_native_System_String::IndexOf___I4__STRING, + Library_corlib_native_System_String::IndexOf___I4__STRING__I4, + Library_corlib_native_System_String::IndexOf___I4__STRING__I4__I4, + Library_corlib_native_System_String::LastIndexOf___I4__CHAR, + Library_corlib_native_System_String::LastIndexOf___I4__CHAR__I4, + Library_corlib_native_System_String::LastIndexOf___I4__CHAR__I4__I4, + Library_corlib_native_System_String::LastIndexOfAny___I4__SZARRAY_CHAR, + Library_corlib_native_System_String::LastIndexOfAny___I4__SZARRAY_CHAR__I4, + Library_corlib_native_System_String::LastIndexOfAny___I4__SZARRAY_CHAR__I4__I4, + Library_corlib_native_System_String::LastIndexOf___I4__STRING, + Library_corlib_native_System_String::LastIndexOf___I4__STRING__I4, + Library_corlib_native_System_String::LastIndexOf___I4__STRING__I4__I4, + Library_corlib_native_System_String::ToLower___STRING, + Library_corlib_native_System_String::ToUpper___STRING, + Library_corlib_native_System_String::Trim___STRING, + NULL, + NULL, + Library_corlib_native_System_String::Equals___STATIC__BOOLEAN__STRING__STRING, + Library_corlib_native_System_String::op_Equality___STATIC__BOOLEAN__STRING__STRING, + Library_corlib_native_System_String::op_Inequality___STATIC__BOOLEAN__STRING__STRING, + Library_corlib_native_System_String::Compare___STATIC__I4__STRING__STRING, + NULL, NULL, NULL, NULL, + Library_corlib_native_System_String::Concat___STATIC__STRING__STRING__STRING, + Library_corlib_native_System_String::Concat___STATIC__STRING__STRING__STRING__STRING, + Library_corlib_native_System_String::Concat___STATIC__STRING__STRING__STRING__STRING__STRING, + Library_corlib_native_System_String::Concat___STATIC__STRING__SZARRAY_STRING, NULL, NULL, NULL, NULL, NULL, + Library_corlib_native_System_Exception::get_StackTrace___STRING, + NULL, + NULL, + NULL, NULL, NULL, NULL, @@ -103,19 +225,15 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, Library_corlib_native_System_Array::TrySzIndexOf___STATIC__BOOLEAN__SystemArray__I4__I4__OBJECT__BYREF_I4, - Library_corlib_native_System_Delegate::Equals___BOOLEAN__OBJECT, - Library_corlib_native_System_Delegate::GetInvocationList___SZARRAY_SystemDelegate, - Library_corlib_native_System_Delegate::get_Method___SystemReflectionMethodInfo, - Library_corlib_native_System_Delegate::get_Target___OBJECT, NULL, - Library_corlib_native_System_Delegate::Combine___STATIC__SystemDelegate__SystemDelegate__SystemDelegate, - Library_corlib_native_System_Delegate::Remove___STATIC__SystemDelegate__SystemDelegate__SystemDelegate, - Library_corlib_native_System_Delegate::op_Equality___STATIC__BOOLEAN__SystemDelegate__SystemDelegate, - Library_corlib_native_System_Delegate::op_Inequality___STATIC__BOOLEAN__SystemDelegate__SystemDelegate, NULL, NULL, - Library_corlib_native_System_MulticastDelegate::op_Equality___STATIC__BOOLEAN__SystemMulticastDelegate__SystemMulticastDelegate, - Library_corlib_native_System_MulticastDelegate::op_Inequality___STATIC__BOOLEAN__SystemMulticastDelegate__SystemMulticastDelegate, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, NULL, NULL, NULL, @@ -156,11 +274,6 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - NULL, - NULL, - NULL, - NULL, - NULL, Library_corlib_native_System_Collections_ArrayList::get_Item___OBJECT__I4, Library_corlib_native_System_Collections_ArrayList::set_Item___VOID__I4__OBJECT, Library_corlib_native_System_Collections_ArrayList::Add___I4__OBJECT, @@ -183,11 +296,20 @@ static const CLR_RT_MethodHandler method_lookup[] = Library_corlib_native_System_Collections_ArrayList::SetCapacity___VOID__I4, NULL, NULL, + Library_corlib_native_System_Console::OutNative___STATIC__VOID__STRING__BOOLEAN, NULL, NULL, NULL, NULL, - Library_corlib_native_System_Console::OutNative___STATIC__VOID__STRING__BOOLEAN, + NULL, + NULL, + NULL, + NULL, + Library_corlib_native_System_Double::CompareTo___STATIC__I4__R8__R8, + Library_corlib_native_System_Double::IsInfinity___STATIC__BOOLEAN__R8, + Library_corlib_native_System_Double::IsNaN___STATIC__BOOLEAN__R8, + Library_corlib_native_System_Double::IsNegativeInfinity___STATIC__BOOLEAN__R8, + Library_corlib_native_System_Double::IsPositiveInfinity___STATIC__BOOLEAN__R8, NULL, NULL, Library_corlib_native_System_Convert::NativeToInt64___STATIC__I8__STRING__BOOLEAN__I8__I8__I4, @@ -218,9 +340,6 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_DateTime::_ctor___VOID__I4__I4__I4__I4__I4__I4__I4, - NULL, - NULL, NULL, NULL, NULL, @@ -229,29 +348,20 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_DateTime::get_Day___I4, - Library_corlib_native_System_DateTime::get_DayOfWeek___SystemDayOfWeek, - Library_corlib_native_System_DateTime::get_DayOfYear___I4, - Library_corlib_native_System_DateTime::get_Hour___I4, - NULL, - Library_corlib_native_System_DateTime::get_Millisecond___I4, - Library_corlib_native_System_DateTime::get_Minute___I4, - Library_corlib_native_System_DateTime::get_Month___I4, - Library_corlib_native_System_DateTime::get_Second___I4, NULL, NULL, - Library_corlib_native_System_DateTime::get_Year___I4, NULL, NULL, NULL, NULL, NULL, - Library_corlib_native_System_DateTime::DaysInMonth___STATIC__I4__I4__I4, - NULL, - Library_corlib_native_System_DateTime::get_UtcNow___STATIC__SystemDateTime, - Library_corlib_native_System_DateTime::get_Today___STATIC__SystemDateTime, + Library_corlib_native_System_TimeSpan::Equals___BOOLEAN__OBJECT, + Library_corlib_native_System_TimeSpan::ToString___STRING, NULL, NULL, + Library_corlib_native_System_TimeSpan::_ctor___VOID__I4__I4__I4, + Library_corlib_native_System_TimeSpan::_ctor___VOID__I4__I4__I4__I4, + Library_corlib_native_System_TimeSpan::_ctor___VOID__I4__I4__I4__I4__I4, NULL, NULL, NULL, @@ -261,24 +371,17 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_Diagnostics_Debugger::get_IsAttached___STATIC__BOOLEAN, - Library_corlib_native_System_Diagnostics_Debugger::Break___STATIC__VOID, NULL, NULL, NULL, + Library_corlib_native_System_TimeSpan::CompareTo___I4__OBJECT, NULL, NULL, - Library_corlib_native_System_Double::CompareTo___STATIC__I4__R8__R8, - Library_corlib_native_System_Double::IsInfinity___STATIC__BOOLEAN__R8, - Library_corlib_native_System_Double::IsNaN___STATIC__BOOLEAN__R8, - Library_corlib_native_System_Double::IsNegativeInfinity___STATIC__BOOLEAN__R8, - Library_corlib_native_System_Double::IsPositiveInfinity___STATIC__BOOLEAN__R8, NULL, + Library_corlib_native_System_TimeSpan::Compare___STATIC__I4__SystemTimeSpan__SystemTimeSpan, + Library_corlib_native_System_TimeSpan::Equals___STATIC__BOOLEAN__SystemTimeSpan__SystemTimeSpan, NULL, - Library_corlib_native_System_GC::AnyPendingFinalizers___STATIC__BOOLEAN, NULL, - Library_corlib_native_System_GC::SuppressFinalize___STATIC__VOID__OBJECT, - Library_corlib_native_System_GC::ReRegisterForFinalize___STATIC__VOID__OBJECT, NULL, NULL, NULL, @@ -286,9 +389,6 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_Globalization_CultureInfo::get_CurrentUICultureInternal___STATIC__SystemGlobalizationCultureInfo, - Library_corlib_native_System_Globalization_CultureInfo::set_CurrentUICultureInternal___STATIC__VOID__SystemGlobalizationCultureInfo, - Library_corlib_native_System_Globalization_DateTimeFormat::FormatDigits___STATIC__STRING__I4__I4, NULL, NULL, NULL, @@ -304,6 +404,7 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + Library_corlib_native_System_DateTime::_ctor___VOID__I4__I4__I4__I4__I4__I4__I4, NULL, NULL, NULL, @@ -314,15 +415,27 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + Library_corlib_native_System_DateTime::get_Day___I4, + Library_corlib_native_System_DateTime::get_DayOfWeek___SystemDayOfWeek, + Library_corlib_native_System_DateTime::get_DayOfYear___I4, + Library_corlib_native_System_DateTime::get_Hour___I4, NULL, + Library_corlib_native_System_DateTime::get_Millisecond___I4, + Library_corlib_native_System_DateTime::get_Minute___I4, + Library_corlib_native_System_DateTime::get_Month___I4, + Library_corlib_native_System_DateTime::get_Second___I4, NULL, NULL, + Library_corlib_native_System_DateTime::get_Year___I4, NULL, NULL, NULL, NULL, NULL, + Library_corlib_native_System_DateTime::DaysInMonth___STATIC__I4__I4__I4, NULL, + Library_corlib_native_System_DateTime::get_UtcNow___STATIC__SystemDateTime, + Library_corlib_native_System_DateTime::get_Today___STATIC__SystemDateTime, NULL, NULL, NULL, @@ -334,24 +447,45 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + Library_corlib_native_System_Delegate::Equals___BOOLEAN__OBJECT, + Library_corlib_native_System_Delegate::GetInvocationList___SZARRAY_SystemDelegate, + Library_corlib_native_System_Delegate::get_Method___SystemReflectionMethodInfo, + Library_corlib_native_System_Delegate::get_Target___OBJECT, NULL, - Library_corlib_native_System_Guid::GenerateNewGuid___STATIC__SZARRAY_U1, + Library_corlib_native_System_Delegate::Combine___STATIC__SystemDelegate__SystemDelegate__SystemDelegate, + Library_corlib_native_System_Delegate::Remove___STATIC__SystemDelegate__SystemDelegate__SystemDelegate, + Library_corlib_native_System_Delegate::op_Equality___STATIC__BOOLEAN__SystemDelegate__SystemDelegate, + Library_corlib_native_System_Delegate::op_Inequality___STATIC__BOOLEAN__SystemDelegate__SystemDelegate, + Library_corlib_native_System_Diagnostics_Debugger::get_IsAttached___STATIC__BOOLEAN, + Library_corlib_native_System_Diagnostics_Debugger::Break___STATIC__VOID, NULL, NULL, NULL, NULL, NULL, + Library_corlib_native_System_Reflection_Assembly::get_FullName___STRING, + Library_corlib_native_System_Reflection_Assembly::GetType___SystemType__STRING, NULL, + Library_corlib_native_System_Reflection_Assembly::GetTypes___SZARRAY_SystemType, + Library_corlib_native_System_Reflection_Assembly::GetVersion___VOID__BYREF_I4__BYREF_I4__BYREF_I4__BYREF_I4, NULL, NULL, + Library_corlib_native_System_Reflection_Assembly::GetManifestResourceNames___SZARRAY_STRING, NULL, + Library_corlib_native_System_Reflection_Assembly::GetExecutingAssembly___STATIC__SystemReflectionAssembly, NULL, NULL, NULL, NULL, + Library_corlib_native_System_Reflection_Assembly::LoadInternal___STATIC__SystemReflectionAssembly__STRING__BOOLEAN__I4__I4__I4__I4, + Library_corlib_native_System_Reflection_Assembly::Load___STATIC__SystemReflectionAssembly__SZARRAY_U1, NULL, NULL, + Library_corlib_native_System_GC::AnyPendingFinalizers___STATIC__BOOLEAN, NULL, + Library_corlib_native_System_GC::SuppressFinalize___STATIC__VOID__OBJECT, + Library_corlib_native_System_GC::ReRegisterForFinalize___STATIC__VOID__OBJECT, + Library_corlib_native_System_Globalization_DateTimeFormat::FormatDigits___STATIC__STRING__I4__I4, NULL, NULL, NULL, @@ -375,6 +509,7 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + Library_corlib_native_System_Guid::GenerateNewGuid___STATIC__SZARRAY_U1, NULL, NULL, NULL, @@ -387,9 +522,6 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_MathInternal::Abs___STATIC__I4__I4, - Library_corlib_native_System_MathInternal::Min___STATIC__I4__I4__I4, - Library_corlib_native_System_MathInternal::Max___STATIC__I4__I4__I4, NULL, NULL, NULL, @@ -400,7 +532,6 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_Number::FormatNative___STATIC__STRING__OBJECT__CHAR__I4, NULL, NULL, NULL, @@ -415,56 +546,36 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_Random::Next___I4, - Library_corlib_native_System_Random::Next___I4__I4, - Library_corlib_native_System_Random::NextDouble___R8, - Library_corlib_native_System_Random::NextBytes___VOID__SZARRAY_U1, - Library_corlib_native_System_Random::_ctor___VOID, - Library_corlib_native_System_Random::_ctor___VOID__I4, - Library_corlib_native_System_Reflection_Assembly::get_FullName___STRING, - Library_corlib_native_System_Reflection_Assembly::GetType___SystemType__STRING, NULL, - Library_corlib_native_System_Reflection_Assembly::GetTypes___SZARRAY_SystemType, - Library_corlib_native_System_Reflection_Assembly::GetVersion___VOID__BYREF_I4__BYREF_I4__BYREF_I4__BYREF_I4, NULL, NULL, - Library_corlib_native_System_Reflection_Assembly::GetManifestResourceNames___SZARRAY_STRING, NULL, - Library_corlib_native_System_Reflection_Assembly::GetExecutingAssembly___STATIC__SystemReflectionAssembly, NULL, NULL, NULL, NULL, - Library_corlib_native_System_Reflection_Assembly::LoadInternal___STATIC__SystemReflectionAssembly__STRING__BOOLEAN__I4__I4__I4__I4, - Library_corlib_native_System_Reflection_Assembly::Load___STATIC__SystemReflectionAssembly__SZARRAY_U1, NULL, NULL, + Library_corlib_native_System_MathInternal::Abs___STATIC__I4__I4, + Library_corlib_native_System_MathInternal::Min___STATIC__I4__I4__I4, + Library_corlib_native_System_MathInternal::Max___STATIC__I4__I4__I4, NULL, NULL, + Library_corlib_native_System_MulticastDelegate::op_Equality___STATIC__BOOLEAN__SystemMulticastDelegate__SystemMulticastDelegate, + Library_corlib_native_System_MulticastDelegate::op_Inequality___STATIC__BOOLEAN__SystemMulticastDelegate__SystemMulticastDelegate, NULL, NULL, NULL, NULL, NULL, NULL, - Library_corlib_native_System_Reflection_MethodBase::get_Name___STRING, - Library_corlib_native_System_Reflection_MethodBase::get_DeclaringType___SystemType, - Library_corlib_native_System_Reflection_MethodBase::get_IsPublic___BOOLEAN, - Library_corlib_native_System_Reflection_MethodBase::get_IsStatic___BOOLEAN, - Library_corlib_native_System_Reflection_MethodBase::get_IsFinal___BOOLEAN, - Library_corlib_native_System_Reflection_MethodBase::get_IsVirtual___BOOLEAN, - Library_corlib_native_System_Reflection_MethodBase::get_IsAbstract___BOOLEAN, - Library_corlib_native_System_Reflection_MethodBase::Invoke___OBJECT__OBJECT__SZARRAY_OBJECT, NULL, NULL, - Library_corlib_native_System_Reflection_ConstructorInfo::GetCustomAttributes___SZARRAY_OBJECT__BOOLEAN, - Library_corlib_native_System_Reflection_ConstructorInfo::Invoke___OBJECT__SZARRAY_OBJECT, NULL, NULL, + Library_corlib_native_System_Number::FormatNative___STATIC__STRING__OBJECT__CHAR__I4, NULL, NULL, - Library_corlib_native_System_Reflection_FieldInfo::SetValue___VOID__OBJECT__OBJECT, - Library_corlib_native_System_Reflection_FieldInfo::GetCustomAttributes___SZARRAY_OBJECT__BOOLEAN, NULL, NULL, NULL, @@ -472,64 +583,60 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_Reflection_PropertyInfo::GetValue___OBJECT__OBJECT__SZARRAY_OBJECT, - Library_corlib_native_System_Reflection_PropertyInfo::SetValue___VOID__OBJECT__OBJECT__SZARRAY_OBJECT, NULL, NULL, - Library_corlib_native_System_Reflection_RuntimeFieldInfo::get_Name___STRING, - Library_corlib_native_System_Reflection_RuntimeFieldInfo::get_DeclaringType___SystemType, - Library_corlib_native_System_Reflection_RuntimeFieldInfo::get_FieldType___SystemType, - Library_corlib_native_System_Reflection_RuntimeFieldInfo::GetValue___OBJECT__OBJECT, NULL, - Library_corlib_native_System_Reflection_RuntimeMethodInfo::get_ReturnType___SystemType, - Library_corlib_native_System_Reflection_RuntimeMethodInfo::GetCustomAttributes___SZARRAY_OBJECT__BOOLEAN, NULL, NULL, + Library_corlib_native_System_Random::Next___I4, + Library_corlib_native_System_Random::Next___I4__I4, + Library_corlib_native_System_Random::NextDouble___R8, + Library_corlib_native_System_Random::NextBytes___VOID__SZARRAY_U1, + Library_corlib_native_System_Random::_ctor___VOID, + Library_corlib_native_System_Random::_ctor___VOID__I4, NULL, NULL, - Library_corlib_native_System_Runtime_CompilerServices_RuntimeHelpers::InitializeArray___STATIC__VOID__SystemArray__SystemRuntimeFieldHandle, - Library_corlib_native_System_Runtime_CompilerServices_RuntimeHelpers::GetObjectValue___STATIC__OBJECT__OBJECT, - Library_corlib_native_System_Runtime_CompilerServices_RuntimeHelpers::RunClassConstructor___STATIC__VOID__SystemRuntimeTypeHandle, - Library_corlib_native_System_Runtime_CompilerServices_RuntimeHelpers::get_OffsetToStringData___STATIC__I4, - Library_corlib_native_System_Runtime_Remoting_RemotingServices::IsTransparentProxy___STATIC__BOOLEAN__OBJECT, NULL, NULL, NULL, NULL, - Library_corlib_native_System_Type::get_DeclaringType___SystemType, NULL, NULL, NULL, NULL, - Library_corlib_native_System_Type::GetMethod___SystemReflectionMethodInfo__STRING__SystemReflectionBindingFlags, + Library_corlib_native_System_Reflection_MethodBase::get_Name___STRING, + Library_corlib_native_System_Reflection_MethodBase::get_DeclaringType___SystemType, + Library_corlib_native_System_Reflection_MethodBase::get_IsPublic___BOOLEAN, + Library_corlib_native_System_Reflection_MethodBase::get_IsStatic___BOOLEAN, + Library_corlib_native_System_Reflection_MethodBase::get_IsFinal___BOOLEAN, + Library_corlib_native_System_Reflection_MethodBase::get_IsVirtual___BOOLEAN, + Library_corlib_native_System_Reflection_MethodBase::get_IsAbstract___BOOLEAN, + Library_corlib_native_System_Reflection_MethodBase::Invoke___OBJECT__OBJECT__SZARRAY_OBJECT, NULL, NULL, + Library_corlib_native_System_Reflection_PropertyInfo::GetValue___OBJECT__OBJECT__SZARRAY_OBJECT, + Library_corlib_native_System_Reflection_PropertyInfo::SetValue___VOID__OBJECT__OBJECT__SZARRAY_OBJECT, NULL, NULL, + Library_corlib_native_System_Reflection_RuntimeFieldInfo::get_Name___STRING, + Library_corlib_native_System_Reflection_RuntimeFieldInfo::get_DeclaringType___SystemType, + Library_corlib_native_System_Reflection_RuntimeFieldInfo::get_FieldType___SystemType, + Library_corlib_native_System_Reflection_RuntimeFieldInfo::GetValue___OBJECT__OBJECT, NULL, + Library_corlib_native_System_Reflection_RuntimeMethodInfo::get_ReturnType___SystemType, + Library_corlib_native_System_Reflection_RuntimeMethodInfo::GetCustomAttributes___SZARRAY_OBJECT__BOOLEAN, NULL, - Library_corlib_native_System_Type::IsInstanceOfType___BOOLEAN__OBJECT, NULL, - Library_corlib_native_System_Type::InvokeMember___OBJECT__STRING__SystemReflectionBindingFlags__SystemReflectionBinder__OBJECT__SZARRAY_OBJECT, - Library_corlib_native_System_Type::GetConstructor___SystemReflectionConstructorInfo__SZARRAY_SystemType, - Library_corlib_native_System_Type::GetMethod___SystemReflectionMethodInfo__STRING__SZARRAY_SystemType, - Library_corlib_native_System_Type::GetMethod___SystemReflectionMethodInfo__STRING, NULL, NULL, + Library_corlib_native_System_Runtime_CompilerServices_RuntimeHelpers::InitializeArray___STATIC__VOID__SystemArray__SystemRuntimeFieldHandle, + Library_corlib_native_System_Runtime_CompilerServices_RuntimeHelpers::GetObjectValue___STATIC__OBJECT__OBJECT, + Library_corlib_native_System_Runtime_CompilerServices_RuntimeHelpers::RunClassConstructor___STATIC__VOID__SystemRuntimeTypeHandle, + Library_corlib_native_System_Runtime_CompilerServices_RuntimeHelpers::get_OffsetToStringData___STATIC__I4, + Library_corlib_native_System_Runtime_Remoting_RemotingServices::IsTransparentProxy___STATIC__BOOLEAN__OBJECT, NULL, - Library_corlib_native_System_Type::get_IsNotPublic___BOOLEAN, - Library_corlib_native_System_Type::get_IsPublic___BOOLEAN, - Library_corlib_native_System_Type::get_IsClass___BOOLEAN, - Library_corlib_native_System_Type::get_IsInterface___BOOLEAN, - Library_corlib_native_System_Type::get_IsValueType___BOOLEAN, - Library_corlib_native_System_Type::get_IsAbstract___BOOLEAN, - Library_corlib_native_System_Type::get_IsEnum___BOOLEAN, - Library_corlib_native_System_Type::get_IsSerializable___BOOLEAN, - Library_corlib_native_System_Type::get_IsArray___BOOLEAN, NULL, NULL, - Library_corlib_native_System_Type::GetTypeInternal___STATIC__SystemType__STRING__STRING__BOOLEAN__SZARRAY_I4, - Library_corlib_native_System_Type::GetTypeFromHandle___STATIC__SystemType__SystemRuntimeTypeHandle, NULL, NULL, Library_corlib_native_System_RuntimeType::get_Assembly___SystemReflectionAssembly, @@ -557,69 +664,6 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_String::CompareTo___I4__OBJECT, - NULL, - Library_corlib_native_System_String::get_Chars___CHAR__I4, - NULL, - Library_corlib_native_System_String::ToCharArray___SZARRAY_CHAR, - Library_corlib_native_System_String::ToCharArray___SZARRAY_CHAR__I4__I4, - Library_corlib_native_System_String::get_Length___I4, - Library_corlib_native_System_String::Split___SZARRAY_STRING__SZARRAY_CHAR, - Library_corlib_native_System_String::Split___SZARRAY_STRING__SZARRAY_CHAR__I4, - Library_corlib_native_System_String::Substring___STRING__I4, - Library_corlib_native_System_String::Substring___STRING__I4__I4, - Library_corlib_native_System_String::Trim___STRING__SZARRAY_CHAR, - Library_corlib_native_System_String::TrimStart___STRING__SZARRAY_CHAR, - Library_corlib_native_System_String::TrimEnd___STRING__SZARRAY_CHAR, - Library_corlib_native_System_String::_ctor___VOID__SZARRAY_CHAR__I4__I4, - Library_corlib_native_System_String::_ctor___VOID__SZARRAY_CHAR, - Library_corlib_native_System_String::_ctor___VOID__CHAR__I4, - Library_corlib_native_System_String::CompareTo___I4__STRING, - Library_corlib_native_System_String::IndexOf___I4__CHAR, - Library_corlib_native_System_String::IndexOf___I4__CHAR__I4, - Library_corlib_native_System_String::IndexOf___I4__CHAR__I4__I4, - Library_corlib_native_System_String::IndexOfAny___I4__SZARRAY_CHAR, - Library_corlib_native_System_String::IndexOfAny___I4__SZARRAY_CHAR__I4, - Library_corlib_native_System_String::IndexOfAny___I4__SZARRAY_CHAR__I4__I4, - Library_corlib_native_System_String::IndexOf___I4__STRING, - Library_corlib_native_System_String::IndexOf___I4__STRING__I4, - Library_corlib_native_System_String::IndexOf___I4__STRING__I4__I4, - Library_corlib_native_System_String::LastIndexOf___I4__CHAR, - Library_corlib_native_System_String::LastIndexOf___I4__CHAR__I4, - Library_corlib_native_System_String::LastIndexOf___I4__CHAR__I4__I4, - Library_corlib_native_System_String::LastIndexOfAny___I4__SZARRAY_CHAR, - Library_corlib_native_System_String::LastIndexOfAny___I4__SZARRAY_CHAR__I4, - Library_corlib_native_System_String::LastIndexOfAny___I4__SZARRAY_CHAR__I4__I4, - Library_corlib_native_System_String::LastIndexOf___I4__STRING, - Library_corlib_native_System_String::LastIndexOf___I4__STRING__I4, - Library_corlib_native_System_String::LastIndexOf___I4__STRING__I4__I4, - Library_corlib_native_System_String::ToLower___STRING, - Library_corlib_native_System_String::ToUpper___STRING, - Library_corlib_native_System_String::Trim___STRING, - NULL, - NULL, - Library_corlib_native_System_String::Equals___STATIC__BOOLEAN__STRING__STRING, - Library_corlib_native_System_String::op_Equality___STATIC__BOOLEAN__STRING__STRING, - Library_corlib_native_System_String::op_Inequality___STATIC__BOOLEAN__STRING__STRING, - Library_corlib_native_System_String::Compare___STATIC__I4__STRING__STRING, - NULL, - NULL, - NULL, - NULL, - Library_corlib_native_System_String::Concat___STATIC__STRING__STRING__STRING, - Library_corlib_native_System_String::Concat___STATIC__STRING__STRING__STRING__STRING, - Library_corlib_native_System_String::Concat___STATIC__STRING__STRING__STRING__STRING__STRING, - Library_corlib_native_System_String::Concat___STATIC__STRING__SZARRAY_STRING, - NULL, - NULL, - NULL, - NULL, - Library_corlib_native_System_Threading_WaitHandle::WaitOne___BOOLEAN__I4__BOOLEAN, - NULL, - NULL, - Library_corlib_native_System_Threading_WaitHandle::WaitMultiple___STATIC__I4__SZARRAY_SystemThreadingWaitHandle__I4__BOOLEAN__BOOLEAN, - NULL, - NULL, NULL, NULL, Library_corlib_native_System_Threading_AutoResetEvent::_ctor___VOID__BOOLEAN, @@ -665,31 +709,20 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_TimeSpan::Equals___BOOLEAN__OBJECT, - Library_corlib_native_System_TimeSpan::ToString___STRING, - NULL, - NULL, - Library_corlib_native_System_TimeSpan::_ctor___VOID__I4__I4__I4, - Library_corlib_native_System_TimeSpan::_ctor___VOID__I4__I4__I4__I4, - Library_corlib_native_System_TimeSpan::_ctor___VOID__I4__I4__I4__I4__I4, - NULL, - NULL, - NULL, - NULL, + Library_corlib_native_System_Threading_WaitHandle::WaitOne___BOOLEAN__I4__BOOLEAN, NULL, NULL, + Library_corlib_native_System_Threading_WaitHandle::WaitMultiple___STATIC__I4__SZARRAY_SystemThreadingWaitHandle__I4__BOOLEAN__BOOLEAN, NULL, NULL, NULL, NULL, NULL, NULL, - Library_corlib_native_System_TimeSpan::CompareTo___I4__OBJECT, NULL, + Library_corlib_native_System_ValueType::Equals___BOOLEAN__OBJECT, NULL, NULL, - Library_corlib_native_System_TimeSpan::Compare___STATIC__I4__SystemTimeSpan__SystemTimeSpan, - Library_corlib_native_System_TimeSpan::Equals___STATIC__BOOLEAN__SystemTimeSpan__SystemTimeSpan, NULL, NULL, NULL, @@ -698,6 +731,16 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + Library_corlib_native_System_WeakReference::get_IsAlive___BOOLEAN, + Library_corlib_native_System_WeakReference::get_Target___OBJECT, + Library_corlib_native_System_WeakReference::set_Target___VOID__OBJECT, + Library_corlib_native_System_WeakReference::_ctor___VOID__OBJECT, +}; + +#elif (NANOCLR_REFLECTION == FALSE) + +static const CLR_RT_MethodHandler method_lookup[] = +{ NULL, NULL, NULL, @@ -708,6 +751,8 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + Library_corlib_native_System_Globalization_CultureInfo::get_CurrentUICultureInternal___STATIC__SystemGlobalizationCultureInfo, + Library_corlib_native_System_Globalization_CultureInfo::set_CurrentUICultureInternal___STATIC__VOID__SystemGlobalizationCultureInfo, NULL, NULL, NULL, @@ -716,8 +761,12 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + Library_corlib_native_System_Object::Equals___BOOLEAN__OBJECT, + Library_corlib_native_System_Object::GetHashCode___I4, NULL, + Library_corlib_native_System_Object::MemberwiseClone___OBJECT, NULL, + Library_corlib_native_System_Object::ReferenceEquals___STATIC__BOOLEAN__OBJECT__OBJECT, NULL, NULL, NULL, @@ -725,30 +774,60 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_WeakReference::get_IsAlive___BOOLEAN, - Library_corlib_native_System_WeakReference::get_Target___OBJECT, - Library_corlib_native_System_WeakReference::set_Target___VOID__OBJECT, - Library_corlib_native_System_WeakReference::_ctor___VOID__OBJECT, + Library_corlib_native_System_String::CompareTo___I4__OBJECT, NULL, + Library_corlib_native_System_String::get_Chars___CHAR__I4, NULL, + Library_corlib_native_System_String::ToCharArray___SZARRAY_CHAR, + Library_corlib_native_System_String::ToCharArray___SZARRAY_CHAR__I4__I4, + Library_corlib_native_System_String::get_Length___I4, + Library_corlib_native_System_String::Split___SZARRAY_STRING__SZARRAY_CHAR, + Library_corlib_native_System_String::Split___SZARRAY_STRING__SZARRAY_CHAR__I4, + Library_corlib_native_System_String::Substring___STRING__I4, + Library_corlib_native_System_String::Substring___STRING__I4__I4, + Library_corlib_native_System_String::Trim___STRING__SZARRAY_CHAR, + Library_corlib_native_System_String::TrimStart___STRING__SZARRAY_CHAR, + Library_corlib_native_System_String::TrimEnd___STRING__SZARRAY_CHAR, + Library_corlib_native_System_String::_ctor___VOID__SZARRAY_CHAR__I4__I4, + Library_corlib_native_System_String::_ctor___VOID__SZARRAY_CHAR, + Library_corlib_native_System_String::_ctor___VOID__CHAR__I4, + Library_corlib_native_System_String::CompareTo___I4__STRING, + Library_corlib_native_System_String::IndexOf___I4__CHAR, + Library_corlib_native_System_String::IndexOf___I4__CHAR__I4, + Library_corlib_native_System_String::IndexOf___I4__CHAR__I4__I4, + Library_corlib_native_System_String::IndexOfAny___I4__SZARRAY_CHAR, + Library_corlib_native_System_String::IndexOfAny___I4__SZARRAY_CHAR__I4, + Library_corlib_native_System_String::IndexOfAny___I4__SZARRAY_CHAR__I4__I4, + Library_corlib_native_System_String::IndexOf___I4__STRING, + Library_corlib_native_System_String::IndexOf___I4__STRING__I4, + Library_corlib_native_System_String::IndexOf___I4__STRING__I4__I4, + Library_corlib_native_System_String::LastIndexOf___I4__CHAR, + Library_corlib_native_System_String::LastIndexOf___I4__CHAR__I4, + Library_corlib_native_System_String::LastIndexOf___I4__CHAR__I4__I4, + Library_corlib_native_System_String::LastIndexOfAny___I4__SZARRAY_CHAR, + Library_corlib_native_System_String::LastIndexOfAny___I4__SZARRAY_CHAR__I4, + Library_corlib_native_System_String::LastIndexOfAny___I4__SZARRAY_CHAR__I4__I4, + Library_corlib_native_System_String::LastIndexOf___I4__STRING, + Library_corlib_native_System_String::LastIndexOf___I4__STRING__I4, + Library_corlib_native_System_String::LastIndexOf___I4__STRING__I4__I4, + Library_corlib_native_System_String::ToLower___STRING, + Library_corlib_native_System_String::ToUpper___STRING, + Library_corlib_native_System_String::Trim___STRING, NULL, NULL, + Library_corlib_native_System_String::Equals___STATIC__BOOLEAN__STRING__STRING, + Library_corlib_native_System_String::op_Equality___STATIC__BOOLEAN__STRING__STRING, + Library_corlib_native_System_String::op_Inequality___STATIC__BOOLEAN__STRING__STRING, + Library_corlib_native_System_String::Compare___STATIC__I4__STRING__STRING, NULL, -}; - -#elif (NANOCLR_REFLECTION == FALSE) - -static const CLR_RT_MethodHandler method_lookup[] = -{ NULL, - Library_corlib_native_System_Object::Equals___BOOLEAN__OBJECT, - Library_corlib_native_System_Object::GetHashCode___I4, NULL, - Library_corlib_native_System_Object::MemberwiseClone___OBJECT, NULL, - Library_corlib_native_System_Object::ReferenceEquals___STATIC__BOOLEAN__OBJECT__OBJECT, + Library_corlib_native_System_String::Concat___STATIC__STRING__STRING__STRING, + Library_corlib_native_System_String::Concat___STATIC__STRING__STRING__STRING__STRING, + Library_corlib_native_System_String::Concat___STATIC__STRING__STRING__STRING__STRING__STRING, + Library_corlib_native_System_String::Concat___STATIC__STRING__SZARRAY_STRING, NULL, - Library_corlib_native_System_ValueType::Equals___BOOLEAN__OBJECT, NULL, NULL, NULL, @@ -800,13 +879,6 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, Library_corlib_native_System_Array::System_Collections_IList_get_Item___OBJECT__I4, Library_corlib_native_System_Array::System_Collections_IList_set_Item___VOID__I4__OBJECT, NULL, @@ -831,16 +903,15 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, Library_corlib_native_System_Array::TrySzIndexOf___STATIC__BOOLEAN__SystemArray__I4__I4__OBJECT__BYREF_I4, - Library_corlib_native_System_Delegate::Equals___BOOLEAN__OBJECT, NULL, - Library_corlib_native_System_Delegate::Combine___STATIC__SystemDelegate__SystemDelegate__SystemDelegate, - Library_corlib_native_System_Delegate::Remove___STATIC__SystemDelegate__SystemDelegate__SystemDelegate, - Library_corlib_native_System_Delegate::op_Equality___STATIC__BOOLEAN__SystemDelegate__SystemDelegate, - Library_corlib_native_System_Delegate::op_Inequality___STATIC__BOOLEAN__SystemDelegate__SystemDelegate, NULL, NULL, - Library_corlib_native_System_MulticastDelegate::op_Equality___STATIC__BOOLEAN__SystemMulticastDelegate__SystemMulticastDelegate, - Library_corlib_native_System_MulticastDelegate::op_Inequality___STATIC__BOOLEAN__SystemMulticastDelegate__SystemMulticastDelegate, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, NULL, NULL, NULL, @@ -882,11 +953,6 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - NULL, - NULL, - NULL, - NULL, - NULL, Library_corlib_native_System_Collections_ArrayList::get_Item___OBJECT__I4, Library_corlib_native_System_Collections_ArrayList::set_Item___VOID__I4__OBJECT, Library_corlib_native_System_Collections_ArrayList::Add___I4__OBJECT, @@ -907,11 +973,20 @@ static const CLR_RT_MethodHandler method_lookup[] = Library_corlib_native_System_Collections_ArrayList::SetCapacity___VOID__I4, NULL, NULL, + Library_corlib_native_System_Console::OutNative___STATIC__VOID__STRING__BOOLEAN, + NULL, NULL, NULL, NULL, NULL, - Library_corlib_native_System_Console::OutNative___STATIC__VOID__STRING__BOOLEAN, + NULL, + NULL, + NULL, + Library_corlib_native_System_Double::CompareTo___STATIC__I4__R8__R8, + Library_corlib_native_System_Double::IsInfinity___STATIC__BOOLEAN__R8, + Library_corlib_native_System_Double::IsNaN___STATIC__BOOLEAN__R8, + Library_corlib_native_System_Double::IsNegativeInfinity___STATIC__BOOLEAN__R8, + Library_corlib_native_System_Double::IsPositiveInfinity___STATIC__BOOLEAN__R8, NULL, NULL, Library_corlib_native_System_Convert::NativeToInt64___STATIC__I8__STRING__BOOLEAN__I8__I8__I4, @@ -942,7 +1017,6 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_DateTime::_ctor___VOID__I4__I4__I4__I4__I4__I4__I4, NULL, NULL, NULL, @@ -953,27 +1027,20 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_DateTime::get_Day___I4, - Library_corlib_native_System_DateTime::get_DayOfWeek___SystemDayOfWeek, - Library_corlib_native_System_DateTime::get_DayOfYear___I4, - Library_corlib_native_System_DateTime::get_Hour___I4, NULL, - Library_corlib_native_System_DateTime::get_Millisecond___I4, - Library_corlib_native_System_DateTime::get_Minute___I4, - Library_corlib_native_System_DateTime::get_Month___I4, - Library_corlib_native_System_DateTime::get_Second___I4, NULL, NULL, - Library_corlib_native_System_DateTime::get_Year___I4, NULL, NULL, + Library_corlib_native_System_TimeSpan::Equals___BOOLEAN__OBJECT, + Library_corlib_native_System_TimeSpan::ToString___STRING, NULL, NULL, + Library_corlib_native_System_TimeSpan::_ctor___VOID__I4__I4__I4, + Library_corlib_native_System_TimeSpan::_ctor___VOID__I4__I4__I4__I4, + Library_corlib_native_System_TimeSpan::_ctor___VOID__I4__I4__I4__I4__I4, NULL, - Library_corlib_native_System_DateTime::DaysInMonth___STATIC__I4__I4__I4, NULL, - Library_corlib_native_System_DateTime::get_UtcNow___STATIC__SystemDateTime, - Library_corlib_native_System_DateTime::get_Today___STATIC__SystemDateTime, NULL, NULL, NULL, @@ -984,25 +1051,18 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + Library_corlib_native_System_TimeSpan::CompareTo___I4__OBJECT, NULL, - Library_corlib_native_System_Diagnostics_Debugger::get_IsAttached___STATIC__BOOLEAN, - Library_corlib_native_System_Diagnostics_Debugger::Break___STATIC__VOID, NULL, NULL, + Library_corlib_native_System_TimeSpan::Compare___STATIC__I4__SystemTimeSpan__SystemTimeSpan, + Library_corlib_native_System_TimeSpan::Equals___STATIC__BOOLEAN__SystemTimeSpan__SystemTimeSpan, NULL, NULL, NULL, - Library_corlib_native_System_Double::CompareTo___STATIC__I4__R8__R8, - Library_corlib_native_System_Double::IsInfinity___STATIC__BOOLEAN__R8, - Library_corlib_native_System_Double::IsNaN___STATIC__BOOLEAN__R8, - Library_corlib_native_System_Double::IsNegativeInfinity___STATIC__BOOLEAN__R8, - Library_corlib_native_System_Double::IsPositiveInfinity___STATIC__BOOLEAN__R8, NULL, NULL, - Library_corlib_native_System_GC::AnyPendingFinalizers___STATIC__BOOLEAN, NULL, - Library_corlib_native_System_GC::SuppressFinalize___STATIC__VOID__OBJECT, - Library_corlib_native_System_GC::ReRegisterForFinalize___STATIC__VOID__OBJECT, NULL, NULL, NULL, @@ -1010,9 +1070,6 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_Globalization_CultureInfo::get_CurrentUICultureInternal___STATIC__SystemGlobalizationCultureInfo, - Library_corlib_native_System_Globalization_CultureInfo::set_CurrentUICultureInternal___STATIC__VOID__SystemGlobalizationCultureInfo, - Library_corlib_native_System_Globalization_DateTimeFormat::FormatDigits___STATIC__STRING__I4__I4, NULL, NULL, NULL, @@ -1024,6 +1081,7 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + Library_corlib_native_System_DateTime::_ctor___VOID__I4__I4__I4__I4__I4__I4__I4, NULL, NULL, NULL, @@ -1034,15 +1092,27 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + Library_corlib_native_System_DateTime::get_Day___I4, + Library_corlib_native_System_DateTime::get_DayOfWeek___SystemDayOfWeek, + Library_corlib_native_System_DateTime::get_DayOfYear___I4, + Library_corlib_native_System_DateTime::get_Hour___I4, NULL, + Library_corlib_native_System_DateTime::get_Millisecond___I4, + Library_corlib_native_System_DateTime::get_Minute___I4, + Library_corlib_native_System_DateTime::get_Month___I4, + Library_corlib_native_System_DateTime::get_Second___I4, NULL, NULL, + Library_corlib_native_System_DateTime::get_Year___I4, NULL, NULL, NULL, NULL, NULL, + Library_corlib_native_System_DateTime::DaysInMonth___STATIC__I4__I4__I4, NULL, + Library_corlib_native_System_DateTime::get_UtcNow___STATIC__SystemDateTime, + Library_corlib_native_System_DateTime::get_Today___STATIC__SystemDateTime, NULL, NULL, NULL, @@ -1054,13 +1124,23 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + Library_corlib_native_System_Delegate::Equals___BOOLEAN__OBJECT, NULL, + Library_corlib_native_System_Delegate::Combine___STATIC__SystemDelegate__SystemDelegate__SystemDelegate, + Library_corlib_native_System_Delegate::Remove___STATIC__SystemDelegate__SystemDelegate__SystemDelegate, + Library_corlib_native_System_Delegate::op_Equality___STATIC__BOOLEAN__SystemDelegate__SystemDelegate, + Library_corlib_native_System_Delegate::op_Inequality___STATIC__BOOLEAN__SystemDelegate__SystemDelegate, + Library_corlib_native_System_Diagnostics_Debugger::get_IsAttached___STATIC__BOOLEAN, + Library_corlib_native_System_Diagnostics_Debugger::Break___STATIC__VOID, NULL, NULL, NULL, NULL, - Library_corlib_native_System_Guid::GenerateNewGuid___STATIC__SZARRAY_U1, + Library_corlib_native_System_GC::AnyPendingFinalizers___STATIC__BOOLEAN, NULL, + Library_corlib_native_System_GC::SuppressFinalize___STATIC__VOID__OBJECT, + Library_corlib_native_System_GC::ReRegisterForFinalize___STATIC__VOID__OBJECT, + Library_corlib_native_System_Globalization_DateTimeFormat::FormatDigits___STATIC__STRING__I4__I4, NULL, NULL, NULL, @@ -1084,6 +1164,7 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + Library_corlib_native_System_Guid::GenerateNewGuid___STATIC__SZARRAY_U1, NULL, NULL, NULL, @@ -1108,9 +1189,6 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_MathInternal::Abs___STATIC__I4__I4, - Library_corlib_native_System_MathInternal::Min___STATIC__I4__I4__I4, - Library_corlib_native_System_MathInternal::Max___STATIC__I4__I4__I4, NULL, NULL, NULL, @@ -1121,7 +1199,6 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_Number::FormatNative___STATIC__STRING__OBJECT__CHAR__I4, NULL, NULL, NULL, @@ -1131,29 +1208,24 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + Library_corlib_native_System_MathInternal::Abs___STATIC__I4__I4, + Library_corlib_native_System_MathInternal::Min___STATIC__I4__I4__I4, + Library_corlib_native_System_MathInternal::Max___STATIC__I4__I4__I4, NULL, NULL, + Library_corlib_native_System_MulticastDelegate::op_Equality___STATIC__BOOLEAN__SystemMulticastDelegate__SystemMulticastDelegate, + Library_corlib_native_System_MulticastDelegate::op_Inequality___STATIC__BOOLEAN__SystemMulticastDelegate__SystemMulticastDelegate, NULL, NULL, NULL, - Library_corlib_native_System_Random::Next___I4, - Library_corlib_native_System_Random::Next___I4__I4, - Library_corlib_native_System_Random::NextDouble___R8, - Library_corlib_native_System_Random::NextBytes___VOID__SZARRAY_U1, - Library_corlib_native_System_Random::_ctor___VOID, - Library_corlib_native_System_Random::_ctor___VOID__I4, NULL, NULL, NULL, - Library_corlib_native_System_Runtime_CompilerServices_RuntimeHelpers::InitializeArray___STATIC__VOID__SystemArray__SystemRuntimeFieldHandle, - Library_corlib_native_System_Runtime_CompilerServices_RuntimeHelpers::GetObjectValue___STATIC__OBJECT__OBJECT, - Library_corlib_native_System_Runtime_CompilerServices_RuntimeHelpers::RunClassConstructor___STATIC__VOID__SystemRuntimeTypeHandle, - Library_corlib_native_System_Runtime_CompilerServices_RuntimeHelpers::get_OffsetToStringData___STATIC__I4, - Library_corlib_native_System_Runtime_Remoting_RemotingServices::IsTransparentProxy___STATIC__BOOLEAN__OBJECT, NULL, NULL, NULL, NULL, + Library_corlib_native_System_Number::FormatNative___STATIC__STRING__OBJECT__CHAR__I4, NULL, NULL, NULL, @@ -1167,67 +1239,36 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_String::CompareTo___I4__OBJECT, NULL, - Library_corlib_native_System_String::get_Chars___CHAR__I4, + Library_corlib_native_System_Random::Next___I4, + Library_corlib_native_System_Random::Next___I4__I4, + Library_corlib_native_System_Random::NextDouble___R8, + Library_corlib_native_System_Random::NextBytes___VOID__SZARRAY_U1, + Library_corlib_native_System_Random::_ctor___VOID, + Library_corlib_native_System_Random::_ctor___VOID__I4, + NULL, + NULL, + NULL, + Library_corlib_native_System_Runtime_CompilerServices_RuntimeHelpers::InitializeArray___STATIC__VOID__SystemArray__SystemRuntimeFieldHandle, + Library_corlib_native_System_Runtime_CompilerServices_RuntimeHelpers::GetObjectValue___STATIC__OBJECT__OBJECT, + Library_corlib_native_System_Runtime_CompilerServices_RuntimeHelpers::RunClassConstructor___STATIC__VOID__SystemRuntimeTypeHandle, + Library_corlib_native_System_Runtime_CompilerServices_RuntimeHelpers::get_OffsetToStringData___STATIC__I4, + Library_corlib_native_System_Runtime_Remoting_RemotingServices::IsTransparentProxy___STATIC__BOOLEAN__OBJECT, + NULL, + NULL, NULL, - Library_corlib_native_System_String::ToCharArray___SZARRAY_CHAR, - Library_corlib_native_System_String::ToCharArray___SZARRAY_CHAR__I4__I4, - Library_corlib_native_System_String::get_Length___I4, - Library_corlib_native_System_String::Split___SZARRAY_STRING__SZARRAY_CHAR, - Library_corlib_native_System_String::Split___SZARRAY_STRING__SZARRAY_CHAR__I4, - Library_corlib_native_System_String::Substring___STRING__I4, - Library_corlib_native_System_String::Substring___STRING__I4__I4, - Library_corlib_native_System_String::Trim___STRING__SZARRAY_CHAR, - Library_corlib_native_System_String::TrimStart___STRING__SZARRAY_CHAR, - Library_corlib_native_System_String::TrimEnd___STRING__SZARRAY_CHAR, - Library_corlib_native_System_String::_ctor___VOID__SZARRAY_CHAR__I4__I4, - Library_corlib_native_System_String::_ctor___VOID__SZARRAY_CHAR, - Library_corlib_native_System_String::_ctor___VOID__CHAR__I4, - Library_corlib_native_System_String::CompareTo___I4__STRING, - Library_corlib_native_System_String::IndexOf___I4__CHAR, - Library_corlib_native_System_String::IndexOf___I4__CHAR__I4, - Library_corlib_native_System_String::IndexOf___I4__CHAR__I4__I4, - Library_corlib_native_System_String::IndexOfAny___I4__SZARRAY_CHAR, - Library_corlib_native_System_String::IndexOfAny___I4__SZARRAY_CHAR__I4, - Library_corlib_native_System_String::IndexOfAny___I4__SZARRAY_CHAR__I4__I4, - Library_corlib_native_System_String::IndexOf___I4__STRING, - Library_corlib_native_System_String::IndexOf___I4__STRING__I4, - Library_corlib_native_System_String::IndexOf___I4__STRING__I4__I4, - Library_corlib_native_System_String::LastIndexOf___I4__CHAR, - Library_corlib_native_System_String::LastIndexOf___I4__CHAR__I4, - Library_corlib_native_System_String::LastIndexOf___I4__CHAR__I4__I4, - Library_corlib_native_System_String::LastIndexOfAny___I4__SZARRAY_CHAR, - Library_corlib_native_System_String::LastIndexOfAny___I4__SZARRAY_CHAR__I4, - Library_corlib_native_System_String::LastIndexOfAny___I4__SZARRAY_CHAR__I4__I4, - Library_corlib_native_System_String::LastIndexOf___I4__STRING, - Library_corlib_native_System_String::LastIndexOf___I4__STRING__I4, - Library_corlib_native_System_String::LastIndexOf___I4__STRING__I4__I4, - Library_corlib_native_System_String::ToLower___STRING, - Library_corlib_native_System_String::ToUpper___STRING, - Library_corlib_native_System_String::Trim___STRING, NULL, NULL, - Library_corlib_native_System_String::Equals___STATIC__BOOLEAN__STRING__STRING, - Library_corlib_native_System_String::op_Equality___STATIC__BOOLEAN__STRING__STRING, - Library_corlib_native_System_String::op_Inequality___STATIC__BOOLEAN__STRING__STRING, - Library_corlib_native_System_String::Compare___STATIC__I4__STRING__STRING, NULL, NULL, NULL, NULL, - Library_corlib_native_System_String::Concat___STATIC__STRING__STRING__STRING, - Library_corlib_native_System_String::Concat___STATIC__STRING__STRING__STRING__STRING, - Library_corlib_native_System_String::Concat___STATIC__STRING__STRING__STRING__STRING__STRING, - Library_corlib_native_System_String::Concat___STATIC__STRING__SZARRAY_STRING, NULL, NULL, NULL, NULL, - Library_corlib_native_System_Threading_WaitHandle::WaitOne___BOOLEAN__I4__BOOLEAN, NULL, NULL, - Library_corlib_native_System_Threading_WaitHandle::WaitMultiple___STATIC__I4__SZARRAY_SystemThreadingWaitHandle__I4__BOOLEAN__BOOLEAN, NULL, NULL, NULL, @@ -1275,46 +1316,10 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, - Library_corlib_native_System_TimeSpan::Equals___BOOLEAN__OBJECT, - Library_corlib_native_System_TimeSpan::ToString___STRING, - NULL, - NULL, - Library_corlib_native_System_TimeSpan::_ctor___VOID__I4__I4__I4, - Library_corlib_native_System_TimeSpan::_ctor___VOID__I4__I4__I4__I4, - Library_corlib_native_System_TimeSpan::_ctor___VOID__I4__I4__I4__I4__I4, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - Library_corlib_native_System_TimeSpan::CompareTo___I4__OBJECT, - NULL, - NULL, - NULL, - Library_corlib_native_System_TimeSpan::Compare___STATIC__I4__SystemTimeSpan__SystemTimeSpan, - Library_corlib_native_System_TimeSpan::Equals___STATIC__BOOLEAN__SystemTimeSpan__SystemTimeSpan, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, + Library_corlib_native_System_Threading_WaitHandle::WaitOne___BOOLEAN__I4__BOOLEAN, NULL, NULL, + Library_corlib_native_System_Threading_WaitHandle::WaitMultiple___STATIC__I4__SZARRAY_SystemThreadingWaitHandle__I4__BOOLEAN__BOOLEAN, NULL, NULL, NULL, @@ -1325,6 +1330,7 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + Library_corlib_native_System_ValueType::Equals___BOOLEAN__OBJECT, NULL, NULL, NULL, @@ -1339,11 +1345,6 @@ static const CLR_RT_MethodHandler method_lookup[] = Library_corlib_native_System_WeakReference::get_Target___OBJECT, Library_corlib_native_System_WeakReference::set_Target___VOID__OBJECT, Library_corlib_native_System_WeakReference::_ctor___VOID__OBJECT, - NULL, - NULL, - NULL, - NULL, - NULL, }; #else @@ -1352,20 +1353,20 @@ static const CLR_RT_MethodHandler method_lookup[] = const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_mscorlib = { - "mscorlib", + "mscorlib", #if (NANOCLR_REFLECTION == TRUE) - 0x3E5F09B0, + 0x42B9EEF6, #elif (NANOCLR_REFLECTION == FALSE) - 0x529780F5, + 0x3292C917, #else #error "NANOCLR_REFLECTION has to be define either TRUE or FALSE. Check the build options." #endif method_lookup, - { 100, 4, 6, 0 } + { 100, 4, 7, 0 } }; diff --git a/src/CLR/CorLib/corlib_native.h b/src/CLR/CorLib/corlib_native.h index d8413793b6..aaf5f6e7d5 100644 --- a/src/CLR/CorLib/corlib_native.h +++ b/src/CLR/CorLib/corlib_native.h @@ -4,7 +4,6 @@ // See LICENSE file in the project root for full license information. // - #ifndef _CORLIB_NATIVE_H_ #define _CORLIB_NATIVE_H_ @@ -12,8 +11,174 @@ #include #include +#if (NANOCLR_REFLECTION == TRUE) +struct Library_corlib_native_System_AppDomain +{ + static const int FIELD___appDomain = 1; + static const int FIELD___friendlyName = 2; + + NANOCLR_NATIVE_DECLARE(GetAssemblies___SZARRAY_SystemReflectionAssembly); + NANOCLR_NATIVE_DECLARE(LoadInternal___SystemReflectionAssembly__STRING__BOOLEAN__I4__I4__I4__I4); + NANOCLR_NATIVE_DECLARE(CreateDomain___STATIC__SystemAppDomain__STRING); + NANOCLR_NATIVE_DECLARE(Unload___STATIC__VOID__SystemAppDomain); + + //--// + #if defined(NANOCLR_APPDOMAINS) + static HRESULT GetAppDomain( CLR_RT_HeapBlock& ref, CLR_RT_AppDomain*& appDomain, CLR_RT_AppDomain*& appDomainSav, bool fCheckForUnloadingAppDomain ); + #endif +}; + +#endif // NANOCLR_REFLECTION + +struct Library_corlib_native_System_Boolean +{ + static const int FIELD_STATIC__FalseString = 0; + static const int FIELD_STATIC__TrueString = 1; + + static const int FIELD___value = 1; + + + //--// + +}; + +struct Library_corlib_native_System_Globalization_CultureInfo +{ + + static const int FIELD___numInfo = 1; + static const int FIELD___dateTimeInfo = 2; + static const int FIELD___cultureInfoName = 3; + static const int FIELD___name = 4; + static const int FIELD___parent = 5; + + NANOCLR_NATIVE_DECLARE(get_CurrentUICultureInternal___STATIC__SystemGlobalizationCultureInfo); + NANOCLR_NATIVE_DECLARE(set_CurrentUICultureInternal___STATIC__VOID__SystemGlobalizationCultureInfo); + + //--// + +}; + +struct Library_corlib_native_System_Globalization_NumberFormatInfo +{ + + static const int FIELD___numberGroupSizes = 1; + static const int FIELD___positiveSign = 2; + static const int FIELD___negativeSign = 3; + static const int FIELD___numberDecimalSeparator = 4; + static const int FIELD___numberGroupSeparator = 5; + static const int FIELD___cultureInfo = 6; + + + //--// + +}; + +struct Library_corlib_native_System_Reflection_BindingFlags +{ + + static const int FIELD__value__ = 1; + + + //--// + +}; + +struct Library_corlib_native_System_Reflection_ConstructorInfo +{ + + + NANOCLR_NATIVE_DECLARE(GetCustomAttributes___SZARRAY_OBJECT__BOOLEAN); + NANOCLR_NATIVE_DECLARE(Invoke___OBJECT__SZARRAY_OBJECT); + + //--// + +}; + +struct Library_corlib_native_System_Reflection_FieldInfo +{ + + + NANOCLR_NATIVE_DECLARE(SetValue___VOID__OBJECT__OBJECT); + NANOCLR_NATIVE_DECLARE(GetCustomAttributesNative___SZARRAY_OBJECT__BOOLEAN); + + //--// + + #if (NANOCLR_REFLECTION == TRUE) + static HRESULT Initialize( CLR_RT_StackFrame& stack, CLR_RT_FieldDef_Instance& instFD, CLR_RT_TypeDef_Instance& instTD, CLR_RT_HeapBlock*& obj ); + #endif // NANOCLR_REFLECTION +}; + +#if (NANOCLR_REFLECTION == TRUE) + +struct Library_corlib_native_System_Type +{ + + + NANOCLR_NATIVE_DECLARE(get_DeclaringType___SystemType); + NANOCLR_NATIVE_DECLARE(GetMethod___SystemReflectionMethodInfo__STRING__SystemReflectionBindingFlags); + NANOCLR_NATIVE_DECLARE(IsInstanceOfType___BOOLEAN__OBJECT); + NANOCLR_NATIVE_DECLARE(InvokeMember___OBJECT__STRING__SystemReflectionBindingFlags__SystemReflectionBinder__OBJECT__SZARRAY_OBJECT); + NANOCLR_NATIVE_DECLARE(GetConstructor___SystemReflectionConstructorInfo__SZARRAY_SystemType); + NANOCLR_NATIVE_DECLARE(GetMethod___SystemReflectionMethodInfo__STRING__SZARRAY_SystemType); + NANOCLR_NATIVE_DECLARE(GetMethod___SystemReflectionMethodInfo__STRING); + NANOCLR_NATIVE_DECLARE(get_IsNotPublic___BOOLEAN); + NANOCLR_NATIVE_DECLARE(get_IsPublic___BOOLEAN); + NANOCLR_NATIVE_DECLARE(get_IsClass___BOOLEAN); + NANOCLR_NATIVE_DECLARE(get_IsInterface___BOOLEAN); + NANOCLR_NATIVE_DECLARE(get_IsValueType___BOOLEAN); + NANOCLR_NATIVE_DECLARE(get_IsAbstract___BOOLEAN); + NANOCLR_NATIVE_DECLARE(get_IsEnum___BOOLEAN); + NANOCLR_NATIVE_DECLARE(get_IsSerializable___BOOLEAN); + NANOCLR_NATIVE_DECLARE(get_IsArray___BOOLEAN); + NANOCLR_NATIVE_DECLARE(GetTypeInternal___STATIC__SystemType__STRING__STRING__BOOLEAN__SZARRAY_I4); + NANOCLR_NATIVE_DECLARE(GetTypeFromHandle___STATIC__SystemType__SystemRuntimeTypeHandle); + + //--// + + static const int c_BindingFlags_Default = 0x00000000; // a place holder for no flag specifed + + static const int c_BindingFlags_IgnoreCase = 0x00000001; // Ignore the case of Names while searching + static const int c_BindingFlags_DeclaredOnly = 0x00000002; // Only look at the members declared on the Type + static const int c_BindingFlags_Instance = 0x00000004; // Include Instance members in search + static const int c_BindingFlags_Static = 0x00000008; // Include Static members in search + static const int c_BindingFlags_Public = 0x00000010; // Include Public members in search + static const int c_BindingFlags_NonPublic = 0x00000020; // Include Non-Public members in search + static const int c_BindingFlags_FlattenHierarchy = 0x00000040; // Rollup the statics into the class. + + static const int c_BindingFlags_InvokeMethod = 0x00000100; + static const int c_BindingFlags_CreateInstance = 0x00000200; + static const int c_BindingFlags_GetField = 0x00000400; + static const int c_BindingFlags_SetField = 0x00000800; + static const int c_BindingFlags_GetProperty = 0x00001000; + static const int c_BindingFlags_SetProperty = 0x00002000; + + static const int c_BindingFlags_PutDispProperty = 0x00004000; + static const int c_BindingFlags_PutRefDispProperty = 0x00008000; + + static const int c_BindingFlags_ExactBinding = 0x00010000; // Bind with Exact Type matching, No Change type + static const int c_BindingFlags_SuppressChangeType = 0x00020000; + + static const int c_BindingFlags_OptionalParamBinding = 0x00040000; + static const int c_BindingFlags_IgnoreReturn = 0x01000000; // This is used in COM Interop + + //--// + + static const int c_BindingFlags_DefaultLookup = c_BindingFlags_Instance | c_BindingFlags_Static | c_BindingFlags_Public; + + //--// + + static HRESULT CheckFlags( CLR_RT_StackFrame& stack, CLR_UINT32 mask, CLR_UINT32 flag ); + + static HRESULT GetFields ( CLR_RT_StackFrame& stack, const char* szText, CLR_UINT32 attr , bool fAllMatches ); + static HRESULT GetMethods( CLR_RT_StackFrame& stack, const char* szText, CLR_UINT32 attr, CLR_RT_HeapBlock* pParams, int iParams, bool fAllMatches ); +}; + +#endif // NANOCLR_REFLECTION + struct Library_corlib_native_System_Object { + + NANOCLR_NATIVE_DECLARE(Equals___BOOLEAN__OBJECT); NANOCLR_NATIVE_DECLARE(GetHashCode___I4); NANOCLR_NATIVE_DECLARE(GetType___SystemType); @@ -24,53 +189,109 @@ struct Library_corlib_native_System_Object }; -struct Library_corlib_native_System_ValueType +struct Library_corlib_native_System_Int32 { - NANOCLR_NATIVE_DECLARE(Equals___BOOLEAN__OBJECT); + + static const int FIELD___value = 1; + //--// }; -struct Library_corlib_native_System_Collections_Hashtable +struct Library_corlib_native_System_Char { - static const int FIELD___buckets = 1; - static const int FIELD___numberOfBuckets = 2; - static const int FIELD___count = 3; - static const int FIELD___loadFactor = 4; - static const int FIELD___maxLoadFactor = 5; - static const int FIELD___growthFactor = 6; + + static const int FIELD___value = 1; //--// }; -struct Library_corlib_native_System_Collections_Hashtable__Entry +struct Library_corlib_native_System_String { - static const int FIELD__key = 1; - static const int FIELD__value = 2; - static const int FIELD__next = 3; + static const int FIELD_STATIC__Empty = 2; + NANOCLR_NATIVE_DECLARE(CompareTo___I4__OBJECT); + NANOCLR_NATIVE_DECLARE(get_Chars___CHAR__I4); + NANOCLR_NATIVE_DECLARE(ToCharArray___SZARRAY_CHAR); + NANOCLR_NATIVE_DECLARE(ToCharArray___SZARRAY_CHAR__I4__I4); + NANOCLR_NATIVE_DECLARE(get_Length___I4); + NANOCLR_NATIVE_DECLARE(Split___SZARRAY_STRING__SZARRAY_CHAR); + NANOCLR_NATIVE_DECLARE(Split___SZARRAY_STRING__SZARRAY_CHAR__I4); + NANOCLR_NATIVE_DECLARE(Substring___STRING__I4); + NANOCLR_NATIVE_DECLARE(Substring___STRING__I4__I4); + NANOCLR_NATIVE_DECLARE(Trim___STRING__SZARRAY_CHAR); + NANOCLR_NATIVE_DECLARE(TrimStart___STRING__SZARRAY_CHAR); + NANOCLR_NATIVE_DECLARE(TrimEnd___STRING__SZARRAY_CHAR); + NANOCLR_NATIVE_DECLARE(_ctor___VOID__SZARRAY_CHAR__I4__I4); + NANOCLR_NATIVE_DECLARE(_ctor___VOID__SZARRAY_CHAR); + NANOCLR_NATIVE_DECLARE(_ctor___VOID__CHAR__I4); + NANOCLR_NATIVE_DECLARE(CompareTo___I4__STRING); + NANOCLR_NATIVE_DECLARE(IndexOf___I4__CHAR); + NANOCLR_NATIVE_DECLARE(IndexOf___I4__CHAR__I4); + NANOCLR_NATIVE_DECLARE(IndexOf___I4__CHAR__I4__I4); + NANOCLR_NATIVE_DECLARE(IndexOfAny___I4__SZARRAY_CHAR); + NANOCLR_NATIVE_DECLARE(IndexOfAny___I4__SZARRAY_CHAR__I4); + NANOCLR_NATIVE_DECLARE(IndexOfAny___I4__SZARRAY_CHAR__I4__I4); + NANOCLR_NATIVE_DECLARE(IndexOf___I4__STRING); + NANOCLR_NATIVE_DECLARE(IndexOf___I4__STRING__I4); + NANOCLR_NATIVE_DECLARE(IndexOf___I4__STRING__I4__I4); + NANOCLR_NATIVE_DECLARE(LastIndexOf___I4__CHAR); + NANOCLR_NATIVE_DECLARE(LastIndexOf___I4__CHAR__I4); + NANOCLR_NATIVE_DECLARE(LastIndexOf___I4__CHAR__I4__I4); + NANOCLR_NATIVE_DECLARE(LastIndexOfAny___I4__SZARRAY_CHAR); + NANOCLR_NATIVE_DECLARE(LastIndexOfAny___I4__SZARRAY_CHAR__I4); + NANOCLR_NATIVE_DECLARE(LastIndexOfAny___I4__SZARRAY_CHAR__I4__I4); + NANOCLR_NATIVE_DECLARE(LastIndexOf___I4__STRING); + NANOCLR_NATIVE_DECLARE(LastIndexOf___I4__STRING__I4); + NANOCLR_NATIVE_DECLARE(LastIndexOf___I4__STRING__I4__I4); + NANOCLR_NATIVE_DECLARE(ToLower___STRING); + NANOCLR_NATIVE_DECLARE(ToUpper___STRING); + NANOCLR_NATIVE_DECLARE(Trim___STRING); + NANOCLR_NATIVE_DECLARE(Equals___STATIC__BOOLEAN__STRING__STRING); + NANOCLR_NATIVE_DECLARE(op_Equality___STATIC__BOOLEAN__STRING__STRING); + NANOCLR_NATIVE_DECLARE(op_Inequality___STATIC__BOOLEAN__STRING__STRING); + NANOCLR_NATIVE_DECLARE(Compare___STATIC__I4__STRING__STRING); + NANOCLR_NATIVE_DECLARE(Concat___STATIC__STRING__STRING__STRING); + NANOCLR_NATIVE_DECLARE(Concat___STATIC__STRING__STRING__STRING__STRING); + NANOCLR_NATIVE_DECLARE(Concat___STATIC__STRING__STRING__STRING__STRING__STRING); + NANOCLR_NATIVE_DECLARE(Concat___STATIC__STRING__SZARRAY_STRING); + //--// -}; + static const int c_IndexOf__SingleChar = 0x00000001; + static const int c_IndexOf__MultipleChars = 0x00000002; + static const int c_IndexOf__String = 0x00000004; + static const int c_IndexOf__StartIndex = 0x00000010; + static const int c_IndexOf__Count = 0x00000020; + static const int c_IndexOf__Last = 0x00000040; + static const int c_IndexOf__String_Last = 0x00000044; -struct Library_corlib_native_System_Collections_Hashtable__HashtableEnumerator -{ - static const int FIELD__ht = 1; - static const int FIELD__temp = 2; - static const int FIELD__index = 3; - static const int FIELD__returnType = 4; + static HRESULT FromCharArray( CLR_RT_StackFrame& stack, int startIndex, int count ); + static HRESULT ToCharArray ( CLR_RT_StackFrame& stack, int startIndex, int count ); + static HRESULT IndexOf ( CLR_RT_StackFrame& stack, int mode ); + static HRESULT ChangeCase ( CLR_RT_StackFrame& stack, bool fToUpper ); + static HRESULT Substring ( CLR_RT_StackFrame& stack, int startIndex, int count ); + + + static HRESULT Trim( CLR_RT_StackFrame& stack, CLR_RT_HeapBlock_Array* arrayTrimChars, bool fStart, bool fEnd ); + static HRESULT Split( CLR_RT_StackFrame& stack, CLR_RT_HeapBlock& chars, int maxStrings ); //--// + static HRESULT Concat( CLR_RT_StackFrame& stack, CLR_RT_HeapBlock* array, int num ); + + static HRESULT ConvertToCharArray( CLR_RT_StackFrame& stack, CLR_RT_HeapBlock& ref, CLR_RT_HeapBlock_Array*& array, int startIndex, int length ); + static HRESULT ConvertToCharArray( const char* szText , CLR_RT_HeapBlock& ref, CLR_RT_HeapBlock_Array*& array, int startIndex, int length ); }; struct Library_corlib_native_System_Exception { + static const int FIELD___message = 1; static const int FIELD___innerException = 2; static const int FIELD___stackTrace = 3; @@ -99,37 +320,9 @@ struct Library_corlib_native_System_Exception static CLR_UINT32 GetHResult( CLR_RT_HeapBlock* obj ) { return obj[ Library_corlib_native_System_Exception::FIELD__HResult ].NumericByRef().u4; } }; -struct Library_corlib_native_System_Collections_Hashtable__KeyCollection -{ - static const int FIELD__ht = 1; - - - //--// - -}; - -#if (NANOCLR_REFLECTION == TRUE) - -struct Library_corlib_native_System_AppDomain -{ - static const int FIELD___appDomain = 1; - static const int FIELD___friendlyName = 2; - - NANOCLR_NATIVE_DECLARE(GetAssemblies___SZARRAY_SystemReflectionAssembly); - NANOCLR_NATIVE_DECLARE(LoadInternal___SystemReflectionAssembly__STRING__BOOLEAN__I4__I4__I4__I4); - NANOCLR_NATIVE_DECLARE(CreateDomain___STATIC__SystemAppDomain__STRING); - NANOCLR_NATIVE_DECLARE(Unload___STATIC__VOID__SystemAppDomain); - - //--// -#if defined(NANOCLR_APPDOMAINS) - static HRESULT GetAppDomain( CLR_RT_HeapBlock& ref, CLR_RT_AppDomain*& appDomain, CLR_RT_AppDomain*& appDomainSav, bool fCheckForUnloadingAppDomain ); -#endif -}; - -#endif // NANOCLR_REFLECTION - struct Library_corlib_native_System_ArgumentException { + static const int FIELD___paramName = 5; @@ -139,12 +332,14 @@ struct Library_corlib_native_System_ArgumentException struct Library_corlib_native_System_Array { + + NANOCLR_NATIVE_DECLARE(System_Collections_IList_get_Item___OBJECT__I4); NANOCLR_NATIVE_DECLARE(System_Collections_IList_set_Item___VOID__I4__OBJECT); NANOCLR_NATIVE_DECLARE(get_Length___I4); -#if (NANOCLR_REFLECTION == TRUE) + #if (NANOCLR_REFLECTION == TRUE) NANOCLR_NATIVE_DECLARE(CreateInstance___STATIC__SystemArray__SystemType__I4); -#endif // NANOCLR_REFLECTION + #endif // NANOCLR_REFLECTION NANOCLR_NATIVE_DECLARE(Copy___STATIC__VOID__SystemArray__I4__SystemArray__I4__I4); NANOCLR_NATIVE_DECLARE(Clear___STATIC__VOID__SystemArray__I4__I4); NANOCLR_NATIVE_DECLARE(TrySzIndexOf___STATIC__BOOLEAN__SystemArray__I4__I4__OBJECT__BYREF_I4); @@ -156,29 +351,25 @@ struct Library_corlib_native_System_Array static HRESULT TrySzIndexOf( CLR_RT_StackFrame& stack, CLR_RT_HeapBlock& argSrc, CLR_RT_HeapBlock& match , int start , int stop , bool fForward, CLR_RT_HeapBlock& retValue ); }; -struct Library_corlib_native_System_Delegate +struct Library_corlib_native_System_Array__SzArrayEnumerator { - NANOCLR_NATIVE_DECLARE(Equals___BOOLEAN__OBJECT); - NANOCLR_NATIVE_DECLARE(Combine___STATIC__SystemDelegate__SystemDelegate__SystemDelegate); - NANOCLR_NATIVE_DECLARE(Remove___STATIC__SystemDelegate__SystemDelegate__SystemDelegate); - NANOCLR_NATIVE_DECLARE(op_Equality___STATIC__BOOLEAN__SystemDelegate__SystemDelegate); - NANOCLR_NATIVE_DECLARE(op_Inequality___STATIC__BOOLEAN__SystemDelegate__SystemDelegate); -#if (NANOCLR_REFLECTION == TRUE) - NANOCLR_NATIVE_DECLARE(GetInvocationList___SZARRAY_SystemDelegate); - NANOCLR_NATIVE_DECLARE(get_Method___SystemReflectionMethodInfo); - NANOCLR_NATIVE_DECLARE(get_Target___OBJECT); -#endif // NANOCLR_REFLECTION + static const int FIELD___array = 1; + static const int FIELD___index = 2; + static const int FIELD___endIndex = 3; + static const int FIELD___startIndex = 4; + static const int FIELD___arrayLength = 5; + //--// - static CLR_RT_HeapBlock_Delegate* GetLastDelegate( CLR_RT_HeapBlock_Delegate* dlg ); }; -struct Library_corlib_native_System_MulticastDelegate +struct Library_corlib_native_System_Base64FormattingOptions { - NANOCLR_NATIVE_DECLARE(op_Equality___STATIC__BOOLEAN__SystemMulticastDelegate__SystemMulticastDelegate); - NANOCLR_NATIVE_DECLARE(op_Inequality___STATIC__BOOLEAN__SystemMulticastDelegate__SystemMulticastDelegate); + + static const int FIELD__value__ = 1; + //--// @@ -186,6 +377,8 @@ struct Library_corlib_native_System_MulticastDelegate struct Library_corlib_native_System_BitConverter { + + NANOCLR_NATIVE_DECLARE(get_IsLittleEndian___STATIC__BOOLEAN); NANOCLR_NATIVE_DECLARE(DoubleToInt64Bits___STATIC__I8__R8); NANOCLR_NATIVE_DECLARE(GetBytes___STATIC__SZARRAY_U1__BOOLEAN); @@ -210,20 +403,8 @@ struct Library_corlib_native_System_BitConverter NANOCLR_NATIVE_DECLARE(ToString___STATIC__STRING__SZARRAY_U1__I4); NANOCLR_NATIVE_DECLARE(ToString___STATIC__STRING__SZARRAY_U1__I4__I4); NANOCLR_NATIVE_DECLARE(ToUInt16___STATIC__U2__SZARRAY_U1__I4); - NANOCLR_NATIVE_DECLARE(ToUInt32___STATIC__U4__SZARRAY_U1__I4); - NANOCLR_NATIVE_DECLARE(ToUInt64___STATIC__U8__SZARRAY_U1__I4); - - //--// - -}; - -struct Library_corlib_native_System_Boolean -{ - static const int FIELD_STATIC__FalseString = 0; - static const int FIELD_STATIC__TrueString = 1; - - static const int FIELD___value = 1; - + NANOCLR_NATIVE_DECLARE(ToUInt32___STATIC__U4__SZARRAY_U1__I4); + NANOCLR_NATIVE_DECLARE(ToUInt64___STATIC__U8__SZARRAY_U1__I4); //--// @@ -231,15 +412,7 @@ struct Library_corlib_native_System_Boolean struct Library_corlib_native_System_Byte { - static const int FIELD___value = 1; - - - //--// - -}; -struct Library_corlib_native_System_Char -{ static const int FIELD___value = 1; @@ -249,6 +422,7 @@ struct Library_corlib_native_System_Char struct Library_corlib_native_System_Collections_ArrayList { + static const int FIELD___items = 1; static const int FIELD___size = 2; @@ -264,16 +438,55 @@ struct Library_corlib_native_System_Collections_ArrayList }; +struct Library_corlib_native_System_ComponentModel_EditorBrowsableState +{ + + static const int FIELD__value__ = 1; + + + //--// + +}; + struct Library_corlib_native_System_Console { + + NANOCLR_NATIVE_DECLARE(OutNative___STATIC__VOID__STRING__BOOLEAN); //--// }; +struct Library_corlib_native_System_Int64 +{ + + static const int FIELD___value = 1; + + + //--// + +}; + +struct Library_corlib_native_System_Double +{ + + static const int FIELD___value = 1; + + NANOCLR_NATIVE_DECLARE(CompareTo___STATIC__I4__R8__R8); + NANOCLR_NATIVE_DECLARE(IsInfinity___STATIC__BOOLEAN__R8); + NANOCLR_NATIVE_DECLARE(IsNaN___STATIC__BOOLEAN__R8); + NANOCLR_NATIVE_DECLARE(IsNegativeInfinity___STATIC__BOOLEAN__R8); + NANOCLR_NATIVE_DECLARE(IsPositiveInfinity___STATIC__BOOLEAN__R8); + + //--// + +}; + struct Library_corlib_native_System_Convert { + + NANOCLR_NATIVE_DECLARE(NativeToInt64___STATIC__I8__STRING__BOOLEAN__I8__I8__I4); NANOCLR_NATIVE_DECLARE(NativeToDouble___STATIC__R8__STRING); NANOCLR_NATIVE_DECLARE(ToBase64String___STATIC__STRING__SZARRAY_U1__I4__I4__BOOLEAN); @@ -286,11 +499,59 @@ struct Library_corlib_native_System_Convert static int64_t GetIntegerFromHexString(char* str); }; +struct Library_corlib_native_System_Globalization_DateTimeFormatInfo +{ + + static const int FIELD___generalShortTimePattern = 1; + static const int FIELD___generalLongTimePattern = 2; + static const int FIELD___fullDateTimePattern = 3; + + + //--// + +}; + +struct Library_corlib_native_System_TimeSpan +{ + static const int FIELD_STATIC__Zero = 3; + static const int FIELD_STATIC__MaxValue = 4; + static const int FIELD_STATIC__MinValue = 5; + + static const int FIELD___ticks = 1; + + NANOCLR_NATIVE_DECLARE(Equals___BOOLEAN__OBJECT); + NANOCLR_NATIVE_DECLARE(ToString___STRING); + NANOCLR_NATIVE_DECLARE(_ctor___VOID__I4__I4__I4); + NANOCLR_NATIVE_DECLARE(_ctor___VOID__I4__I4__I4__I4); + NANOCLR_NATIVE_DECLARE(_ctor___VOID__I4__I4__I4__I4__I4); + NANOCLR_NATIVE_DECLARE(CompareTo___I4__OBJECT); + NANOCLR_NATIVE_DECLARE(Compare___STATIC__I4__SystemTimeSpan__SystemTimeSpan); + NANOCLR_NATIVE_DECLARE(Equals___STATIC__BOOLEAN__SystemTimeSpan__SystemTimeSpan); + + //--// + + static CLR_INT64* NewObject ( CLR_RT_StackFrame& stack ); + static CLR_INT64* GetValuePtr( CLR_RT_StackFrame& stack ); + static CLR_INT64* GetValuePtr( CLR_RT_HeapBlock& ref ); + + static void ConstructTimeSpan( CLR_INT64* val, CLR_INT32 days, CLR_INT32 hours, CLR_INT32 minutes, CLR_INT32 seconds, CLR_INT32 ms ); +}; + +struct Library_corlib_native_System_DateTimeKind +{ + + static const int FIELD__value__ = 1; + + + //--// + +}; + struct Library_corlib_native_System_DateTime { - static const int FIELD_STATIC__MinValue = 2; - static const int FIELD_STATIC__MaxValue = 3; - static const int FIELD_STATIC__UnixEpoch = 4; + static const int FIELD_STATIC__MinValue = 6; + static const int FIELD_STATIC__MaxValue = 7; + static const int FIELD_STATIC__UnixEpoch = 8; static const int FIELD___ticks = 1; @@ -318,8 +579,41 @@ struct Library_corlib_native_System_DateTime static void Compress( CLR_RT_StackFrame& stack, const SYSTEMTIME& st ); }; +struct Library_corlib_native_System_DayOfWeek +{ + + static const int FIELD__value__ = 1; + + + //--// + +}; + +struct Library_corlib_native_System_Delegate +{ + + + NANOCLR_NATIVE_DECLARE(Equals___BOOLEAN__OBJECT); + NANOCLR_NATIVE_DECLARE(Combine___STATIC__SystemDelegate__SystemDelegate__SystemDelegate); + NANOCLR_NATIVE_DECLARE(Remove___STATIC__SystemDelegate__SystemDelegate__SystemDelegate); + NANOCLR_NATIVE_DECLARE(op_Equality___STATIC__BOOLEAN__SystemDelegate__SystemDelegate); + NANOCLR_NATIVE_DECLARE(op_Inequality___STATIC__BOOLEAN__SystemDelegate__SystemDelegate); + + #if (NANOCLR_REFLECTION == TRUE) + NANOCLR_NATIVE_DECLARE(GetInvocationList___SZARRAY_SystemDelegate); + NANOCLR_NATIVE_DECLARE(get_Method___SystemReflectionMethodInfo); + NANOCLR_NATIVE_DECLARE(get_Target___OBJECT); + #endif // NANOCLR_REFLECTION + + //--// + + static CLR_RT_HeapBlock_Delegate* GetLastDelegate( CLR_RT_HeapBlock_Delegate* dlg ); +}; + struct Library_corlib_native_System_Diagnostics_Debugger { + + NANOCLR_NATIVE_DECLARE(get_IsAttached___STATIC__BOOLEAN); NANOCLR_NATIVE_DECLARE(Break___STATIC__VOID); @@ -329,6 +623,7 @@ struct Library_corlib_native_System_Diagnostics_Debugger struct Library_corlib_native_System_Diagnostics_DebuggerBrowsableAttribute { + static const int FIELD___state = 1; @@ -336,40 +631,53 @@ struct Library_corlib_native_System_Diagnostics_DebuggerBrowsableAttribute }; -struct Library_corlib_native_System_Double +struct Library_corlib_native_System_Diagnostics_DebuggerBrowsableState +{ + + static const int FIELD__value__ = 1; + + + //--// + +}; + +struct Library_corlib_native_System_UInt16 { + static const int FIELD___value = 1; - NANOCLR_NATIVE_DECLARE(CompareTo___STATIC__I4__R8__R8); - NANOCLR_NATIVE_DECLARE(IsInfinity___STATIC__BOOLEAN__R8); - NANOCLR_NATIVE_DECLARE(IsNaN___STATIC__BOOLEAN__R8); - NANOCLR_NATIVE_DECLARE(IsNegativeInfinity___STATIC__BOOLEAN__R8); - NANOCLR_NATIVE_DECLARE(IsPositiveInfinity___STATIC__BOOLEAN__R8); //--// }; -struct Library_corlib_native_System_GC +struct Library_corlib_native_System_Reflection_Assembly { - NANOCLR_NATIVE_DECLARE(AnyPendingFinalizers___STATIC__BOOLEAN); - NANOCLR_NATIVE_DECLARE(SuppressFinalize___STATIC__VOID__OBJECT); - NANOCLR_NATIVE_DECLARE(ReRegisterForFinalize___STATIC__VOID__OBJECT); + + + NANOCLR_NATIVE_DECLARE(get_FullName___STRING); + NANOCLR_NATIVE_DECLARE(GetType___SystemType__STRING); + NANOCLR_NATIVE_DECLARE(GetTypes___SZARRAY_SystemType); + NANOCLR_NATIVE_DECLARE(GetVersion___VOID__BYREF_I4__BYREF_I4__BYREF_I4__BYREF_I4); + NANOCLR_NATIVE_DECLARE(GetManifestResourceNames___SZARRAY_STRING); + NANOCLR_NATIVE_DECLARE(GetExecutingAssembly___STATIC__SystemReflectionAssembly); + NANOCLR_NATIVE_DECLARE(LoadInternal___STATIC__SystemReflectionAssembly__STRING__BOOLEAN__I4__I4__I4__I4); + NANOCLR_NATIVE_DECLARE(Load___STATIC__SystemReflectionAssembly__SZARRAY_U1); //--// + #if (NANOCLR_REFLECTION == TRUE) + static HRESULT GetTypeDescriptor( CLR_RT_HeapBlock& arg, CLR_RT_Assembly_Instance& inst ); + #endif // NANOCLR_REFLECTION }; -struct Library_corlib_native_System_Globalization_CultureInfo +struct Library_corlib_native_System_GC { - static const int FIELD___numInfo = 1; - static const int FIELD___dateTimeInfo = 2; - static const int FIELD___cultureInfoName = 3; - static const int FIELD___name = 4; - static const int FIELD___parent = 5; - NANOCLR_NATIVE_DECLARE(get_CurrentUICultureInternal___STATIC__SystemGlobalizationCultureInfo); - NANOCLR_NATIVE_DECLARE(set_CurrentUICultureInternal___STATIC__VOID__SystemGlobalizationCultureInfo); + + NANOCLR_NATIVE_DECLARE(AnyPendingFinalizers___STATIC__BOOLEAN); + NANOCLR_NATIVE_DECLARE(SuppressFinalize___STATIC__VOID__OBJECT); + NANOCLR_NATIVE_DECLARE(ReRegisterForFinalize___STATIC__VOID__OBJECT); //--// @@ -377,31 +685,28 @@ struct Library_corlib_native_System_Globalization_CultureInfo struct Library_corlib_native_System_Globalization_DateTimeFormat { + + NANOCLR_NATIVE_DECLARE(FormatDigits___STATIC__STRING__I4__I4); //--// }; -struct Library_corlib_native_System_Globalization_DateTimeFormatInfo +struct Library_corlib_native_System_UInt32 { - static const int FIELD___generalShortTimePattern = 1; - static const int FIELD___generalLongTimePattern = 2; - static const int FIELD___fullDateTimePattern = 3; + + static const int FIELD___value = 1; //--// }; -struct Library_corlib_native_System_Globalization_NumberFormatInfo +struct Library_corlib_native_System_Int16 { - static const int FIELD___numberGroupSizes = 1; - static const int FIELD___positiveSign = 2; - static const int FIELD___negativeSign = 3; - static const int FIELD___numberDecimalSeparator = 4; - static const int FIELD___numberGroupSeparator = 5; - static const int FIELD___cultureInfo = 6; + + static const int FIELD___value = 1; //--// @@ -410,7 +715,7 @@ struct Library_corlib_native_System_Globalization_NumberFormatInfo struct Library_corlib_native_System_Guid { - static const int FIELD_STATIC__Empty = 5; + static const int FIELD_STATIC__Empty = 9; static const int FIELD___a = 1; static const int FIELD___b = 2; @@ -430,38 +735,44 @@ struct Library_corlib_native_System_Guid }; -struct Library_corlib_native_System_Int16 +struct Library_corlib_native_System_IO_IOException__IOExceptionErrorCode { - static const int FIELD___value = 1; + + static const int FIELD__value__ = 1; //--// }; -struct Library_corlib_native_System_Int32 +struct Library_corlib_native_System_IO_SeekOrigin { - static const int FIELD___value = 1; + + static const int FIELD__value__ = 1; //--// }; -struct Library_corlib_native_System_Int64 +struct Library_corlib_native_System_MathInternal { - static const int FIELD___value = 1; + NANOCLR_NATIVE_DECLARE(Abs___STATIC__I4__I4); + NANOCLR_NATIVE_DECLARE(Min___STATIC__I4__I4__I4); + NANOCLR_NATIVE_DECLARE(Max___STATIC__I4__I4__I4); + //--// }; -struct Library_corlib_native_System_MathInternal +struct Library_corlib_native_System_MulticastDelegate { - NANOCLR_NATIVE_DECLARE(Abs___STATIC__I4__I4); - NANOCLR_NATIVE_DECLARE(Min___STATIC__I4__I4__I4); - NANOCLR_NATIVE_DECLARE(Max___STATIC__I4__I4__I4); + + + NANOCLR_NATIVE_DECLARE(op_Equality___STATIC__BOOLEAN__SystemMulticastDelegate__SystemMulticastDelegate); + NANOCLR_NATIVE_DECLARE(op_Inequality___STATIC__BOOLEAN__SystemMulticastDelegate__SystemMulticastDelegate); //--// @@ -469,6 +780,8 @@ struct Library_corlib_native_System_MathInternal struct Library_corlib_native_System_Number { + + NANOCLR_NATIVE_DECLARE(FormatNative___STATIC__STRING__OBJECT__CHAR__I4); //--// @@ -477,6 +790,7 @@ struct Library_corlib_native_System_Number struct Library_corlib_native_System_Random { + static const int FIELD___random = 1; NANOCLR_NATIVE_DECLARE(Next___I4); @@ -491,27 +805,30 @@ struct Library_corlib_native_System_Random static HRESULT GetRandom( CLR_RT_StackFrame& stack, CLR_RT_Random*& rand, bool create = false ); }; -struct Library_corlib_native_System_Reflection_Assembly +struct Library_corlib_native_System_Reflection_AssemblyName { - NANOCLR_NATIVE_DECLARE(get_FullName___STRING); - NANOCLR_NATIVE_DECLARE(GetType___SystemType__STRING); - NANOCLR_NATIVE_DECLARE(GetTypes___SZARRAY_SystemType); - NANOCLR_NATIVE_DECLARE(GetVersion___VOID__BYREF_I4__BYREF_I4__BYREF_I4__BYREF_I4); - NANOCLR_NATIVE_DECLARE(GetManifestResourceNames___SZARRAY_STRING); - NANOCLR_NATIVE_DECLARE(GetExecutingAssembly___STATIC__SystemReflectionAssembly); - NANOCLR_NATIVE_DECLARE(LoadInternal___STATIC__SystemReflectionAssembly__STRING__BOOLEAN__I4__I4__I4__I4); - NANOCLR_NATIVE_DECLARE(Load___STATIC__SystemReflectionAssembly__SZARRAY_U1); + + static const int FIELD___assembly = 1; + //--// -#if (NANOCLR_REFLECTION == TRUE) - static HRESULT GetTypeDescriptor( CLR_RT_HeapBlock& arg, CLR_RT_Assembly_Instance& inst ); -#endif // NANOCLR_REFLECTION }; -struct Library_corlib_native_System_Reflection_AssemblyName +struct Library_corlib_native_System_Reflection_AssemblyNameFlags { - static const int FIELD___assembly = 1; + + static const int FIELD__value__ = 1; + + + //--// + +}; + +struct Library_corlib_native_System_Reflection_MemberTypes +{ + + static const int FIELD__value__ = 1; //--// @@ -520,6 +837,8 @@ struct Library_corlib_native_System_Reflection_AssemblyName struct Library_corlib_native_System_Reflection_MethodBase { + + NANOCLR_NATIVE_DECLARE(get_Name___STRING); NANOCLR_NATIVE_DECLARE(get_DeclaringType___SystemType); NANOCLR_NATIVE_DECLARE(get_IsPublic___BOOLEAN); @@ -531,35 +850,26 @@ struct Library_corlib_native_System_Reflection_MethodBase //--// -#if (NANOCLR_REFLECTION == TRUE) + #if (NANOCLR_REFLECTION == TRUE) static HRESULT GetMethodDescriptor( CLR_RT_StackFrame& stack, CLR_RT_HeapBlock& arg, CLR_RT_MethodDef_Instance& inst ); static HRESULT CheckFlags( CLR_RT_StackFrame& stack, CLR_UINT32 mask, CLR_UINT32 flag ); -#endif // NANOCLR_REFLECTION + #endif // NANOCLR_REFLECTION }; -struct Library_corlib_native_System_Reflection_ConstructorInfo +struct Library_corlib_native_System_Reflection_ProcessorArchitecture { - NANOCLR_NATIVE_DECLARE(GetCustomAttributes___SZARRAY_OBJECT__BOOLEAN); - NANOCLR_NATIVE_DECLARE(Invoke___OBJECT__SZARRAY_OBJECT); - - //--// - -}; -struct Library_corlib_native_System_Reflection_FieldInfo -{ - NANOCLR_NATIVE_DECLARE(SetValue___VOID__OBJECT__OBJECT); - NANOCLR_NATIVE_DECLARE(GetCustomAttributes___SZARRAY_OBJECT__BOOLEAN); + static const int FIELD__value__ = 1; - //--// -#if (NANOCLR_REFLECTION == TRUE) - static HRESULT Initialize( CLR_RT_StackFrame& stack, CLR_RT_FieldDef_Instance& instFD, CLR_RT_TypeDef_Instance& instTD, CLR_RT_HeapBlock*& obj ); -#endif // NANOCLR_REFLECTION + //--// + }; struct Library_corlib_native_System_Reflection_PropertyInfo { + + NANOCLR_NATIVE_DECLARE(GetValue___OBJECT__OBJECT__SZARRAY_OBJECT); NANOCLR_NATIVE_DECLARE(SetValue___VOID__OBJECT__OBJECT__SZARRAY_OBJECT); @@ -569,6 +879,8 @@ struct Library_corlib_native_System_Reflection_PropertyInfo struct Library_corlib_native_System_Reflection_RuntimeFieldInfo { + + NANOCLR_NATIVE_DECLARE(get_Name___STRING); NANOCLR_NATIVE_DECLARE(get_DeclaringType___SystemType); NANOCLR_NATIVE_DECLARE(get_FieldType___SystemType); @@ -576,13 +888,15 @@ struct Library_corlib_native_System_Reflection_RuntimeFieldInfo //--// -#if (NANOCLR_REFLECTION == TRUE) + #if (NANOCLR_REFLECTION == TRUE) static bool GetFieldDescriptor( CLR_RT_StackFrame& stack, CLR_RT_HeapBlock& arg, CLR_RT_FieldDef_Instance& inst ); -#endif // NANOCLR_REFLECTION + #endif // NANOCLR_REFLECTION }; struct Library_corlib_native_System_Reflection_RuntimeMethodInfo { + + NANOCLR_NATIVE_DECLARE(get_ReturnType___SystemType); NANOCLR_NATIVE_DECLARE(GetCustomAttributes___SZARRAY_OBJECT__BOOLEAN); @@ -592,6 +906,7 @@ struct Library_corlib_native_System_Reflection_RuntimeMethodInfo struct Library_corlib_native_System_Runtime_CompilerServices_AccessedThroughPropertyAttribute { + static const int FIELD___propertyName = 1; @@ -601,6 +916,8 @@ struct Library_corlib_native_System_Runtime_CompilerServices_AccessedThroughProp struct Library_corlib_native_System_Runtime_CompilerServices_RuntimeHelpers { + + NANOCLR_NATIVE_DECLARE(InitializeArray___STATIC__VOID__SystemArray__SystemRuntimeFieldHandle); NANOCLR_NATIVE_DECLARE(GetObjectValue___STATIC__OBJECT__OBJECT); NANOCLR_NATIVE_DECLARE(RunClassConstructor___STATIC__VOID__SystemRuntimeTypeHandle); @@ -612,6 +929,8 @@ struct Library_corlib_native_System_Runtime_CompilerServices_RuntimeHelpers struct Library_corlib_native_System_Runtime_Remoting_RemotingServices { + + NANOCLR_NATIVE_DECLARE(IsTransparentProxy___STATIC__BOOLEAN__OBJECT); //--// @@ -620,6 +939,7 @@ struct Library_corlib_native_System_Runtime_Remoting_RemotingServices struct Library_corlib_native_System_Runtime_Versioning_TargetFrameworkAttribute { + static const int FIELD___frameworkName = 1; static const int FIELD___frameworkDisplayName = 2; @@ -630,71 +950,10 @@ struct Library_corlib_native_System_Runtime_Versioning_TargetFrameworkAttribute #if (NANOCLR_REFLECTION == TRUE) -struct Library_corlib_native_System_Type +struct Library_corlib_native_System_RuntimeType { - NANOCLR_NATIVE_DECLARE(get_DeclaringType___SystemType); - NANOCLR_NATIVE_DECLARE(GetMethod___SystemReflectionMethodInfo__STRING__SystemReflectionBindingFlags); - NANOCLR_NATIVE_DECLARE(IsInstanceOfType___BOOLEAN__OBJECT); - NANOCLR_NATIVE_DECLARE(InvokeMember___OBJECT__STRING__SystemReflectionBindingFlags__SystemReflectionBinder__OBJECT__SZARRAY_OBJECT); - NANOCLR_NATIVE_DECLARE(GetConstructor___SystemReflectionConstructorInfo__SZARRAY_SystemType); - NANOCLR_NATIVE_DECLARE(GetMethod___SystemReflectionMethodInfo__STRING__SZARRAY_SystemType); - NANOCLR_NATIVE_DECLARE(GetMethod___SystemReflectionMethodInfo__STRING); - NANOCLR_NATIVE_DECLARE(get_IsNotPublic___BOOLEAN); - NANOCLR_NATIVE_DECLARE(get_IsPublic___BOOLEAN); - NANOCLR_NATIVE_DECLARE(get_IsClass___BOOLEAN); - NANOCLR_NATIVE_DECLARE(get_IsInterface___BOOLEAN); - NANOCLR_NATIVE_DECLARE(get_IsValueType___BOOLEAN); - NANOCLR_NATIVE_DECLARE(get_IsAbstract___BOOLEAN); - NANOCLR_NATIVE_DECLARE(get_IsEnum___BOOLEAN); - NANOCLR_NATIVE_DECLARE(get_IsSerializable___BOOLEAN); - NANOCLR_NATIVE_DECLARE(get_IsArray___BOOLEAN); - NANOCLR_NATIVE_DECLARE(GetTypeInternal___STATIC__SystemType__STRING__STRING__BOOLEAN__SZARRAY_I4); - NANOCLR_NATIVE_DECLARE(GetTypeFromHandle___STATIC__SystemType__SystemRuntimeTypeHandle); - - //--// - - static const int c_BindingFlags_Default = 0x00000000; // a place holder for no flag specifed - - static const int c_BindingFlags_IgnoreCase = 0x00000001; // Ignore the case of Names while searching - static const int c_BindingFlags_DeclaredOnly = 0x00000002; // Only look at the members declared on the Type - static const int c_BindingFlags_Instance = 0x00000004; // Include Instance members in search - static const int c_BindingFlags_Static = 0x00000008; // Include Static members in search - static const int c_BindingFlags_Public = 0x00000010; // Include Public members in search - static const int c_BindingFlags_NonPublic = 0x00000020; // Include Non-Public members in search - static const int c_BindingFlags_FlattenHierarchy = 0x00000040; // Rollup the statics into the class. - - static const int c_BindingFlags_InvokeMethod = 0x00000100; - static const int c_BindingFlags_CreateInstance = 0x00000200; - static const int c_BindingFlags_GetField = 0x00000400; - static const int c_BindingFlags_SetField = 0x00000800; - static const int c_BindingFlags_GetProperty = 0x00001000; - static const int c_BindingFlags_SetProperty = 0x00002000; - - static const int c_BindingFlags_PutDispProperty = 0x00004000; - static const int c_BindingFlags_PutRefDispProperty = 0x00008000; - - static const int c_BindingFlags_ExactBinding = 0x00010000; // Bind with Exact Type matching, No Change type - static const int c_BindingFlags_SuppressChangeType = 0x00020000; - - static const int c_BindingFlags_OptionalParamBinding = 0x00040000; - static const int c_BindingFlags_IgnoreReturn = 0x01000000; // This is used in COM Interop - //--// - - static const int c_BindingFlags_DefaultLookup = c_BindingFlags_Instance | c_BindingFlags_Static | c_BindingFlags_Public; - - //--// - - static HRESULT CheckFlags( CLR_RT_StackFrame& stack, CLR_UINT32 mask, CLR_UINT32 flag ); - - static HRESULT GetFields ( CLR_RT_StackFrame& stack, const char* szText, CLR_UINT32 attr , bool fAllMatches ); - static HRESULT GetMethods( CLR_RT_StackFrame& stack, const char* szText, CLR_UINT32 attr, CLR_RT_HeapBlock* pParams, int iParams, bool fAllMatches ); -}; -#endif // NANOCLR_REFLECTION -#if (NANOCLR_REFLECTION == TRUE) -struct Library_corlib_native_System_RuntimeType -{ NANOCLR_NATIVE_DECLARE(get_Assembly___SystemReflectionAssembly); NANOCLR_NATIVE_DECLARE(get_Name___STRING); NANOCLR_NATIVE_DECLARE(get_FullName___STRING); @@ -712,19 +971,12 @@ struct Library_corlib_native_System_RuntimeType static HRESULT GetTypeDescriptor( CLR_RT_HeapBlock& arg, CLR_RT_TypeDef_Instance& inst ); static HRESULT GetName( CLR_RT_HeapBlock& arg, bool fFullName, CLR_RT_HeapBlock& res ); }; + #endif // NANOCLR_REFLECTION struct Library_corlib_native_System_SByte { - static const int FIELD___value = 1; - - - //--// -}; - -struct Library_corlib_native_System_Single -{ static const int FIELD___value = 1; @@ -732,100 +984,20 @@ struct Library_corlib_native_System_Single }; -struct Library_corlib_native_System_String +struct Library_corlib_native_System_Single { - static const int FIELD_STATIC__Empty = 6; - - NANOCLR_NATIVE_DECLARE(CompareTo___I4__OBJECT); - NANOCLR_NATIVE_DECLARE(get_Chars___CHAR__I4); - NANOCLR_NATIVE_DECLARE(ToCharArray___SZARRAY_CHAR); - NANOCLR_NATIVE_DECLARE(ToCharArray___SZARRAY_CHAR__I4__I4); - NANOCLR_NATIVE_DECLARE(get_Length___I4); - NANOCLR_NATIVE_DECLARE(Split___SZARRAY_STRING__SZARRAY_CHAR); - NANOCLR_NATIVE_DECLARE(Split___SZARRAY_STRING__SZARRAY_CHAR__I4); - NANOCLR_NATIVE_DECLARE(Substring___STRING__I4); - NANOCLR_NATIVE_DECLARE(Substring___STRING__I4__I4); - NANOCLR_NATIVE_DECLARE(Trim___STRING__SZARRAY_CHAR); - NANOCLR_NATIVE_DECLARE(TrimStart___STRING__SZARRAY_CHAR); - NANOCLR_NATIVE_DECLARE(TrimEnd___STRING__SZARRAY_CHAR); - NANOCLR_NATIVE_DECLARE(_ctor___VOID__SZARRAY_CHAR__I4__I4); - NANOCLR_NATIVE_DECLARE(_ctor___VOID__SZARRAY_CHAR); - NANOCLR_NATIVE_DECLARE(_ctor___VOID__CHAR__I4); - NANOCLR_NATIVE_DECLARE(CompareTo___I4__STRING); - NANOCLR_NATIVE_DECLARE(IndexOf___I4__CHAR); - NANOCLR_NATIVE_DECLARE(IndexOf___I4__CHAR__I4); - NANOCLR_NATIVE_DECLARE(IndexOf___I4__CHAR__I4__I4); - NANOCLR_NATIVE_DECLARE(IndexOfAny___I4__SZARRAY_CHAR); - NANOCLR_NATIVE_DECLARE(IndexOfAny___I4__SZARRAY_CHAR__I4); - NANOCLR_NATIVE_DECLARE(IndexOfAny___I4__SZARRAY_CHAR__I4__I4); - NANOCLR_NATIVE_DECLARE(IndexOf___I4__STRING); - NANOCLR_NATIVE_DECLARE(IndexOf___I4__STRING__I4); - NANOCLR_NATIVE_DECLARE(IndexOf___I4__STRING__I4__I4); - NANOCLR_NATIVE_DECLARE(LastIndexOf___I4__CHAR); - NANOCLR_NATIVE_DECLARE(LastIndexOf___I4__CHAR__I4); - NANOCLR_NATIVE_DECLARE(LastIndexOf___I4__CHAR__I4__I4); - NANOCLR_NATIVE_DECLARE(LastIndexOfAny___I4__SZARRAY_CHAR); - NANOCLR_NATIVE_DECLARE(LastIndexOfAny___I4__SZARRAY_CHAR__I4); - NANOCLR_NATIVE_DECLARE(LastIndexOfAny___I4__SZARRAY_CHAR__I4__I4); - NANOCLR_NATIVE_DECLARE(LastIndexOf___I4__STRING); - NANOCLR_NATIVE_DECLARE(LastIndexOf___I4__STRING__I4); - NANOCLR_NATIVE_DECLARE(LastIndexOf___I4__STRING__I4__I4); - NANOCLR_NATIVE_DECLARE(ToLower___STRING); - NANOCLR_NATIVE_DECLARE(ToUpper___STRING); - NANOCLR_NATIVE_DECLARE(Trim___STRING); - NANOCLR_NATIVE_DECLARE(Equals___STATIC__BOOLEAN__STRING__STRING); - NANOCLR_NATIVE_DECLARE(op_Equality___STATIC__BOOLEAN__STRING__STRING); - NANOCLR_NATIVE_DECLARE(op_Inequality___STATIC__BOOLEAN__STRING__STRING); - NANOCLR_NATIVE_DECLARE(Compare___STATIC__I4__STRING__STRING); - NANOCLR_NATIVE_DECLARE(Concat___STATIC__STRING__STRING__STRING); - NANOCLR_NATIVE_DECLARE(Concat___STATIC__STRING__STRING__STRING__STRING); - NANOCLR_NATIVE_DECLARE(Concat___STATIC__STRING__STRING__STRING__STRING__STRING); - NANOCLR_NATIVE_DECLARE(Concat___STATIC__STRING__SZARRAY_STRING); - - //--// - - static const int c_IndexOf__SingleChar = 0x00000001; - static const int c_IndexOf__MultipleChars = 0x00000002; - static const int c_IndexOf__String = 0x00000004; - static const int c_IndexOf__StartIndex = 0x00000010; - static const int c_IndexOf__Count = 0x00000020; - static const int c_IndexOf__Last = 0x00000040; - static const int c_IndexOf__String_Last = 0x00000044; - - static HRESULT FromCharArray( CLR_RT_StackFrame& stack, int startIndex, int count ); - static HRESULT ToCharArray ( CLR_RT_StackFrame& stack, int startIndex, int count ); - static HRESULT IndexOf ( CLR_RT_StackFrame& stack, int mode ); - static HRESULT ChangeCase ( CLR_RT_StackFrame& stack, bool fToUpper ); - static HRESULT Substring ( CLR_RT_StackFrame& stack, int startIndex, int count ); + static const int FIELD___value = 1; - static HRESULT Trim( CLR_RT_StackFrame& stack, CLR_RT_HeapBlock_Array* arrayTrimChars, bool fStart, bool fEnd ); - - static HRESULT Split( CLR_RT_StackFrame& stack, CLR_RT_HeapBlock& chars, int maxStrings ); //--// - static HRESULT Concat( CLR_RT_StackFrame& stack, CLR_RT_HeapBlock* array, int num ); - - static HRESULT ConvertToCharArray( CLR_RT_StackFrame& stack, CLR_RT_HeapBlock& ref, CLR_RT_HeapBlock_Array*& array, int startIndex, int length ); - static HRESULT ConvertToCharArray( const char* szText , CLR_RT_HeapBlock& ref, CLR_RT_HeapBlock_Array*& array, int startIndex, int length ); }; -struct Library_corlib_native_System_Threading_WaitHandle +struct Library_corlib_native_System_Threading_AutoResetEvent { - NANOCLR_NATIVE_DECLARE(WaitOne___BOOLEAN__I4__BOOLEAN); - NANOCLR_NATIVE_DECLARE(WaitMultiple___STATIC__I4__SZARRAY_SystemThreadingWaitHandle__I4__BOOLEAN__BOOLEAN); - - //--// - - static void Set ( CLR_RT_StackFrame& stack ); - static void Reset( CLR_RT_StackFrame& stack ); - static HRESULT Wait( CLR_RT_StackFrame& stack, CLR_RT_HeapBlock& blkTimeout, CLR_RT_HeapBlock& blkExitContext, CLR_RT_HeapBlock* objects, int cObjects, bool fWaitAll ); -}; -struct Library_corlib_native_System_Threading_AutoResetEvent -{ NANOCLR_NATIVE_DECLARE(_ctor___VOID__BOOLEAN); NANOCLR_NATIVE_DECLARE(Reset___BOOLEAN); NANOCLR_NATIVE_DECLARE(Set___BOOLEAN); @@ -836,6 +1008,8 @@ struct Library_corlib_native_System_Threading_AutoResetEvent struct Library_corlib_native_System_Threading_Interlocked { + + NANOCLR_NATIVE_DECLARE(Increment___STATIC__I4__BYREF_I4); NANOCLR_NATIVE_DECLARE(Decrement___STATIC__I4__BYREF_I4); NANOCLR_NATIVE_DECLARE(Exchange___STATIC__I4__BYREF_I4__I4); @@ -847,6 +1021,8 @@ struct Library_corlib_native_System_Threading_Interlocked struct Library_corlib_native_System_Threading_ManualResetEvent { + + NANOCLR_NATIVE_DECLARE(_ctor___VOID__BOOLEAN); NANOCLR_NATIVE_DECLARE(Reset___BOOLEAN); NANOCLR_NATIVE_DECLARE(Set___BOOLEAN); @@ -857,6 +1033,8 @@ struct Library_corlib_native_System_Threading_ManualResetEvent struct Library_corlib_native_System_Threading_Monitor { + + NANOCLR_NATIVE_DECLARE(Enter___STATIC__VOID__OBJECT); NANOCLR_NATIVE_DECLARE(Exit___STATIC__VOID__OBJECT); @@ -866,6 +1044,7 @@ struct Library_corlib_native_System_Threading_Monitor struct Library_corlib_native_System_Threading_Thread { + static const int FIELD___delegate = 1; static const int FIELD___priority = 2; static const int FIELD___thread = 3; @@ -887,9 +1066,9 @@ struct Library_corlib_native_System_Threading_Thread NANOCLR_NATIVE_DECLARE(get_ThreadState___SystemThreadingThreadState); NANOCLR_NATIVE_DECLARE(Sleep___STATIC__VOID__I4); NANOCLR_NATIVE_DECLARE(get_CurrentThread___STATIC__SystemThreadingThread); -#if (NANOCLR_REFLECTION == TRUE) + #if (NANOCLR_REFLECTION == TRUE) NANOCLR_NATIVE_DECLARE(GetDomain___STATIC__SystemAppDomain); -#endif // NANOCLR_REFLECTION + #endif // NANOCLR_REFLECTION //--// @@ -901,9 +1080,30 @@ struct Library_corlib_native_System_Threading_Thread static HRESULT Join( CLR_RT_StackFrame& stack, const CLR_INT64& timeExpire ); }; +struct Library_corlib_native_System_Threading_ThreadPriority +{ + + static const int FIELD__value__ = 1; + + + //--// + +}; + +struct Library_corlib_native_System_Threading_ThreadState +{ + + static const int FIELD__value__ = 1; + + + //--// + +}; + struct Library_corlib_native_System_Threading_Timeout { - static const int FIELD_STATIC__InfiniteTimeSpan = 7; + static const int FIELD_STATIC__InfiniteTimeSpan = 10; + //--// @@ -912,6 +1112,7 @@ struct Library_corlib_native_System_Threading_Timeout struct Library_corlib_native_System_Threading_Timer { + static const int FIELD___timer = 1; static const int FIELD___state = 2; static const int FIELD___callback = 3; @@ -928,43 +1129,34 @@ struct Library_corlib_native_System_Threading_Timer static bool CheckDisposed( CLR_RT_StackFrame& stack ); }; -struct Library_corlib_native_System_TimeSpan +struct Library_corlib_native_System_Threading_WaitHandle { - static const int FIELD_STATIC__Zero = 8; - static const int FIELD_STATIC__MaxValue = 9; - static const int FIELD_STATIC__MinValue = 10; - static const int FIELD___ticks = 1; - NANOCLR_NATIVE_DECLARE(Equals___BOOLEAN__OBJECT); - NANOCLR_NATIVE_DECLARE(ToString___STRING); - NANOCLR_NATIVE_DECLARE(_ctor___VOID__I4__I4__I4); - NANOCLR_NATIVE_DECLARE(_ctor___VOID__I4__I4__I4__I4); - NANOCLR_NATIVE_DECLARE(_ctor___VOID__I4__I4__I4__I4__I4); - NANOCLR_NATIVE_DECLARE(CompareTo___I4__OBJECT); - NANOCLR_NATIVE_DECLARE(Compare___STATIC__I4__SystemTimeSpan__SystemTimeSpan); - NANOCLR_NATIVE_DECLARE(Equals___STATIC__BOOLEAN__SystemTimeSpan__SystemTimeSpan); + NANOCLR_NATIVE_DECLARE(WaitOne___BOOLEAN__I4__BOOLEAN); + NANOCLR_NATIVE_DECLARE(WaitMultiple___STATIC__I4__SZARRAY_SystemThreadingWaitHandle__I4__BOOLEAN__BOOLEAN); //--// - static CLR_INT64* NewObject ( CLR_RT_StackFrame& stack ); - static CLR_INT64* GetValuePtr( CLR_RT_StackFrame& stack ); - static CLR_INT64* GetValuePtr( CLR_RT_HeapBlock& ref ); - - static void ConstructTimeSpan( CLR_INT64* val, CLR_INT32 days, CLR_INT32 hours, CLR_INT32 minutes, CLR_INT32 seconds, CLR_INT32 ms ); + static void Set ( CLR_RT_StackFrame& stack ); + static void Reset( CLR_RT_StackFrame& stack ); + + static HRESULT Wait( CLR_RT_StackFrame& stack, CLR_RT_HeapBlock& blkTimeout, CLR_RT_HeapBlock& blkExitContext, CLR_RT_HeapBlock* objects, int cObjects, bool fWaitAll ); }; -struct Library_corlib_native_System_UInt16 +struct Library_corlib_native_System_TypeCode { - static const int FIELD___value = 1; + + static const int FIELD__value__ = 1; //--// }; -struct Library_corlib_native_System_UInt32 +struct Library_corlib_native_System_UInt64 { + static const int FIELD___value = 1; @@ -972,17 +1164,19 @@ struct Library_corlib_native_System_UInt32 }; -struct Library_corlib_native_System_UInt64 +struct Library_corlib_native_System_ValueType { - static const int FIELD___value = 1; + NANOCLR_NATIVE_DECLARE(Equals___BOOLEAN__OBJECT); + //--// }; struct Library_corlib_native_System_Version { + static const int FIELD___Major = 1; static const int FIELD___Minor = 2; static const int FIELD___Build = 3; @@ -995,6 +1189,8 @@ struct Library_corlib_native_System_Version struct Library_corlib_native_System_WeakReference { + + NANOCLR_NATIVE_DECLARE(get_IsAlive___BOOLEAN); NANOCLR_NATIVE_DECLARE(get_Target___OBJECT); NANOCLR_NATIVE_DECLARE(set_Target___VOID__OBJECT); @@ -1004,28 +1200,6 @@ struct Library_corlib_native_System_WeakReference }; -struct Library_corlib_native_System_Array__SzArrayEnumerator -{ - static const int FIELD___array = 1; - static const int FIELD___index = 2; - static const int FIELD___endIndex = 3; - static const int FIELD___startIndex = 4; - static const int FIELD___arrayLength = 5; - - - //--// - -}; - -struct Library_corlib_native_System_Collections_Hashtable__ValueCollection -{ - static const int FIELD__ht = 1; - - - //--// - -}; - extern const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_mscorlib; #endif //_CORLIB_NATIVE_H_ diff --git a/src/CLR/CorLib/corlib_native_System_Reflection_FieldInfo.cpp b/src/CLR/CorLib/corlib_native_System_Reflection_FieldInfo.cpp index c6a2a0d278..a6eef6228e 100644 --- a/src/CLR/CorLib/corlib_native_System_Reflection_FieldInfo.cpp +++ b/src/CLR/CorLib/corlib_native_System_Reflection_FieldInfo.cpp @@ -121,7 +121,7 @@ HRESULT Library_corlib_native_System_Reflection_FieldInfo::Initialize( CLR_RT_St NANOCLR_NOCLEANUP(); } -HRESULT Library_corlib_native_System_Reflection_FieldInfo::GetCustomAttributes___SZARRAY_OBJECT__BOOLEAN( CLR_RT_StackFrame& stack ) +HRESULT Library_corlib_native_System_Reflection_FieldInfo::GetCustomAttributesNative___SZARRAY_OBJECT__BOOLEAN( CLR_RT_StackFrame& stack ) { NANOCLR_HEADER(); @@ -142,6 +142,10 @@ HRESULT Library_corlib_native_System_Reflection_FieldInfo::GetCustomAttributes__ CLR_RT_AttributeEnumerator attributeEnumerator; attributeEnumerator.Initialize( fieldDefinition ); + // the return array has two positions for each attribute: + // 1st: the attribute type + // 2nd: the constructor parameters or NULL, if the attribute has no constructor + // 1st pass: count attributes do { @@ -155,10 +159,14 @@ HRESULT Library_corlib_native_System_Reflection_FieldInfo::GetCustomAttributes__ // done sweeping attributes // create the result array - NANOCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance( top, count, g_CLR_RT_WellKnownTypes.m_TypeStatic )); + // (2 positions for each attribute) + NANOCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance( top, ( count * 2 ), g_CLR_RT_WellKnownTypes.m_Object )); - // use this to skip the 2nd pass if no attribute was found - if (count == 0) break; + // use this to skip to the 2nd pass if no attribute was found + if (count == 0) + { + break; + } // get the pointer to the first element returnArray = (CLR_RT_HeapBlock*)top.DereferenceArray()->GetFirstElement(); @@ -174,23 +182,68 @@ HRESULT Library_corlib_native_System_Reflection_FieldInfo::GetCustomAttributes__ // 2nd pass: fill the array with the attributes types, if any while(count > 0) { - // move to the next attribute in the collection, if any + // move to the next attribute in the collection, if there is another if(attributeEnumerator.Advance()) { CLR_RT_TypeDef_Instance instanceTypeDef; - CLR_RT_HeapBlock* hbObj; // get the type def for the current attribute attributeEnumerator.GetCurrent(&instanceTypeDef); - CLR_RT_TypeDef_Index attributeType; - attributeType.Set(instanceTypeDef.Assembly(), instanceTypeDef.Type()); - - // create a new object for the attribute type and put it on the return array - NANOCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewObjectFromIndex(*returnArray, g_CLR_RT_WellKnownTypes.m_TypeStatic)); - hbObj = returnArray->Dereference(); - // make sure the reflection is pointing to the attribute type - hbObj->SetReflection( attributeType ); + // setup attribute parser + CLR_RT_AttributeParser parser; + NANOCLR_CHECK_HRESULT(parser.Initialize( attributeEnumerator )); + + while(true) + { + CLR_RT_AttributeParser::Value* val; + + // parse next attribute, if there is another + NANOCLR_CHECK_HRESULT(parser.Next( val )); + + if(val == NULL) + { + break; + } + else + { + // check if this attribute has a default constructor or one with argument + if(val->m_mode == CLR_RT_AttributeParser::Value::c_DefaultConstructor) + { + // default constructor here + + // get attribute type + returnArray->LoadFromReference(val->m_value); + + // no parameters for the constructor + returnArray++; + + // set next position to NULL + returnArray->SetObjectReference( NULL ); + } + else if(val->m_mode == CLR_RT_AttributeParser::Value::c_ConstructorArgument) + { + // constructor with argument + + // get the type for the class object + CLR_RT_MethodDef_Index md ; md.Set( parser.m_assm->m_idx, parser.m_mdIdx.Method() ); + CLR_RT_MethodDef_Instance mdInst; mdInst.InitializeFromIndex( md ); + + CLR_RT_TypeDef_Instance cls; + if(cls.InitializeFromMethod( mdInst ) == false) NANOCLR_SET_AND_LEAVE(CLR_E_WRONG_TYPE); + + // create a new object for the attribute type and put it on the return array + NANOCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewObject(*returnArray, cls)); + + // now the constructor parameter(s) + returnArray++; + + // load the constructor parameter + // TODO: improve this to be able to handle constuctors with multiple parameters + returnArray->LoadFromReference(val->m_value); + } + } + } returnArray++; count--; diff --git a/src/CLR/CorLib/corlib_native_System_Reflection_RuntimeMethodInfo.cpp b/src/CLR/CorLib/corlib_native_System_Reflection_RuntimeMethodInfo.cpp index 1a0e61763d..4ef4e618ea 100644 --- a/src/CLR/CorLib/corlib_native_System_Reflection_RuntimeMethodInfo.cpp +++ b/src/CLR/CorLib/corlib_native_System_Reflection_RuntimeMethodInfo.cpp @@ -75,7 +75,7 @@ HRESULT Library_corlib_native_System_Reflection_RuntimeMethodInfo::GetCustomAttr // done sweeping attributes // create the result array - NANOCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance( top, count, g_CLR_RT_WellKnownTypes.m_TypeStatic )); + NANOCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance( top, count, g_CLR_RT_WellKnownTypes.m_Object )); // use this to skip the 2nd pass if no attribute was found if (count == 0) break; @@ -98,7 +98,6 @@ HRESULT Library_corlib_native_System_Reflection_RuntimeMethodInfo::GetCustomAttr if(attributeEnumerator.Advance()) { CLR_RT_TypeDef_Instance instanceTypeDef; - CLR_RT_HeapBlock* hbObj; // get the type def for the current attribute attributeEnumerator.GetCurrent(&instanceTypeDef); @@ -107,10 +106,7 @@ HRESULT Library_corlib_native_System_Reflection_RuntimeMethodInfo::GetCustomAttr attributeType.Set(instanceTypeDef.Assembly(), instanceTypeDef.Type()); // create a new object for the attribute type and put it on the return array - NANOCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewObjectFromIndex(*returnArray, g_CLR_RT_WellKnownTypes.m_TypeStatic)); - hbObj = returnArray->Dereference(); - // make sure the reflection is pointing to the attribute type - hbObj->SetReflection( attributeType ); + NANOCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewObjectFromIndex(*returnArray, attributeType)); returnArray++; count--; diff --git a/src/CLR/CorLib/corlib_native_System_RuntimeType.cpp b/src/CLR/CorLib/corlib_native_System_RuntimeType.cpp index 02fa4bad67..9694d946e7 100644 --- a/src/CLR/CorLib/corlib_native_System_RuntimeType.cpp +++ b/src/CLR/CorLib/corlib_native_System_RuntimeType.cpp @@ -249,7 +249,6 @@ HRESULT Library_corlib_native_System_RuntimeType::GetCustomAttributes___SZARRAY_ CLR_RT_HeapBlock* callerType = NULL; CLR_RT_TypeDef_Instance instanceTypeDef; CLR_RT_TypeDef_Instance typeDefinition; - CLR_RT_HeapBlock* hbObj; int count = 0; // put the return array on the stack @@ -277,7 +276,7 @@ HRESULT Library_corlib_native_System_RuntimeType::GetCustomAttributes___SZARRAY_ // done sweeping attributes // create the result array - NANOCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance( top, count, g_CLR_RT_WellKnownTypes.m_TypeStatic )); + NANOCLR_CHECK_HRESULT(CLR_RT_HeapBlock_Array::CreateInstance( top, count, g_CLR_RT_WellKnownTypes.m_Object )); // use this to skip the 2nd pass if no attribute was found if (count == 0) break; @@ -306,10 +305,7 @@ HRESULT Library_corlib_native_System_RuntimeType::GetCustomAttributes___SZARRAY_ attributeType.Set(instanceTypeDef.Assembly(), instanceTypeDef.Type()); // create a new object for the attribute type and put it on the return array - NANOCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewObjectFromIndex(*returnArray, g_CLR_RT_WellKnownTypes.m_TypeStatic)); - hbObj = returnArray->Dereference(); - // make sure the reflection is pointing to the attribute type - hbObj->SetReflection( attributeType ); + NANOCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewObjectFromIndex(*returnArray, attributeType)); returnArray++; count--; diff --git a/src/CLR/Core/TypeSystem.cpp b/src/CLR/Core/TypeSystem.cpp index 59a076292a..031235be3b 100644 --- a/src/CLR/Core/TypeSystem.cpp +++ b/src/CLR/Core/TypeSystem.cpp @@ -4299,6 +4299,8 @@ HRESULT CLR_RT_AttributeParser::Initialize( const CLR_RT_AttributeEnumerator& en m_currentPos = 0; m_fixed_Count = m_md.m_target->numArgs - 1; m_named_Count = -1; + m_constructorParsed = false; + m_mdIdx = en.m_match; NANOCLR_NOCLEANUP(); } @@ -4313,18 +4315,79 @@ HRESULT CLR_RT_AttributeParser::Next( Value*& res ) NANOCLR_READ_UNALIGNED_UINT16(m_named_Count,m_blob); } - if(m_currentPos < m_fixed_Count) + if( m_fixed_Count == 0 && + m_named_Count == 0 && + !m_constructorParsed ) { + // Attribute class has no fields, no properties and only default constructor + + m_lastValue.m_mode = Value::c_DefaultConstructor; + m_lastValue.m_name = NULL; + + NANOCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewObject( m_lastValue.m_value, m_td )); + + res = &m_lastValue; + + m_constructorParsed = true; + + NANOCLR_SET_AND_LEAVE(S_OK); + + } + else if((m_currentPos < m_fixed_Count) && + !m_constructorParsed ) + { + // Attribute class has a constructor + m_lastValue.m_mode = Value::c_ConstructorArgument; m_lastValue.m_name = NULL; + //////////////////////////////////////////////// + // need to read the arguments from the blob + + NANOCLR_CHECK_HRESULT(m_parser.Advance( m_res )); // - // attribute contructor support is currently not implemented + // Skip value info. // - NANOCLR_SET_AND_LEAVE(CLR_E_NOT_SUPPORTED); + m_blob += sizeof(CLR_UINT8); + + const CLR_RT_DataTypeLookup& dtl = c_CLR_RT_DataTypeLookup[ m_res.m_dt ]; + + if(dtl.m_flags & CLR_RT_DataTypeLookup::c_Numeric) + { + // size of value + CLR_UINT32 size = dtl.m_sizeInBytes; + + NANOCLR_CHECK_HRESULT(g_CLR_RT_ExecutionEngine.NewObjectFromIndex(m_lastValue.m_value, g_CLR_RT_WellKnownTypes.m_TypeStatic)); + + // need to setup reflection and data type Id to properly setup the object + m_lastValue.m_value.SetReflection(*dtl.m_cls); + + m_lastValue.m_value.SetDataId( CLR_RT_HEAPBLOCK_RAW_ID(m_res.m_dt, 0, 1) ); + + // because this is a numeric object, performa a raw copy of the numeric value data from the blob to the return value + memcpy( (CLR_UINT8*)&m_lastValue.m_value.NumericByRef(), m_blob, size ); m_blob += size; + } + else if(m_res.m_dt == DATATYPE_STRING) + { + CLR_UINT32 tk; NANOCLR_READ_UNALIGNED_UINT16(tk,m_blob); + + CLR_RT_HeapBlock_String::CreateInstance( m_lastValue.m_value, CLR_TkFromType( TBL_Strings, tk ), m_assm ); + } + else + { + NANOCLR_SET_AND_LEAVE(CLR_E_WRONG_TYPE); + } + + res = &m_lastValue; + + m_constructorParsed = true; + + NANOCLR_SET_AND_LEAVE(S_OK); } else if(m_currentPos < m_fixed_Count + m_named_Count) { + // Attribute class has named fields + CLR_UINT32 kind; NANOCLR_READ_UNALIGNED_UINT8(kind,m_blob); m_lastValue.m_name = GetString(); @@ -4347,7 +4410,9 @@ HRESULT CLR_RT_AttributeParser::Next( Value*& res ) m_lastValue.m_mode = Value::c_NamedProperty; // - //attribute contructor support is currently not implemented + // it's supposed to reach here when there is an attribute contructor + // but that is already handled upwards + // leaving this here waiting for a special case that hits here (if there is one...) // NANOCLR_SET_AND_LEAVE(CLR_E_NOT_SUPPORTED); } @@ -4358,7 +4423,6 @@ HRESULT CLR_RT_AttributeParser::Next( Value*& res ) NANOCLR_SET_AND_LEAVE(S_OK); } - NANOCLR_CHECK_HRESULT(m_parser.Advance( m_res )); res = &m_lastValue; @@ -4386,11 +4450,13 @@ HRESULT CLR_RT_AttributeParser::Next( Value*& res ) if(dtl.m_flags & CLR_RT_DataTypeLookup::c_Numeric) { + // need to setup reflection and data type Id to properly setup the object + m_lastValue.m_value.SetReflection(m_res.m_cls); + m_lastValue.m_value.SetDataId( CLR_RT_HEAPBLOCK_RAW_ID(m_res.m_dt, 0, 1) ); - CLR_UINT32 size = (dtl.m_sizeInBits + 7) / 8; + CLR_UINT32 size = dtl.m_sizeInBytes; -// FIXME GJS - the numeric values, what is their endiannes??? In the MSTV code there is a BIG endian fix but it looks like it will not work, so was it ever used? memcpy( &m_lastValue.m_value.NumericByRef(), m_blob, size ); m_blob += size; } else if(m_res.m_dt == DATATYPE_STRING) @@ -4417,4 +4483,3 @@ const char* CLR_RT_AttributeParser::GetString() return m_assm->GetString( tk ); } - diff --git a/src/CLR/Include/nanoCLR_Runtime.h b/src/CLR/Include/nanoCLR_Runtime.h index d880e75ab1..639f6f64ee 100644 --- a/src/CLR/Include/nanoCLR_Runtime.h +++ b/src/CLR/Include/nanoCLR_Runtime.h @@ -1629,12 +1629,13 @@ struct CLR_RT_AttributeParser static const int c_ConstructorArgument = 1; static const int c_NamedField = 2; static const int c_NamedProperty = 3; + static const int c_DefaultConstructor = 4; int m_mode; CLR_RT_HeapBlock m_value; int m_pos; - const char* m_name; + const char* m_name; }; //--// @@ -1643,6 +1644,7 @@ struct CLR_RT_AttributeParser CLR_PMETADATA m_blob; CLR_RT_MethodDef_Instance m_md; + CLR_RT_MethodDef_Index m_mdIdx; CLR_RT_TypeDef_Instance m_td; CLR_RT_SignatureParser m_parser; CLR_RT_SignatureParser::Element m_res; @@ -1651,6 +1653,7 @@ struct CLR_RT_AttributeParser int m_fixed_Count; int m_named_Count; Value m_lastValue; + bool m_constructorParsed; //--//