Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/ilasm
AgeCommit message (Collapse)Author
2019-07-08Crashes on running the boring.il test from coreclr, the problem was that ↵Thays Grazia
using [System.Runtime]System.String the type was not understood as the primitive type string. (#15552) Using ilasm from coreclr and running on mono it works, because of that I decided to fix on ilasm and not on runtime. Fixes #13923
2019-05-23[bcl] Remove usages of mono-project.com/go-mono.com/google.com in tests (#14586)Alexander Köplinger
Use example.com and example.org instead. Fixes https://github.com/mono/mono/issues/14585 Note that not all of the things I replaced make an actual network request but I thought it'd be nice to be consistent.
2019-04-04[DIM] Do not order implemented interfaces (#13721)Thays Grazia
This test https://github.com/dotnet/coreclr/blob/1649da12db73c8c07513c9168cb30ec70c310063/tests/src/Regressions/coreclr/20452/twopassvariance.il On mono we were ordering the list of implemented interfaces and shouldn't do this as it's described on ECMA-335 Section II.12.2.1 and II.12.2.2. The ordering was removed on ilasm and some changes were needed on metadata either because it's not ordered anymore. There were two bugs, one on ilasm and other on class initialization on mono. ### ILAsm ### If we get the .exe generated by .net Framework it doesn't execute on mono without modifications because we ordered the implemented interfaces list by id. And doing that the order defined on source code is ignored. If we get the .exe generated by Mono it doesn't execute on .net Framework because on IlAsm we order the list and loose the order defined on source code. The interfaces on metadata before these changes on IlAsm were like this: ``` 1: Fooer1 implements class IFoo<class Derived> 2: Fooer1 implements class IFoo<class Base> 3: Fooer2 implements class IFoo<class Base> 4: Fooer2 implements class IFoo<class Derived> 5: Fooer3 implements class IFoo<object> 6: Fooer3 implements class IBar<class Derived> 7: Fooer3 implements class IBaz<class Base> 8: IBar implements class IFoo<!0> 9: IBaz implements class IFoo<!0> 10: Fooer4 implements IQux 11: Fooer4 implements class IBar<class Derived> 12: IQux implements class IFoo<class Base> 13: IQux implements class IFoo<class Derived> 14: Fooer5 implements IQux 15: Fooer5 implements class IBar<class Derived> 16: Fooer6 implements class IBar<class Base> 17: Fooer6 implements class IFoo<class Base> 18: Fooer7 implements class IFoo<class Base> 19: Fooer7 implements class IBar<class Base> ``` And After the changes they follow the definition order which is the same order of IlAsm for .net framework and .net core. ``` 1: IBar implements class IFoo<!0> 2: IBaz implements class IFoo<!0> 3: IQux implements class IFoo<class Base> 4: IQux implements class IFoo<class Derived> 5: Fooer1 implements class IFoo<class Base> 6: Fooer1 implements class IFoo<class Derived> 7: Fooer2 implements class IFoo<class Derived> 8: Fooer2 implements class IFoo<class Base> 9: Fooer3 implements class IBaz<class Base> 10: Fooer3 implements class IBar<class Derived> 11: Fooer3 implements class IFoo<object> 12: Fooer4 implements IQux 13: Fooer4 implements class IBar<class Derived> 14: Fooer5 implements class IBar<class Derived> 15: Fooer5 implements IQux 16: Fooer6 implements class IFoo<class Base> 17: Fooer6 implements class IBar<class Base> 18: Fooer7 implements class IBar<class Base> 19: Fooer7 implements class IFoo<class Base> ``` ### Mono vtable layout ### Internally when Mono computes the interface table for each class, it would previously sort the interfaces by `MonoClass:interface_id` which is a unique id assigned (roughly) in load order. This was incorrect because the order of the interfaces determines the final vtable for the class. This PR changes the interface table computation so that the interfaces of a single class are ordered in declaration order, following ECMA. One consequence is that we can no longer use binary search with the interface id as the key to find out if a class implements an interface. We have to do a linear scan. On the other hand, we expect that the number of interfaces implemented by a single class is small in practice. This is how the Vtable for Fooer1 and Fooer2 looks like after the changes: ``` *** Vtable for class 'Fooer1' at "FINALLY" (size 6) [O][000][INDEX 000] object:ToString () [0x7fd78681db20] [O][001][INDEX 001] object:GetHashCode () [0x7fd78681daf8] [O][002][INDEX 002] object:Finalize () [0x7fd78681dad0] [O][003][INDEX 003] object:Equals (object) [0x7fd78681daa8] [I][004][INDEX 000] IFoo:Gimme () [0x7fd786503800] [I][005][INDEX 000] IFoo:Gimme () [0x7fd7865038c0] Packed interface table for class Fooer1 has size 2 [000][UUID 078][SLOT 004][SIZE 001] interface IFoo[Base] [001][UUID 079][SLOT 005][SIZE 001] interface IFoo[Derived] ``` and ``` *** Vtable for class 'Fooer2' at "FINALLY" (size 6) [O][000][INDEX 000] object:ToString () [0x7fd78681db20] [O][001][INDEX 001] object:GetHashCode () [0x7fd78681daf8] [O][002][INDEX 002] object:Finalize () [0x7fd78681dad0] [O][003][INDEX 003] object:Equals (object) [0x7fd78681daa8] [I][004][INDEX 000] IFoo:Gimme () [0x7fd7865038c0] [I][005][INDEX 000] IFoo:Gimme () [0x7fd786503800] Packed interface table for class Fooer2 has size 2 [000][UUID 079][SLOT 004][SIZE 001] interface IFoo[Derived] [001][UUID 078][SLOT 005][SIZE 001] interface IFoo[Base] ``` This is how the VTable for Fooer1 and Fooer2 looks like before the changes, as you can see Packed interface table are the same in Fooer1 and Fooer2, so the behavior of both classes was the same: ``` Vtable for class 'Fooer1' at "FINALLY" (size 6) [O][000][INDEX 000] object:ToString () [0x7fcf3801d920] [O][001][INDEX 001] object:GetHashCode () [0x7fcf3801d8f8] [O][002][INDEX 002] object:Finalize () [0x7fcf3801d8d0] [O][003][INDEX 003] object:Equals (object) [0x7fcf3801d8a8] [I][004][INDEX 000] IFoo:Gimme () [0x7fcf37c29880] [I][005][INDEX 000] IFoo:Gimme () [0x7fcf37c29940] Packed interface table for class Fooer1 has size 2 [000][UUID 076][SLOT 004][SIZE 001] interface IFoo[Base] [001][UUID 077][SLOT 005][SIZE 001] interface IFoo[Derived] ``` ``` Vtable for class 'Fooer2' at "FINALLY" (size 6) [O][000][INDEX 000] object:ToString () [0x7fcf3801d920] [O][001][INDEX 001] object:GetHashCode () [0x7fcf3801d8f8] [O][002][INDEX 002] object:Finalize () [0x7fcf3801d8d0] [O][003][INDEX 003] object:Equals (object) [0x7fcf3801d8a8] [I][004][INDEX 000] IFoo:Gimme () [0x7fcf37c29940] [I][005][INDEX 000] IFoo:Gimme () [0x7fcf37c29880] Packed interface table for class Fooer2 has size 2 [000][UUID 076][SLOT 005][SIZE 001] interface IFoo[Base] [001][UUID 077][SLOT 004][SIZE 001] interface IFoo[Derived] ```
2019-03-20When it is a sealed method in Interface it's not Static nor Virtual and ↵Thays Grazia
shouldn't add virtual. Fixes #13508
2019-03-06[gitattributes] Do CRLF normalization on sln/proj filesAlexander Köplinger
They can be used with native line endings. We now have a shared folder with the dotnet repos and they have CRLF normalization enabled. This difference leads to conflicts while applying changes from the dotnet repos to mono.
2019-01-02[csproj] Update project filesmonojenkins
2018-10-10[build] Unify bootstrap profiles (#11024)Marek Safar
* [build] Unify bootstrap profiles We can now rely on build only as we have reliable monolite and package compilers * Fixes genproj dependencies * [csproj] Update project files
2018-09-02Move the PreBuild dependency property later in the file so targets can't ↵Katelyn Gadd
override it (#10429) * Move the PreBuild dependency property later in the file so targets can't override it * [csproj] Update project files
2018-08-31Kill sln dependencies (#10406)Katelyn Gadd
* Remove use of sln dependencies and use csproj project references instead * Rewrite jay.vcxproj so it builds correctly even without help from the sln file * Force pre-build event to run after references are resolved. Change how culevel.exe path is computed to be more resilient. * [csproj] Update project files
2018-08-09Move to generating msbuild choose elements to get if-else selection behavior ↵Katelyn Gadd
for sources in projects so that we don't get erroneous duplicate files in cases where there are both profile and host platform criteria (#9952) A recent commit revealed that in cases where we select based on a mix of host platform and profile, genproj csproj files can end up with duplicate sources because the existing <ItemGroup Condition= approach could make multiple groups match for a given compile when we really just want one. This PR changes to generating a cascade of msbuild <Choose> elements, which give if-else selection to ensure that we only ever build a single set of files.
2018-08-02Use msbuild project reference to establish dependency on genconsts instead ↵Katelyn Gadd
of solution dependencies (#9670) Using solution dependencies in ```bcl.sln``` seems flaky and seems like it might not establish the full ordering we need to ensure that ```Consts.cs``` exists before we build things that require it. Let's try using project references (where ```corlib.dll``` 'depends' on ```genconsts.exe```) instead. This should also insert the dependency for any project that includes Consts.cs instead of just corlib. This PR also makes update-solution-files actually fail if ```genconsts.exe``` fails to build because it was driving me mad. Part of #6886
2018-06-29Rework genproj to use gensources to build sources list for each profile and ↵Katelyn Gadd
host platform (#8985) * Update genproj makefile to include gensources Update genproj argument parser to be more generous about displaying help * Checkpoint * Checkpoint * Checkpoint * Checkpoint * Checkpoint * Checkpoint * Checkpoint * Checkpoint * Fix rebase issue * Checkpoint * Checkpoint * Fix built sources only being added to one profile * Fix typo * Checkpoint * Fix indentation * Use csc instead of mcs * Checkpoint * Fix BUILT_SOURCES only being handled for the first profile processed * Checkpoint * Checkpoint * Strip double slashes from paths to fix spurious csproj change * Checkpoint * Checkpoint * Checkpoint * Checkpoint: Fix genproj compilation * Checkpoint * Checkpoint * Checkpoint * Fix crash when no targets were loaded (due to an error) * Checkpoint * Checkpoint * Checkpoint * Fix TryParseTargetInto bug * Checkpoint * Shuffle exclude logic around so that it works correctly during genproj diffing * Remove gensources tracing * Checkpoint * Fix handling of oddball sources paths from executable.make * Fix jay not being set to build * Fix wrong slashes being used for embedded resource paths * [csproj] Update project files
2018-06-01[csproj] Update project filesmonojenkins
2018-05-03[ilasm] Add support for assembling vbbyrefstr, fixes ↵Miguel de Icaza
https://github.com/mono/mono/issues/8447 (#8467)
2018-04-16Default platform to net_4_x if none is specified, to fix tools that build ↵Katelyn Gadd
without setting a platform (#8223) * Default platform to net_4_x if none is specified, to fix tools that build without setting a platform * [csproj] Update project files
2018-03-28[msvc] Update csproj files (#7811)monojenkins
* [msvc] Update csproj files * [msvc] Delete old net_4_x.csproj and xbuild_12.csproj files
2018-03-08[msvc] Update csproj files (#7497)monojenkins
2018-02-23[msvc] Update csproj files (#7238)monojenkins
2018-02-23Updates to support building the BCL using Visual Studio 2017 on windows (#6877)Katelyn Gadd
2017-12-21Default interface methods IL tests from CoreCLREgorBo
2017-11-26[msvc] Update csproj files (#6100)monojenkins
2017-08-29[ilasm] Adds noautoinherit optionMarek Safar
2017-08-29[ilasm] Adds AggressiveInlining supportMarek Safar
2017-08-07[msvc] Update csproj filesAlexander Köplinger
2017-05-15[msvc] Update csproj files (#4846)monojenkins
2017-04-18[msvc] Update csproj files (#4711)monojenkins
2017-01-17Clean up few warningsMarek Safar
2017-01-12[ilasm] Support 'nooptimization' attribute.Jon Purdy
2017-01-10[msvc] Update csproj files (#4221)monojenkins
2017-01-05[msvc] Update csproj files (#4204)monojenkins
2016-12-21[ilasm] Don't break arguments compatiblityMarek Safar
2016-12-21[ilasm] Clenup warningsMarek Safar
2016-11-29ilasm: Add stub parsing for .data cil attributeVladimir Panteleev
The "cil" attribute seems to indicate that the data should be placed in the .text section, along with the code. Like the tls attribute, the cil attribute is only implemented insofar as to recognize it as a valid keyword that can occur in a .data declaration.
2016-11-14[msvc] Update .csproj filesAlexander Köplinger
2016-10-17[build] Regenerate .csproj filesAlexander Köplinger
Note: DISABLE_CAS_USE was removed in ed989a8e9e5c170b6d19edc60bb80e8a4e6d5cc0
2016-09-23Fix 16628Alex Earl
This changes the IL parser to have the same behavior as ilasm.exe from MS https://bugzilla.xamarin.com/show_bug.cgi?id=16628
2016-07-18[runtime] Get ilasm.exe compiling with mobile_staticAlexander Kyte
2016-07-02[ilasm] Side with parent declaration when deciding if a type is an enum or a ↵Rodrigo Kumpera
value type. The conflict happens when a type is declared like this: .class value private auto ansi serializable sealed foo extends [mscorlib]System.Enum The value keyword would make it a value type and ignore the parent declaration. .net ilasm favors the later, which makes more sense.
2016-05-31[genproj] support for using prebuilt resourcesMiguel de Icaza
2016-05-31[genproj] Getting closer to a full buildMiguel de Icaza
* Add TODO list * Use -useSourcePath when building resources, so we do not need to add the explicit extra path * More updates, now battling resource generation across the board * Use newlines in the Unix commands to avoid generating things like cs-parser.cs^M
2016-05-27[genproj] Do not use \r on the Unix parts of the build hook, add RabbitMQ hooksMiguel de Icaza
2016-05-19[msbuild projects] Use newlines without a carriage return for Unix targets ↵Miguel de Icaza
to appease MS msbuild
2016-05-19[genproj] Now we can build all executables with msbuild as wellMiguel de Icaza
2016-03-02[ilasm] When generating method signatures for method-defs, make sure they ↵Rodrigo Kumpera
contain the full call conv. Fixes b35784. When generating varargs signatures for method defs, ilasm would discard the rest of the call conv. Things like instance or explicit this would be discarded.
2016-01-29Remove ChangeLog references from Makefile and .gitattributeAlexander Köplinger
2016-01-29Remove ChangeLog files from the repoAlexander Köplinger
They weren't updated in the last 6 years and aren't helpful anymore (e.g. by causing unrelated matches during git grep searches).
2015-08-16[ilasm] Add stubs for the "auto" keyword in .assemblyAlexander Köplinger
Example IL: ".assembly extern mscorlib {auto}"
2015-08-16[ilasm] Add stubs for the "legacy library" keyword in .assemblyAlexander Köplinger
Example IL: ".assembly extern legacy library mscorlib {}" ".assembly legacy library test {}"
2015-07-14[ilasm] Imlicitly set enums value__ special flagsMarek Safar
2015-07-14[ilasm] Make only structs automatically sealed (partially reverts ↵Marek Safar
541a65ddd3f4b49c4d5bb6324bae63f0ed569115)