You've already forked linux-packaging-mono
Imported Upstream version 5.14.0.78
Former-commit-id: 3494343bcc9ddb42b36b82dd9ae7b69e85e0229f
This commit is contained in:
parent
74b74abd9f
commit
19234507ba
@@ -79,8 +79,6 @@ using System.Runtime.InteropServices;
|
||||
[assembly: InternalsVisibleTo ("System.Runtime.WindowsRuntime, PublicKey=00000000000000000400000000000000")]
|
||||
[assembly: InternalsVisibleTo ("System.Runtime.WindowsRuntime.UI.Xaml, PublicKey=00000000000000000400000000000000")]
|
||||
|
||||
[assembly: InternalsVisibleTo ("System.Runtime.InteropServices.RuntimeInformation, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
|
||||
|
||||
#if MONOTOUCH
|
||||
#if MONOTOUCH_TV
|
||||
[assembly: InternalsVisibleTo ("Xamarin.TVOS, PublicKey=0024000004800000940000000602000000240000525341310004000011000000438ac2a5acfbf16cbd2b2b47a62762f273df9cb2795ceccdf77d10bf508e69e7a362ea7a45455bbf3ac955e1f2e2814f144e5d817efc4c6502cc012df310783348304e3ae38573c6d658c234025821fda87a0be8a0d504df564e2c93b2b878925f42503e9d54dfef9f9586d9e6f38a305769587b1de01f6c0410328b2c9733db")]
|
||||
|
||||
@@ -252,10 +252,6 @@
|
||||
<type fullname="System.MissingMethodException">
|
||||
<!-- mini.c (mono_jit_compiler_method_inner) mono_exception_from_name_msg -->
|
||||
<method signature="System.Void .ctor(System.String)" />
|
||||
<!-- exception.c (mono_get_exception_type_load) mono_exception_from_name_two_strings -->
|
||||
<method signature="System.Void .ctor(System.String,System.String)" />
|
||||
<!-- exception.c mono_exception_from_name_four_strings -->
|
||||
<method signature="System.Void .ctor(System.String,System.String,System.String,System.String)" />
|
||||
</type>
|
||||
|
||||
<!-- threadpool.c: mono_thread_pool_init (assert) -->
|
||||
@@ -296,6 +292,9 @@
|
||||
<method name="Box" />
|
||||
<!-- method-to-ir.c (handle_unbox_nullable) -->
|
||||
<method name="Unbox" />
|
||||
<!-- method-to-ir.c (handle_unbox_nullable) -->
|
||||
<method name="UnboxExact" />
|
||||
|
||||
</type>
|
||||
|
||||
<!-- domain.c: mono_defaults.object_class -->
|
||||
|
||||
@@ -8,6 +8,7 @@ LIBRARY_NAME = mscorlib.dll
|
||||
|
||||
LIB_MCS_FLAGS = $(REFERENCE_SOURCES_FLAGS) $(RESOURCE_FILES:%=-resource:%)
|
||||
|
||||
USE_XTEST_REMOTE_EXECUTOR = YES
|
||||
LIBRARY_WARN_AS_ERROR = yes
|
||||
#LIBRARY_USE_INTERMEDIATE_FILE = yes
|
||||
|
||||
@@ -30,6 +31,7 @@ RESX_RESOURCE_STRING = \
|
||||
../../../external/corefx/src/System.Collections.Concurrent/src/Resources/Strings.resx \
|
||||
../../../external/corefx/src/System.Memory/src/Resources/Strings.resx \
|
||||
../../../external/corefx/src/System.Runtime.InteropServices.RuntimeInformation/src/Resources/Strings.resx \
|
||||
../../../external/corefx/src/System.Threading.Tasks.Parallel/src/Resources/Strings.resx \
|
||||
|
||||
LIBRARY_COMPILE = $(BOOT_COMPILE)
|
||||
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
|
||||
@@ -208,9 +210,6 @@ $(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe: $(vtsdir)/Bina
|
||||
$(vtsdir)/BinarySerializationOverVersions.cs -out:$@
|
||||
@cp $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll $(vtsdir)/$(PROFILE)_TestLib
|
||||
|
||||
# Need to define TEST_MONO_PATH to an absolute dir since the test is ran from a subdir
|
||||
TEST_MONO_PATH=$(PWD)/../lib/$(PROFILE)
|
||||
|
||||
run-test-vts: test-vts
|
||||
@echo Running vts tests...
|
||||
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" $(TEST_RUNTIME) $(TEST_RUNTIME_FLAGS) $(TEST_HARNESS) $(NOSHADOW_FLAG) \
|
||||
|
||||
@@ -77,13 +77,14 @@ namespace Mono.Globalization.Unicode
|
||||
{
|
||||
internal class SimpleCollator
|
||||
{
|
||||
/*
|
||||
// this environment variable is for debugging quick check.
|
||||
#pragma warning disable 169, 414
|
||||
static bool QuickCheckDisabled =
|
||||
Environment.internalGetEnvironmentVariable (
|
||||
"MONO_COLLATION_QUICK_CHECK_DISABLED") == "yes";
|
||||
#pragma warning restore 169, 414
|
||||
|
||||
*/
|
||||
unsafe internal struct Context
|
||||
{
|
||||
public Context (CompareOptions opt, byte* alwaysMatchFlags, byte* neverMatchFlags, byte* buffer1, byte* buffer2, byte* prev1/*, bool quickCheckPossible*/)
|
||||
@@ -1660,7 +1661,7 @@ Console.WriteLine ("==== {0} {1} {2} {3} {4} {5} {6} {7} {8}", s, si, send, leng
|
||||
public unsafe int LastIndexOf (string s, string target, int start, int length, CompareOptions opt)
|
||||
{
|
||||
if (opt == CompareOptions.Ordinal)
|
||||
return LastIndexOfOrdinal (s, target, start, length);
|
||||
throw new NotSupportedException ("Should not be reached");
|
||||
if (opt == CompareOptions.OrdinalIgnoreCase)
|
||||
throw new NotSupportedException ("Should not be reached");
|
||||
byte* alwaysMatchFlags = stackalloc byte [16];
|
||||
|
||||
@@ -91,6 +91,11 @@ namespace System.Globalization
|
||||
this.options = opt;
|
||||
}
|
||||
|
||||
internal SortKey (String localeName, String str, CompareOptions options, byte[] keyData)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
public virtual string OriginalString {
|
||||
get { return source; }
|
||||
}
|
||||
|
||||
@@ -181,34 +181,39 @@ namespace System
|
||||
((byte*)dest) [0] = ((byte*)src) [0];
|
||||
}
|
||||
|
||||
internal static unsafe void Memcpy (byte *dest, byte *src, int size) {
|
||||
internal static unsafe void Memcpy (byte *dest, byte *src, int len) {
|
||||
// FIXME: if pointers are not aligned, try to align them
|
||||
// so a faster routine can be used. Handle the case where
|
||||
// the pointers can't be reduced to have the same alignment
|
||||
// (just ignore the issue on x86?)
|
||||
if ((((int)dest | (int)src) & 3) != 0) {
|
||||
if (((int)dest & 1) != 0 && ((int)src & 1) != 0 && size >= 1) {
|
||||
if (((int)dest & 1) != 0 && ((int)src & 1) != 0 && len >= 1) {
|
||||
dest [0] = src [0];
|
||||
++dest;
|
||||
++src;
|
||||
--size;
|
||||
--len;
|
||||
}
|
||||
if (((int)dest & 2) != 0 && ((int)src & 2) != 0 && size >= 2) {
|
||||
if (((int)dest & 2) != 0 && ((int)src & 2) != 0 && len >= 2) {
|
||||
((short*)dest) [0] = ((short*)src) [0];
|
||||
dest += 2;
|
||||
src += 2;
|
||||
size -= 2;
|
||||
len -= 2;
|
||||
}
|
||||
if ((((int)dest | (int)src) & 1) != 0) {
|
||||
memcpy1 (dest, src, size);
|
||||
memcpy1 (dest, src, len);
|
||||
return;
|
||||
}
|
||||
if ((((int)dest | (int)src) & 2) != 0) {
|
||||
memcpy2 (dest, src, size);
|
||||
memcpy2 (dest, src, len);
|
||||
return;
|
||||
}
|
||||
}
|
||||
memcpy4 (dest, src, size);
|
||||
memcpy4 (dest, src, len);
|
||||
}
|
||||
|
||||
internal static unsafe void Memmove (byte *dest, byte *src, uint len)
|
||||
{
|
||||
Memcpy (dest, src, (int) len);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -64,9 +64,9 @@ namespace System.Globalization
|
||||
}
|
||||
|
||||
lock (collators) {
|
||||
if (!collators.TryGetValue (m_sortName, out collator)) {
|
||||
if (!collators.TryGetValue (_sortName, out collator)) {
|
||||
collator = new SimpleCollator (CultureInfo.GetCultureInfo (m_name));
|
||||
collators [m_sortName] = collator;
|
||||
collators [_sortName] = collator;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,20 +88,11 @@ namespace System.Globalization
|
||||
return(key);
|
||||
}
|
||||
|
||||
int internal_index_switch (string s, int sindex, int count, char c, CompareOptions opt, bool first)
|
||||
{
|
||||
if (opt == CompareOptions.Ordinal && first)
|
||||
return s.IndexOfUnchecked (c, sindex, count);
|
||||
|
||||
return UseManagedCollation ?
|
||||
internal_index_managed (s, sindex, count, c, opt, first) :
|
||||
internal_index (s, sindex, count, c, opt, first);
|
||||
}
|
||||
|
||||
int internal_index_switch (string s1, int sindex, int count, string s2, CompareOptions opt, bool first)
|
||||
{
|
||||
if (opt == CompareOptions.Ordinal && first)
|
||||
return s1.IndexOfUnchecked (s2, sindex, count);
|
||||
// TODO: should not be needed, why is there specialization for OrdinalIgnore and not for Ordinal
|
||||
if (opt == CompareOptions.Ordinal)
|
||||
return first ? s1.IndexOfUnchecked (s2, sindex, count) : s1.LastIndexOfUnchecked (s2, sindex, count);
|
||||
|
||||
return UseManagedCollation ?
|
||||
internal_index_managed (s1, sindex, count, s2, opt, first) :
|
||||
|
||||
@@ -30,15 +30,15 @@ namespace System.Reflection
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
internal virtual int get_next_table_index (object obj, int table, bool inc) {
|
||||
internal virtual int get_next_table_index (object obj, int table, int count) {
|
||||
#if !FULL_AOT_RUNTIME
|
||||
if (this is MethodBuilder) {
|
||||
MethodBuilder mb = (MethodBuilder)this;
|
||||
return mb.get_next_table_index (obj, table, inc);
|
||||
return mb.get_next_table_index (obj, table, count);
|
||||
}
|
||||
if (this is ConstructorBuilder) {
|
||||
ConstructorBuilder mb = (ConstructorBuilder)this;
|
||||
return mb.get_next_table_index (obj, table, inc);
|
||||
return mb.get_next_table_index (obj, table, count);
|
||||
}
|
||||
#endif
|
||||
throw new Exception ("Method is not a builder method");
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace System
|
||||
return m_serializationCtor;
|
||||
}
|
||||
|
||||
internal Object CreateInstanceSlow(bool publicOnly, bool skipCheckThis, bool fillCache, ref StackCrawlMark stackMark)
|
||||
internal Object CreateInstanceSlow(bool publicOnly, bool wrapExceptions, bool skipCheckThis, bool fillCache, ref StackCrawlMark stackMark)
|
||||
{
|
||||
//bool bNeedSecurityCheck = true;
|
||||
//bool bCanBeCached = false;
|
||||
@@ -150,10 +150,10 @@ namespace System
|
||||
//if (!fillCache)
|
||||
// bSecurityCheckOff = true;
|
||||
|
||||
return CreateInstanceMono (!publicOnly);
|
||||
return CreateInstanceMono (!publicOnly, wrapExceptions);
|
||||
}
|
||||
|
||||
object CreateInstanceMono (bool nonPublic)
|
||||
object CreateInstanceMono (bool nonPublic, bool wrapExceptions)
|
||||
{
|
||||
var ctor = GetDefaultConstructor ();
|
||||
if (!nonPublic && ctor != null && !ctor.IsPublic) {
|
||||
@@ -176,7 +176,7 @@ namespace System
|
||||
throw new MissingMethodException (Locale.GetText ("Cannot create an abstract class '{0}'.", FullName));
|
||||
}
|
||||
|
||||
return ctor.InternalInvoke (null, null);
|
||||
return ctor.InternalInvoke (null, null, wrapExceptions);
|
||||
}
|
||||
|
||||
internal Object CheckValue (Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr)
|
||||
@@ -465,7 +465,7 @@ namespace System
|
||||
{
|
||||
var gt = (RuntimeType) MakeGenericType (genericType, new Type [] { genericArgument });
|
||||
var ctor = gt.GetDefaultConstructor ();
|
||||
return ctor.InternalInvoke (null, null);
|
||||
return ctor.InternalInvoke (null, null, wrapExceptions: true);
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -115,6 +115,8 @@ namespace System.Globalization
|
||||
internal const int InvariantCultureId = 0x7F;
|
||||
const int CalendarTypeBits = 8;
|
||||
|
||||
internal const int LOCALE_INVARIANT = 0x007F;
|
||||
|
||||
const string MSG_READONLY = "This instance is read only";
|
||||
|
||||
static volatile CultureInfo s_DefaultThreadCurrentUICulture;
|
||||
@@ -180,6 +182,8 @@ namespace System.Globalization
|
||||
get { return territory; }
|
||||
}
|
||||
|
||||
internal string _name => m_name;
|
||||
|
||||
// FIXME: It is implemented, but would be hell slow.
|
||||
[ComVisible (false)]
|
||||
public CultureTypes CultureTypes {
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace System.Reflection.Emit {
|
||||
type = tb;
|
||||
this.paramModReq = paramModReq;
|
||||
this.paramModOpt = paramModOpt;
|
||||
table_idx = get_next_table_index (this, 0x06, true);
|
||||
table_idx = get_next_table_index (this, 0x06, 1);
|
||||
|
||||
((ModuleBuilder) tb.Module).RegisterToken (this, GetToken ().Token);
|
||||
}
|
||||
@@ -396,9 +396,9 @@ namespace System.Reflection.Emit {
|
||||
}
|
||||
}
|
||||
|
||||
internal override int get_next_table_index (object obj, int table, bool inc)
|
||||
internal override int get_next_table_index (object obj, int table, int count)
|
||||
{
|
||||
return type.get_next_table_index (obj, table, inc);
|
||||
return type.get_next_table_index (obj, table, count);
|
||||
}
|
||||
|
||||
private void RejectIfCreated ()
|
||||
|
||||
@@ -296,7 +296,7 @@ namespace System.Reflection.Emit {
|
||||
if (method == null)
|
||||
method = new MonoMethod (mhandle);
|
||||
|
||||
return method.Invoke (obj, parameters);
|
||||
return method.Invoke (obj, invokeAttr, binder, parameters, culture);
|
||||
}
|
||||
catch (MethodAccessException mae) {
|
||||
throw new TargetInvocationException ("Method cannot be invoked.", mae);
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
//
|
||||
// DynamicMethod.cs
|
||||
//
|
||||
// Authors:
|
||||
// Marek Safar (marek.safar@gmail.com)
|
||||
//
|
||||
// Copyright (C) 2016 Xamarin Inc (http://www.xamarin.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
#if FULL_AOT_RUNTIME
|
||||
|
||||
namespace System.Reflection.Emit
|
||||
{
|
||||
public abstract class DynamicMethod : MethodInfo, ICustomAttributeProvider
|
||||
{
|
||||
public DynamicMethod (string name, Type returnType, Type[] parameterTypes)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public DynamicMethod (string name, Type returnType, Type[] parameterTypes, bool restrictedSkipVisibility)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public DynamicMethod (string name, Type returnType, Type[] parameterTypes, Module m)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public DynamicMethod (string name, Type returnType, Type[] parameterTypes, Type owner)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public DynamicMethod (string name, Type returnType, Type[] parameterTypes, Module m, bool skipVisibility)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public DynamicMethod (string name, Type returnType, Type[] parameterTypes, Type owner, bool skipVisibility)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public DynamicMethod (string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes, Module m, bool skipVisibility)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public DynamicMethod (string name, MethodAttributes attributes, CallingConventions callingConvention, Type returnType, Type[] parameterTypes, Type owner, bool skipVisibility)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public override MethodAttributes Attributes {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public override CallingConventions CallingConvention {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public override Type DeclaringType {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public bool InitLocals { get; set; }
|
||||
|
||||
public override MethodImplAttributes MethodImplementationFlags {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public override string Name {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public override ParameterInfo ReturnParameter {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public override Type ReturnType {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public ILGenerator GetILGenerator ()
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public ILGenerator GetILGenerator (int streamSize)
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
public override ParameterInfo[] GetParameters ()
|
||||
{
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -63,11 +63,11 @@ namespace System.Reflection.Emit {
|
||||
attrs = eventAttrs;
|
||||
type = eventType;
|
||||
typeb = tb;
|
||||
table_idx = get_next_table_index (this, 0x14, true);
|
||||
table_idx = get_next_table_index (this, 0x14, 1);
|
||||
}
|
||||
|
||||
internal int get_next_table_index (object obj, int table, bool inc) {
|
||||
return typeb.get_next_table_index (obj, table, inc);
|
||||
internal int get_next_table_index (object obj, int table, int count) {
|
||||
return typeb.get_next_table_index (obj, table, count);
|
||||
}
|
||||
|
||||
public void AddOtherMethod( MethodBuilder mdBuilder) {
|
||||
|
||||
@@ -52,7 +52,6 @@ namespace System.Reflection.Emit {
|
||||
private String name;
|
||||
private object def_value;
|
||||
private int offset;
|
||||
private int table_idx;
|
||||
internal TypeBuilder typeb;
|
||||
private byte[] rva_data;
|
||||
private CustomAttributeBuilder[] cattrs;
|
||||
@@ -74,7 +73,6 @@ namespace System.Reflection.Emit {
|
||||
this.modOpt = modOpt;
|
||||
offset = -1;
|
||||
typeb = tb;
|
||||
table_idx = tb.get_next_table_index (this, 0x04, true);
|
||||
|
||||
((ModuleBuilder) tb.Module).RegisterToken (this, GetToken ().Token);
|
||||
}
|
||||
@@ -124,6 +122,8 @@ namespace System.Reflection.Emit {
|
||||
throw CreateNotSupportedException ();
|
||||
}
|
||||
|
||||
public override int MetadataToken { get { return ((ModuleBuilder) typeb.Module).GetToken (this); } }
|
||||
|
||||
public FieldToken GetToken() {
|
||||
return new FieldToken (MetadataToken);
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace System.Reflection.Emit
|
||||
System.Array.Copy (parameterTypes, this.parameters, parameterTypes.Length);
|
||||
}
|
||||
type = tb;
|
||||
table_idx = get_next_table_index (this, 0x06, true);
|
||||
table_idx = get_next_table_index (this, 0x06, 1);
|
||||
|
||||
((ModuleBuilder)tb.Module).RegisterToken (this, GetToken ().Token);
|
||||
}
|
||||
@@ -566,9 +566,9 @@ namespace System.Reflection.Emit
|
||||
return name.GetHashCode ();
|
||||
}
|
||||
|
||||
internal override int get_next_table_index (object obj, int table, bool inc)
|
||||
internal override int get_next_table_index (object obj, int table, int count)
|
||||
{
|
||||
return type.get_next_table_index (obj, table, inc);
|
||||
return type.get_next_table_index (obj, table, count);
|
||||
}
|
||||
|
||||
void ExtendArray<T> (ref T[] array, T elem) {
|
||||
|
||||
@@ -63,6 +63,7 @@ namespace System.Reflection.Emit {
|
||||
bool is_main;
|
||||
private MonoResource[] resources;
|
||||
private IntPtr unparented_classes;
|
||||
private int[] table_indexes;
|
||||
#endregion
|
||||
#pragma warning restore 169, 414
|
||||
|
||||
@@ -71,7 +72,6 @@ namespace System.Reflection.Emit {
|
||||
// name_cache keys are display names
|
||||
Dictionary<TypeName, TypeBuilder> name_cache;
|
||||
Dictionary<string, int> us_string_cache;
|
||||
private int[] table_indexes;
|
||||
bool transient;
|
||||
ModuleBuilderTokenGenerator token_gen;
|
||||
Hashtable resource_writers;
|
||||
@@ -93,7 +93,7 @@ namespace System.Reflection.Emit {
|
||||
// to keep mcs fast we do not want CryptoConfig wo be involved to create the RNG
|
||||
guid = Guid.FastNewGuidArray ();
|
||||
// guid = Guid.NewGuid().ToByteArray ();
|
||||
table_idx = get_next_table_index (this, 0x00, true);
|
||||
table_idx = get_next_table_index (this, 0x00, 1);
|
||||
name_cache = new Dictionary<TypeName, TypeBuilder> ();
|
||||
us_string_cache = new Dictionary<string, int> (512);
|
||||
|
||||
@@ -450,7 +450,7 @@ namespace System.Reflection.Emit {
|
||||
return result;
|
||||
}
|
||||
|
||||
internal int get_next_table_index (object obj, int table, bool inc) {
|
||||
internal int get_next_table_index (object obj, int table, int count) {
|
||||
if (table_indexes == null) {
|
||||
table_indexes = new int [64];
|
||||
for (int i=0; i < 64; ++i)
|
||||
@@ -459,9 +459,9 @@ namespace System.Reflection.Emit {
|
||||
table_indexes [0x02] = 2;
|
||||
}
|
||||
// Console.WriteLine ("getindex for table "+table.ToString()+" got "+table_indexes [table].ToString());
|
||||
if (inc)
|
||||
return table_indexes [table]++;
|
||||
return table_indexes [table];
|
||||
var index = table_indexes [table];
|
||||
table_indexes [table] += count;
|
||||
return index;
|
||||
}
|
||||
|
||||
public void SetCustomAttribute( CustomAttributeBuilder customBuilder) {
|
||||
@@ -786,7 +786,7 @@ namespace System.Reflection.Emit {
|
||||
}
|
||||
|
||||
internal int GetToken (MemberInfo member) {
|
||||
if (member is ConstructorBuilder || member is MethodBuilder)
|
||||
if (member is ConstructorBuilder || member is MethodBuilder || member is FieldBuilder)
|
||||
return GetPseudoToken (member, false);
|
||||
return getToken (this, member, true);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace System.Reflection.Emit {
|
||||
if (mb is DynamicMethod)
|
||||
table_idx = 0;
|
||||
else
|
||||
table_idx = mb.get_next_table_index (this, 0x08, true);
|
||||
table_idx = mb.get_next_table_index (this, 0x08, 1);
|
||||
}
|
||||
|
||||
public virtual int Attributes {
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace System.Reflection.Emit {
|
||||
System.Array.Copy (parameterTypes, this.parameters, this.parameters.Length);
|
||||
}
|
||||
typeb = tb;
|
||||
table_idx = tb.get_next_table_index (this, 0x17, true);
|
||||
table_idx = tb.get_next_table_index (this, 0x17, 1);
|
||||
}
|
||||
|
||||
public override PropertyAttributes Attributes {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user