[Ikvm-commit] ikvm/ikvmc CompilerClassLoader.cs,1.265,1.266
Brought to you by:
jfrijters
|
From: Jeroen F. <jfr...@us...> - 2014-06-02 13:25:42
|
Update of /cvsroot/ikvm/ikvm/ikvmc In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv28624/ikvmc Modified Files: CompilerClassLoader.cs Log Message: Fixed PackageListAttribute to be ECMA compliant. Index: CompilerClassLoader.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/ikvmc/CompilerClassLoader.cs,v retrieving revision 1.265 retrieving revision 1.266 diff -C2 -d -r1.265 -r1.266 *** CompilerClassLoader.cs 13 May 2014 14:13:14 -0000 1.265 --- CompilerClassLoader.cs 2 Jun 2014 13:25:40 -0000 1.266 *************** *** 561,566 **** if(options.sharedclassloader == null || options.sharedclassloader[0] == this) { ! string[][] list = packages.ToArray(); ! mb.SetCustomAttribute(new CustomAttributeBuilder(JVM.LoadType(typeof(PackageListAttribute)).GetConstructor(new Type[] { JVM.Import(typeof(string[][])) }), new object[] { list })); // We can't add the resource when we're a module, because a multi-module assembly has a single resource namespace // and since you cannot combine -target:module with -sharedclassloader we don't need an export map --- 561,569 ---- if(options.sharedclassloader == null || options.sharedclassloader[0] == this) { ! ConstructorInfo packageListAttributeCtor = JVM.LoadType(typeof(PackageListAttribute)).GetConstructor(new Type[] { Types.String, Types.String.MakeArrayType() }); ! foreach(object[] args in packages.ToArray()) ! { ! mb.SetCustomAttribute(new CustomAttributeBuilder(packageListAttributeCtor, args)); ! } // We can't add the resource when we're a module, because a multi-module assembly has a single resource namespace // and since you cannot combine -target:module with -sharedclassloader we don't need an export map *************** *** 4141,4148 **** } ! // see PackageListAttribute for the structure of this array ! internal string[][] ToArray() { ! List<string[]> list = new List<string[]>(); // we use an empty string to indicate we don't yet have a jar, // because null is used for packages that were defined from --- 4144,4151 ---- } ! // returns an array of PackageListAttribute constructor argument arrays ! internal object[][] ToArray() { ! List<object[]> list = new List<object[]>(); // we use an empty string to indicate we don't yet have a jar, // because null is used for packages that were defined from *************** *** 4157,4164 **** if (currentList.Count != 0) { ! list.Add(currentList.ToArray()); currentList.Clear(); } - currentList.Add(jar); currentJar = jar; } --- 4160,4166 ---- if (currentList.Count != 0) { ! list.Add(new object[] { currentJar, currentList.ToArray() }); currentList.Clear(); } currentJar = jar; } *************** *** 4167,4171 **** if (currentList.Count != 0) { ! list.Add(currentList.ToArray()); } return list.ToArray(); --- 4169,4173 ---- if (currentList.Count != 0) { ! list.Add(new object[] { currentJar, currentList.ToArray() }); } return list.ToArray(); |