mono.git
7 years agoDefault powerpc to build with mcs (#4313)
Alexander Köplinger [Wed, 1 Feb 2017 15:47:01 +0000 (16:47 +0100)]
Default powerpc to build with mcs (#4313)

It crashes during build with roslyn on Jenkins.

7 years ago[System.Data] referencesource -> corefx (#4299)
Egor Bogatov [Wed, 1 Feb 2017 14:49:21 +0000 (15:49 +0100)]
[System.Data] referencesource -> corefx (#4299)

* [System.Data] SQLTypes from corefx

* [System.Data] DataStorage + subclasses from corefx

* [System.Data] remove dead referencesource.sources references

* [System.Data] Generate SR.cs from corefx using resx2sr tool

* [System.Data] move common references to corefx.common.sources

* [System.Data] remove /ReferenceSources/SR.cs

* [System.Data] remove duplicates in corefx.common.sources (accidentally were added)

* [System.Data] simple types & enums from corefx

* [System.Data] referencesource -> corefx

* [System.Data] Referencesource -> corefx

* [System.Data] re-order (sort) files in corefx.common.sources, DbCommandBuilder from corefx

* [System.Data] Referencesource -> corefx

* [System.Data] DataRow, DataSet, Filters, etc from corefx. XmlDataDocument is internal in corefx but used to be public in mono.

* [System.Data] rollback referencesource changes

* [System.Data] Wrap /referencesource/DataSet.cs with #ifdef COREFX in order to include missing DataSetSchemaImporterExtension and ignore DataSet

7 years ago[System] Disable SocketTest.ConnectedProperty on testing_aot_full for now
Alexander Köplinger [Wed, 1 Feb 2017 14:20:11 +0000 (15:20 +0100)]
[System] Disable SocketTest.ConnectedProperty on testing_aot_full for now

It failed since we introduced this profile and it was disabled
on Mac a few years ago. A bug is filed to investigate why it only
fails on FullAOT on Linux but works on non-FullAOT builds.

Disable the test for now to get closer to a green build.

https://bugzilla.xamarin.com/show_bug.cgi?id=52157

7 years ago[ci] Bump timeout for compile-runtime-tests
Alexander Köplinger [Wed, 1 Feb 2017 13:27:01 +0000 (14:27 +0100)]
[ci] Bump timeout for compile-runtime-tests

The new Azure Windows builders sometimes run into this timeout.

7 years agoMerge pull request #4301 from ntherning/fix-Mono.Posix-API-breakage
Niklas Therning [Wed, 1 Feb 2017 12:58:54 +0000 (07:58 -0500)]
Merge pull request #4301 from ntherning/fix-Mono.Posix-API-breakage

Fixes the Mono.Posix API breakage introduced in #3985

7 years ago[runtime] Fix parse_optimizations () so the optimization names don't … (#4300)
Zoltan Varga [Wed, 1 Feb 2017 12:42:14 +0000 (07:42 -0500)]
[runtime] Fix parse_optimizations () so the optimization names don't … (#4300)

* [runtime] Fix parse_optimizations () so the optimization names don't need to be in a particular order.

* [jit] Avoid unused bits in optflags.

7 years ago[ppdb] Fix support for embedded ppdb data.
Zoltan Varga [Wed, 1 Feb 2017 10:37:17 +0000 (05:37 -0500)]
[ppdb] Fix support for embedded ppdb data.

7 years agoFixes the Mono.Posix API breakage introduced in #3985
Niklas Therning [Tue, 31 Jan 2017 10:03:15 +0000 (05:03 -0500)]
Fixes the Mono.Posix API breakage introduced in #3985

Also reverts the changes done to support/map.c. This is a generated file which
shouldn't be changed directly. An alternate fix for the problem in map.c on
Windows was to make sure L_SET et al are defined in mph.h which was already
done for Solaris.

7 years agoMerge pull request #4310 from marek-safar/roslyn-rc3
Marek Safar [Wed, 1 Feb 2017 08:10:29 +0000 (09:10 +0100)]
Merge pull request #4310 from marek-safar/roslyn-rc3

Bump roslyn to rc3

7 years agoMerge pull request #4302 from marek-safar/corefx-bump
Marek Safar [Wed, 1 Feb 2017 07:31:03 +0000 (08:31 +0100)]
Merge pull request #4302 from marek-safar/corefx-bump

Bump corefx

7 years agoBump roslyn to rc3
Marek Safar [Tue, 31 Jan 2017 22:52:58 +0000 (23:52 +0100)]
Bump roslyn to rc3

7 years agoBump corefx
Marek Safar [Tue, 31 Jan 2017 10:10:24 +0000 (11:10 +0100)]
Bump corefx

7 years ago[tests] Fix assemblyresolve_event4.exe and reference-loader.exe FullAOT test fails
Alexander Köplinger [Tue, 31 Jan 2017 21:05:31 +0000 (22:05 +0100)]
[tests] Fix assemblyresolve_event4.exe and reference-loader.exe FullAOT test fails

Fix assemblyresolve/Makefile.am so it correctly AOTs the
dependency of assemblyresolve_event4.exe (CLASS was empty before).

Disable reference-loader.exe since we can't AOT the
TestingReferenceAssembly.dll assembly which is a dependency
of the test so it would fail. Discussed with Aleksey, this is OK
because even if we could AOT the assembly we wouldn't use it since
the assembly loader looks at the managed assembly first, finds the
attribute and bails out before looking at the AOT image.

7 years ago[System] Fix AsyncOperationManager test that fails on the testing_full_aot profile
Alexander Köplinger [Tue, 31 Jan 2017 18:24:15 +0000 (19:24 +0100)]
[System] Fix AsyncOperationManager test that fails on the testing_full_aot profile

It seems the first assert only applies to XI/XM, so use those
in the condition instead of the profiles where it doesn't apply.

7 years agoDon't try to AOT test assemblies in runtime_preset=all (#4303)
Alexander Köplinger [Tue, 31 Jan 2017 18:18:58 +0000 (19:18 +0100)]
Don't try to AOT test assemblies in runtime_preset=all (#4303)

This got broken in ee048db72f867214ba2b9926d70a03badd79b33f
when the winaot profile was added to FULL_AOT_TESTS since we
enable that profile for building with runtime_preset=all which
means that FULL_AOT_TESTS would be defined and the runtime tests
would try to AOT the test assemblies.

Instead, we now only try to AOT if we're actually testing
a profile that needs it. Also introduced a new HYBRID_AOT_TESTS
variable and replaced the existing INSTALL_TESTING_AOT_HYBRID
since that profile would run into the same issue if we included
it in runtime_preset=all (using the INSTALL_ variables to decide
about tests is misleading!)

7 years ago[mono] Update ignored assemblies list to include System.ValueTuple
Marek Safar [Mon, 30 Jan 2017 16:40:32 +0000 (17:40 +0100)]
[mono] Update ignored assemblies list to include System.ValueTuple

7 years ago[mono] Update ignored assemblies list to include System.Reflection.DispatchProxy
Marek Safar [Mon, 30 Jan 2017 15:59:37 +0000 (16:59 +0100)]
[mono] Update ignored assemblies list to include System.Reflection.DispatchProxy

7 years ago[System.ServiceProcess] Fix test failure on Windows Server 2016
Alexander Köplinger [Mon, 30 Jan 2017 14:42:24 +0000 (15:42 +0100)]
[System.ServiceProcess] Fix test failure on Windows Server 2016

Use different service as the former has different dependencies
on the server edition.

7 years ago[System.Web] Fix two more EOL test failures on Windows
Alexander Köplinger [Mon, 30 Jan 2017 13:52:24 +0000 (14:52 +0100)]
[System.Web] Fix two more EOL test failures on Windows

7 years agoMerge pull request #4297 from kumpera/fix-profiler-osx-linking
Rodrigo Kumpera [Mon, 30 Jan 2017 15:54:55 +0000 (10:54 -0500)]
Merge pull request #4297 from kumpera/fix-profiler-osx-linking

[profiler] On OSX, don't link against libmonosgen.

7 years ago[build] Use multiple inputs in profiled aot
Marek Safar [Sat, 28 Jan 2017 00:16:53 +0000 (19:16 -0500)]
[build] Use multiple inputs in profiled aot

7 years ago[docs] Add a basic doxyfile
Jon Purdy [Thu, 26 Jan 2017 22:11:07 +0000 (14:11 -0800)]
[docs] Add a basic doxyfile

Bare minimum Doxygen configuration with dependency graphs.

7 years ago[bcl] Update tests that failed when .cs file contained CRLF
Alexander Köplinger [Sat, 28 Jan 2017 01:23:38 +0000 (02:23 +0100)]
[bcl] Update tests that failed when .cs file contained CRLF

Most of them used multiline C# string literals which
means they contained the line ending character of the file.
Updated to make the tests resilient to having CRLF instead of LF.

Some of the mcs tests used a checksum to compare files,
ensured those are checked out using LF.

7 years agoFix non-osx build.
Rodrigo Kumpera [Fri, 27 Jan 2017 19:51:31 +0000 (14:51 -0500)]
Fix non-osx build.

7 years ago[profiler] Don't link to libmonosgen on OSX. Fixes in tree execution.
Rodrigo Kumpera [Fri, 27 Jan 2017 18:29:15 +0000 (13:29 -0500)]
[profiler] Don't link to libmonosgen on OSX. Fixes in tree execution.

Loading profiling modules from the build tree fails on OSX because libmonosgen usually is not present in the install prefix.

This change is slightly overly complicated as I explicitly don't want to change iOS&friends.

7 years ago[scripts] Set custom csc nursery-size
Marek Safar [Fri, 27 Jan 2017 18:28:23 +0000 (13:28 -0500)]
[scripts] Set custom csc nursery-size

7 years ago[build] Install correct csc aot images
Marek Safar [Fri, 27 Jan 2017 18:28:03 +0000 (13:28 -0500)]
[build] Install correct csc aot images

7 years ago[interpreter] make space in args array to sneak in `this` in mint_newobj
Bernhard Urban [Fri, 27 Jan 2017 17:30:51 +0000 (18:30 +0100)]
[interpreter] make space in args array to sneak in `this` in mint_newobj

7 years ago[interpreter] change calling convention for `this` argument
Bernhard Urban [Fri, 27 Jan 2017 17:30:45 +0000 (18:30 +0100)]
[interpreter] change calling convention for `this` argument

the interpreter handles the `this` argument in the frame explicitly.
This doesn't align well with mini which treats `this` as normal
parameter on the stack.  That's just asking for troubles, e.g. for
native wrappers we convert signatures from virtual to static.

7 years ago[interpreter] fix CEE_LDOBJ for valuetypes
Bernhard Urban [Fri, 27 Jan 2017 17:30:43 +0000 (18:30 +0100)]
[interpreter] fix CEE_LDOBJ for valuetypes

7 years ago[interpreter] first version of CEE{LD,ST}ELEM
Bernhard Urban [Fri, 27 Jan 2017 17:30:40 +0000 (18:30 +0100)]
[interpreter] first version of CEE{LD,ST}ELEM

7 years ago[interpreter] fixed bug in mint_vtresult, we need the new vt address on the stack
Bernhard Urban [Fri, 27 Jan 2017 17:30:37 +0000 (18:30 +0100)]
[interpreter] fixed bug in mint_vtresult, we need the new vt address on the stack

7 years ago[interpreter] reserve storage on valuetype stack in mint_unbox
Bernhard Urban [Fri, 27 Jan 2017 17:30:35 +0000 (18:30 +0100)]
[interpreter] reserve storage on valuetype stack in mint_unbox

7 years ago[interpreter] fix some type -> klass accesses
Bernhard Urban [Fri, 27 Jan 2017 17:30:32 +0000 (18:30 +0100)]
[interpreter] fix some type -> klass accesses

mono_class_from_mono_type respects generic instantiations

7 years ago[interpreter] call managed boxing for nullable
Bernhard Urban [Fri, 27 Jan 2017 17:30:29 +0000 (18:30 +0100)]
[interpreter] call managed boxing for nullable

7 years ago[interpreter] make box instruction respect generics
Bernhard Urban [Fri, 27 Jan 2017 17:30:27 +0000 (18:30 +0100)]
[interpreter] make box instruction respect generics

7 years ago[interpreter] improve tracing
Bernhard Urban [Fri, 27 Jan 2017 17:30:24 +0000 (18:30 +0100)]
[interpreter] improve tracing

7 years ago[interpreter] implement unbox_any. call managed unbox implementation for Nullable...
Bernhard Urban [Fri, 27 Jan 2017 17:30:22 +0000 (18:30 +0100)]
[interpreter] implement unbox_any.  call managed unbox implementation for Nullable struct

7 years ago[interpreter] add temporary regression tests for generics
Bernhard Urban [Fri, 27 Jan 2017 17:30:19 +0000 (18:30 +0100)]
[interpreter] add temporary regression tests for generics

until we can execute generics.cs

7 years ago[interpreter] integrate compile_method and runtime_invoke into mini
Bernhard Urban [Fri, 27 Jan 2017 17:30:17 +0000 (18:30 +0100)]
[interpreter] integrate compile_method and runtime_invoke into mini

7 years ago[runtime] Add more system assemblies remapping
Marek Safar [Fri, 27 Jan 2017 17:16:29 +0000 (12:16 -0500)]
[runtime] Add more system assemblies remapping

7 years agoA few more LF .gitattributes fixes
Alexander Köplinger [Fri, 27 Jan 2017 14:58:54 +0000 (15:58 +0100)]
A few more LF .gitattributes fixes

7 years agoAlways use LF line endings for config.rpath/configure.host as well
Alexander Köplinger [Fri, 27 Jan 2017 14:06:16 +0000 (15:06 +0100)]
Always use LF line endings for config.rpath/configure.host as well

7 years agoAdd .sh extension to update_submodules so it gets correct line ending
Alexander Köplinger [Fri, 27 Jan 2017 14:18:23 +0000 (15:18 +0100)]
Add .sh extension to update_submodules so it gets correct line ending

It'd not be recognized as a shell file so it'd get CRLF line
endings on Windows which doesn't work. Also added a shebang.

Also remove get-cygwin-deps.sh, it is long outdated.
Correct instructions are on the Mono website.

7 years agoMake sure .sh files always have LF line ending
Alexander Köplinger [Fri, 27 Jan 2017 13:07:08 +0000 (14:07 +0100)]
Make sure .sh files always have LF line ending

This removes the need to set core.autocrlf=input when compiling
Mono on Windows via cygwin.

7 years ago[Debugger] Added support for stepping over await and out of async met…
David Karlaš [Fri, 27 Jan 2017 10:17:40 +0000 (11:17 +0100)]
[Debugger] Added support for stepping over await and out of async met…
…hods

method-to-ir.c: Added sequence points on IL offsets yieldOffsets and resumeOffsets since we need stepping to stop yieldOffset and ability to set breakpoint on resumeOffset
seq-points.c: This change is needed since we need to know if we are at last non-empty SeqPoint in method, but without this change is_last_non_empty method in debugger-agent.c would loop forever since blocks point between each other in cycles
doest-app.cs and dtest.cs: unit test
debugger-agent.c: I will explain how stepping over `await` and stepping out of `async` method works in commit message, code itself should be self explaining with comments

Step-In and Step-Out case: inside `async` method we do everything same except two things:
1. At end of method we switch to step-out logic
This is important because normal stepping-in/over would step out into “thread pool” calling code. Which is not what we want, we want to continue stepping where .Wait, .Result or `await` is waiting for our Task to finish. `is_last_non_empty` is needed because last non-empty SeqPoint is placed before SetResult(see line 33 in decompiled method below) so we can do StepOut logic before SetResult method is called.  I will explain how step-out works below.
2. When stepping is finished we check if we stepped on yieldOffset(this happens when user is about to step over `await` call) and Task has IsCompleted false(didn’t finish immediately)(line 11 in decompiled method). If we stopped on yieldOffset we put breakpoint on resumeOffset SeqPoint(line 19 in decompiled method) and resume execution so when our AsyncStateMachine is called back after Task(the one that our `await` call triggered) is finished we hit breakpoint and user is just after `await` call. It’s important that we set `async_id` before resuming at yieldOffset so we can check when breakpoint is hit if this is our Task or some other that is executing at same time, since we can’t check threads since threads can change before and after `await` call.

Step-Out case: When user requests step-out or user requests step-in/over and we are at end of method, we set breakpoint in special .Net framework method called “NotifyDebuggerOfWaitCompletion” and call “SetNotificationForWaitCompletion” method so after Task is finished(when we call .SetResult, line 33 in decompiled method).

Method that called our `async` method and got our Task(on which we called “SetNotificationForWaitCompletion”) returned. When it calls .Wait(), .Result, or `await` on our task it will call “NotifyDebuggerOfWaitCompletion”(framework does this). At that point our breakpoint(inside “NotifyDebuggerOfWaitCompletion”) is hit and we do step-out until we get to where user called .Wait(), .Result, and `await`.(Of course if ProjectCodeOnly is enabled, otherwise it’s in 1 method above “NotifyDebuggerOfWaitCompletion”).

I added also ppdb dump and monodis if anyone wants more data:

C# code:
public static async Task<int> ss_await_1 () {
    var a = 1;
    await Task.Delay (20);
    return a + 2;
}
C# decompiled:
  1: void IAsyncStateMachine.MoveNext ()
  2: {
  3:     int num = this.<>1__state;
  4:     int result;
  5:     try {
  6:         TaskAwaiter taskAwaiter;
  7:         if (num != 0) {
  8:           this.<a>5__1 = 1;
  9:           taskAwaiter = Task.Delay (20).GetAwaiter ();
10:           if (!taskAwaiter.get_IsCompleted ()) {
11:                this.<>1__state = 0;
12:                this.<>u__1 = taskAwaiter;
13:               Tests.<ss_await_1>d__90 <ss_await_1>d__ = this;
14:               this.<>t__builder.AwaitUnsafeOnCompleted<TaskAwaiter, Tests.<ss_await_1>d__90> (ref taskAwaiter, ref <ss_await_1>d__);
15:                return;
16:            }
17:        }
18:        else {
19:            taskAwaiter = this.<>u__1;
20:            this.<>u__1 = default(TaskAwaiter);
21:            this.<>1__state = -1;
22:        }
23:        taskAwaiter.GetResult ();
24:        taskAwaiter = default(TaskAwaiter);
25:        result = this.<a>5__1 + 2;
26:    }
27:    catch (Exception exception) {
28:        this.<>1__state = -2;
29:        this.<>t__builder.SetException (exception);
30:        return;
31:    }
32:    this.<>1__state = -2;
33:    this.<>t__builder.SetResult (result);
34:}

ppdb dump for this method:
<method containingType="Tests+&lt;ss_await_1&gt;d__90" name="MoveNext">
    <sequencePoints>
    <entry offset="0x0" hidden="true" document="1" />
    <entry offset="0x7" hidden="true" document="1" />
    <entry offset="0xe" startLine="744" startColumn="46" endLine="744" endColumn="47" document="1" />
    <entry offset="0xf" startLine="745" startColumn="3" endLine="745" endColumn="13" document="1" />
    <entry offset="0x16" startLine="746" startColumn="3" endLine="746" endColumn="25" document="1" />
    <entry offset="0x23" hidden="true" document="1" />
    <entry offset="0x7c" startLine="747" startColumn="3" endLine="747" endColumn="16" document="1" />
    <entry offset="0x87" hidden="true" document="1" />
    <entry offset="0xa1" startLine="748" startColumn="2" endLine="748" endColumn="3" document="1" />
    <entry offset="0xa9" hidden="true" document="1" />
    </sequencePoints>
    <scope startOffset="0x0" endOffset="0xb7" />
    <asyncInfo>
    <kickoffMethod declaringType="Tests" methodName="ss_await_1" />
    <await yield="0x35" resume="0x50" declaringType="Tests+&lt;ss_await_1&gt;d__90" methodName="MoveNext" />
    </asyncInfo>
</method>

monodis:
.method private final virtual hidebysig newslot
        instance default void MoveNext ()  cil managed
{
    // Method begins at RVA 0x41f0
.override Could not decode method override class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext due to (null)
// Code size 183 (0xb7)
.maxstack 3
.locals init (
    int32 V_0,
    int32 V_1,
    valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiterV_2,
    class Tests/'<ss_await_1>d__90' V_3,
    class [mscorlib]System.Exception V_4)
IL_0000:  ldarg.0
IL_0001:  ldfld int32 Tests/'<ss_await_1>d__90'::'<>1__state'
IL_0006:  stloc.0
.try { // 0
    IL_0007:  ldloc.0
    IL_0008:  brfalse.s IL_000c

    IL_000a:  br.s IL_000e

    IL_000c:  br.s IL_0050

    IL_000e:  nop
    IL_000f:  ldarg.0
    IL_0010:  ldc.i4.1
    IL_0011:  stfld int32 Tests/'<ss_await_1>d__90'::'<a>5__1'
    IL_0016:  ldc.i4.s 0x14
    IL_0018:  call class [mscorlib]System.Threading.Tasks.Task class [mscorlib]System.Threading.Tasks.Task::Delay(int32)
    IL_001d:  callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter class [mscorlib]System.Threading.Tasks.Task::GetAwaiter()
    IL_0022:  stloc.2
    IL_0023:  ldloca.s 2
    IL_0025:  call instance bool valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted()
    IL_002a:  brtrue.s IL_006c

    IL_002c:  ldarg.0
    IL_002d:  ldc.i4.0
    IL_002e:  dup
    IL_002f:  stloc.0
    IL_0030:  stfld int32 Tests/'<ss_await_1>d__90'::'<>1__state'
    IL_0035:  ldarg.0
    IL_0036:  ldloc.2
    IL_0037:  stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter Tests/'<ss_await_1>d__90'::'<>u__1'
    IL_003c:  ldarg.0
    IL_003d:  stloc.3
    IL_003e:  ldarg.0
    IL_003f:  ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<int32> Tests/'<ss_await_1>d__90'::'<>t__builder'
    IL_0044:  ldloca.s 2
    IL_0046:  ldloca.s 3
    IL_0048:  call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<int32>::AwaitUnsafeOnCompleted<valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter, class Tests/'<ss_await_1>d__90'> ([out] !!0&, [out] !!1&)
    IL_004d:  nop
    IL_004e:  leave.s IL_00b6

    IL_0050:  ldarg.0
    IL_0051:  ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter Tests/'<ss_await_1>d__90'::'<>u__1'
    IL_0056:  stloc.2
    IL_0057:  ldarg.0
    IL_0058:  ldflda valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter Tests/'<ss_await_1>d__90'::'<>u__1'
    IL_005d:  initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter
    IL_0063:  ldarg.0
    IL_0064:  ldc.i4.m1
    IL_0065:  dup
    IL_0066:  stloc.0
    IL_0067:  stfld int32 Tests/'<ss_await_1>d__90'::'<>1__state'
    IL_006c:  ldloca.s 2
    IL_006e:  call instance void valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult()
    IL_0073:  nop
    IL_0074:  ldloca.s 2
    IL_0076:  initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter
    IL_007c:  ldarg.0
    IL_007d:  ldfld int32 Tests/'<ss_await_1>d__90'::'<a>5__1'
    IL_0082:  ldc.i4.2
    IL_0083:  add
    IL_0084:  stloc.1
    IL_0085:  leave.s IL_00a1

} // end .try 0
catch class [mscorlib]System.Exception { // 0
    IL_0087:  stloc.s 4
    IL_0089:  ldarg.0
    IL_008a:  ldc.i4.s 0xfffffffe
    IL_008c:  stfld int32 Tests/'<ss_await_1>d__90'::'<>1__state'
    IL_0091:  ldarg.0
    IL_0092:  ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<int32> Tests/'<ss_await_1>d__90'::'<>t__builder'
    IL_0097:  ldloc.s 4
    IL_0099:  call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<int32>::SetException(class [mscorlib]System.Exception)
    IL_009e:  nop
    IL_009f:  leave.s IL_00b6

} // end handler 0
IL_00a1:  ldarg.0
IL_00a2:  ldc.i4.s 0xfffffffe
IL_00a4:  stfld int32 Tests/'<ss_await_1>d__90'::'<>1__state'
IL_00a9:  ldarg.0
IL_00aa:  ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<int32> Tests/'<ss_await_1>d__90'::'<>t__builder'
IL_00af:  ldloc.1
IL_00b0:  call instance void valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<int32>::SetResult(!0)
IL_00b5:  nop
IL_00b6:  ret
} // end of method <ss_await_1>d__90::MoveNext

7 years ago[Ppdb] Support for reading CustomDebugInformation and more specifically AsyncMethodDe...
David Karlaš [Fri, 27 Jan 2017 10:17:15 +0000 (11:17 +0100)]
[Ppdb] Support for reading CustomDebugInformation and more specifically AsyncMethodDebugInfo

7 years ago[msvc] Update csproj files (#4295)
monojenkins [Thu, 26 Jan 2017 16:40:33 +0000 (16:40 +0000)]
[msvc] Update csproj files (#4295)

7 years ago[System.Data] SqlTypes and DataStorage from corefx (#4291)
Egor Bogatov [Thu, 26 Jan 2017 13:48:23 +0000 (14:48 +0100)]
[System.Data] SqlTypes and DataStorage from corefx (#4291)

7 years ago[ci] Set execute bit on run-test-mcs.sh
Alexander Köplinger [Thu, 26 Jan 2017 10:59:09 +0000 (11:59 +0100)]
[ci] Set execute bit on run-test-mcs.sh

7 years ago[ci] run mcs tests on mcs lane
Marek Safar [Thu, 26 Jan 2017 02:47:40 +0000 (21:47 -0500)]
[ci] run mcs tests on mcs lane

7 years agoFix PLATFORM_AOT_SUFFIX check in configure.ac
Alexander Köplinger [Thu, 26 Jan 2017 00:33:49 +0000 (01:33 +0100)]
Fix PLATFORM_AOT_SUFFIX check in configure.ac

7 years agoSkip AOTing profile assemblies if AOT_BUILD_FLAGS is not set
Alexander Köplinger [Wed, 25 Jan 2017 19:59:01 +0000 (20:59 +0100)]
Skip AOTing profile assemblies if AOT_BUILD_FLAGS is not set

Fixes the issue from a4b3ba6177d1af7dc93ba5cce56f444eeb976611
and 6f4f3643c6abf58d97a290c74254a74173736316.

When building those profiles as part of runtime_preset=all,
the AOT_BUILD_FLAGS variable is not set so AOTing doesn't work
because the command line flag in rules.make is incomplete.

We don't really need/want to AOT for runtime_preset=all,
the point is just to make sure these BCL profiles still build.

7 years ago[tools] Simplify cecil usage in stringreplacer
Marek Safar [Tue, 24 Jan 2017 22:12:52 +0000 (17:12 -0500)]
[tools] Simplify cecil usage in  stringreplacer

7 years agoDisable winaot in the runtime_preset=all as well
Alexander Köplinger [Wed, 25 Jan 2017 19:22:18 +0000 (20:22 +0100)]
Disable winaot in the runtime_preset=all as well

It runs into the same issue as orbis (6f4f3643c6abf58d97a290c74254a74173736316).

7 years ago[appdomain] Use coop handles for most methods in System.AppDomain (#4286)
Aleksey Kliger (λgeek) [Wed, 25 Jan 2017 18:53:46 +0000 (13:53 -0500)]
[appdomain] Use coop handles for most methods in System.AppDomain (#4286)

* [runtime] Use coop handles for ves_icall_System_AppDomain_GetData

* [runtime] Add mono_string_new_utf16_handle function that returns a MonoStringHandle

* [runtime] Use coop handles for ves_icall_System_AppDomain_InternalGetProcessGuid

* [runtime] Use coop handles for System.AppDomain icalls

  - ves_icall_System_AppDomain_InternalIsFinalizingForUnload
  - ves_icall_System_AppDomain_InternalPushDomainRef
  - ves_icall_System_AppDomain_InternalPushDomainRefByID
    (This one is slightly non-trivial because we switch from MonoException to MonoError)
  - ves_icall_System_AppDomain_InternalPopDomainRef
  - ves_icall_System_AppDomain_InternalSetDomainByID

* [runtime] Use coop handles for ves_icall_System_AppDomain_InternalSetDomain

* [runtime] Use coop handles for ves_icall_System_AppDomain_SetData

* [runtime] Coop handles for some AppDomain icalls

  - ves_icall_System_AppDomain_getCurDomain
  - ves_icall_System_AppDomain_getFriendlyName
  - ves_icall_System_AppDomain_getRootDomain
  - ves_icall_System_AppDomain_getSetup

* [coop handles] Add mono_string_handle_length function

* [marshal] Add mono_marshal_xdomain_copy_value_handle

* [coop handles] Add mono_aray_new_full_handle

* [appdomain] Use handles in mono_array_clone_in_domain

* [runtime] Use coop handles for ves_icall_System_AppDomain_createDomain

* [appdomain] Use coop handles for ves_icall_System_AppDomain_InternalUnload

7 years agoMerge pull request #4276 from henricm/winaot
Marek Safar [Wed, 25 Jan 2017 18:16:04 +0000 (13:16 -0500)]
Merge pull request #4276 from henricm/winaot

Updates for winaot profile

7 years agoChanging Win32_IP_ADAPTER_INFO to struct to work on AOT builds
Henric Müller [Tue, 17 Jan 2017 15:20:03 +0000 (16:20 +0100)]
Changing Win32_IP_ADAPTER_INFO to struct to work on AOT builds

7 years agoFixing AsyncOperationManagerTest test for winaot profile
Henric Müller [Tue, 17 Jan 2017 15:18:27 +0000 (16:18 +0100)]
Fixing AsyncOperationManagerTest test for winaot profile

7 years agoFixing tests that asume IPV4 when first adapter is IPV6
Henric Müller [Tue, 17 Jan 2017 15:14:26 +0000 (16:14 +0100)]
Fixing tests that asume IPV4 when first adapter is IPV6

7 years agoEnabling NativeObjectSecurity on windows aot
Henric Müller [Tue, 17 Jan 2017 15:12:04 +0000 (16:12 +0100)]
Enabling NativeObjectSecurity on windows aot

7 years agoFixes in NetworkInformation for winaot profile
Henric Müller [Tue, 17 Jan 2017 08:29:57 +0000 (09:29 +0100)]
Fixes in NetworkInformation for winaot profile

* Enabling windows specific code for winaot profile
which were disabled with MOBILE define.
* Making sure Win32_FIXED_INFO struct can get marshalled
correctly for AOT builds.

7 years agoEnabled win specific time zone code using WIN_PLATFORM
Henric Müller [Tue, 17 Jan 2017 07:58:56 +0000 (08:58 +0100)]
Enabled win specific time zone code using WIN_PLATFORM

7 years agoEnabled win specific code in registry classes using WIN_PLATFORM
Henric Müller [Tue, 17 Jan 2017 07:58:13 +0000 (08:58 +0100)]
Enabled win specific code in registry classes using WIN_PLATFORM

7 years agoEnabling Windows specific code paths with WIN_PLATFORM
Henric Müller [Tue, 17 Jan 2017 07:48:05 +0000 (08:48 +0100)]
Enabling Windows specific code paths with WIN_PLATFORM

7 years agoAdding winaot corlib test assembly in LoadWithPartialName
Henric Müller [Tue, 17 Jan 2017 07:41:24 +0000 (08:41 +0100)]
Adding winaot corlib test assembly in LoadWithPartialName

7 years agoRemoving mini-exeptions-native-unwinder from project file
Henric Müller [Tue, 17 Jan 2017 07:37:23 +0000 (08:37 +0100)]
Removing mini-exeptions-native-unwinder from project file

7 years agoAdding .exp to git ignore file.
Henric Müller [Tue, 10 Jan 2017 10:59:54 +0000 (11:59 +0100)]
Adding .exp to git ignore file.

7 years agoAdding Console support for winaot
Henric Müller [Thu, 22 Dec 2016 13:40:55 +0000 (14:40 +0100)]
Adding Console support for winaot

Introducing a `MONO_FEATURE_CONSOLE` to be used instead of disabling
Windows specific Console related classes using `MOBILE` ifdef. The
`MONO_FEATURE_CONSOLE` will be set for profiles not setting `NO_CONSOLE`
which currently monodriod and monotouch profiles do.

7 years agoMerge pull request #4280 from vargaz/class-init-cond
Rodrigo Kumpera [Wed, 25 Jan 2017 13:53:12 +0000 (08:53 -0500)]
Merge pull request #4280 from vargaz/class-init-cond

[runtime] Implement the wait in mono_runtime_class_init_full () using…

7 years agoUpdates for winaot profile
Henric Müller [Thu, 22 Dec 2016 13:34:55 +0000 (14:34 +0100)]
Updates for winaot profile

7 years agoAdded support for Windows AOT suffix
Henric Müller [Tue, 20 Dec 2016 09:52:21 +0000 (10:52 +0100)]
Added support for Windows AOT suffix

* Adding support for .dll and .exe AOT suffixes.
* Fix issue with parsing gsharedvt optimazation flag on Windows.

7 years agoTemporarily exclude orbis from the runtime_preset=all to fix build break
Alexander Köplinger [Wed, 25 Jan 2017 02:36:31 +0000 (03:36 +0100)]
Temporarily exclude orbis from the runtime_preset=all to fix build break

It breaks on Jenkins with:

```
23:53:28 make aot-all-profile
23:53:28 MONO_PATH="class/lib/orbis/" /mnt/jenkins/workspace/test-mono-mainline-linux/label/ubuntu-1404-amd64/runtime/mono-wrapper  ,temp-path=class/lib/orbis/I18N.CJK.dll_bitcode_tmp --verbose class/lib/orbis/I18N.CJK.dll > class/lib/orbis/I18N.CJK.dll.so.aot-log
23:53:28 Cannot open assembly ',temp-path=class/lib/orbis/I18N.CJK.dll_bitcode_tmp': No such file or directory.
```

7 years ago[bcl] Fix build for orbis profile
Alexander Köplinger [Tue, 24 Jan 2017 22:55:38 +0000 (23:55 +0100)]
[bcl] Fix build for orbis profile

7 years ago[socket] Fix order of parameters for mono_w32file_create
Alexander Köplinger [Tue, 24 Jan 2017 21:35:44 +0000 (22:35 +0100)]
[socket] Fix order of parameters for mono_w32file_create

In 56edb3357c0af9eae94a01dd72c7623bd6322dd8 the call to ves_icall_System_IO_MonoIO_Open
was changed to mono_w32file_create, but that function uses a different parameter order:

```
mono_w32file_create (name, fileaccess, sharemode, createmode, attrs)
ves_icall_System_IO_MonoIO_Open (filename, mode, access_mode, share, options, error)
```

Fix the order so the parameters we pass are the intended ones.

7 years ago[msvc] Update csproj files (#4287)
monojenkins [Tue, 24 Jan 2017 17:12:19 +0000 (17:12 +0000)]
[msvc] Update csproj files (#4287)

7 years agoMerge pull request #3806 from BrzVlad/feature-parallel-gc-final
Vlad Brezae [Tue, 24 Jan 2017 11:03:05 +0000 (13:03 +0200)]
Merge pull request #3806 from BrzVlad/feature-parallel-gc-final

[sgen] Parallel concurrent major

7 years agoBump corert
Marek Safar [Mon, 23 Jan 2017 20:12:22 +0000 (15:12 -0500)]
Bump corert

7 years ago[build] Add new profile
Marek Safar [Mon, 23 Jan 2017 20:43:02 +0000 (15:43 -0500)]
[build] Add new profile

7 years ago[socket] Ensure werror is initialized to 0
Ludovic Henry [Mon, 23 Jan 2017 20:29:07 +0000 (15:29 -0500)]
[socket] Ensure werror is initialized to 0

7 years ago[build] Add System.Text.Encoding.CodePages dependency used for non-ascii files in...
Marek Safar [Mon, 23 Jan 2017 17:56:35 +0000 (12:56 -0500)]
[build] Add System.Text.Encoding.CodePages dependency used for non-ascii files in build

7 years ago[msvc] Update csproj files (#4284)
monojenkins [Mon, 23 Jan 2017 17:19:22 +0000 (17:19 +0000)]
[msvc] Update csproj files (#4284)

7 years ago[runtime] Remove duplicate unused SHA1 implementation.
Zoltan Varga [Mon, 23 Jan 2017 08:23:20 +0000 (03:23 -0500)]
[runtime] Remove duplicate unused SHA1 implementation.

7 years ago[mono-sha1] make SHA1Transform thread-safe
Bernhard Urban [Fri, 20 Jan 2017 15:15:04 +0000 (16:15 +0100)]
[mono-sha1] make SHA1Transform thread-safe

should fix https://bugzilla.xamarin.com/show_bug.cgi?id=41133

The bug exposed itself as System.MethodAccessExceptionMethod which is
thrown when a method isn't allowed to call another method.  Several
things are checked for this: Among other things, the runtime checks if
the public key in the friend list of the caller assembly matches the
public key in the callee assembly.

The issue here was that two threads computed the SHA1 at the same time,
using the same buffer and therefore computing garbage.

7 years ago[aot] Allow the redirection of aot profile output to an already opened fd using outfi...
Zoltan Varga [Mon, 23 Jan 2017 10:48:54 +0000 (05:48 -0500)]
[aot] Allow the redirection of aot profile output to an already opened fd using outfile=#<fdnum>.

7 years ago[runtime] Implement the wait in mono_runtime_class_init_full () using a cond variable...
Zoltan Varga [Fri, 20 Jan 2017 23:26:29 +0000 (18:26 -0500)]
[runtime] Implement the wait in mono_runtime_class_init_full () using a cond variable instead of a mutex.

Previously it waited for the initialization to be done using a mutex lock/unlock, which needed some additional checks before acquiring the lock. Use a normal cond variable instead. Remove some code duplication from the lock cleanup code.

7 years agoEnable AOT for all roslyn assemblies.
Zoltan Varga [Wed, 18 Jan 2017 00:50:19 +0000 (19:50 -0500)]
Enable AOT for all roslyn assemblies.

7 years agoFix a few cppcheck errors (#4281)
Alexander Köplinger [Mon, 23 Jan 2017 02:11:40 +0000 (03:11 +0100)]
Fix a few cppcheck errors (#4281)

* [zlib] Fix CppCheck error "Shifting a negative value is undefined behaviour"

This matches what upstream now does:
https://github.com/madler/zlib/blob/2edb94a3025d288dc251bc6cbb2c02e60fbd7438/inflate.c#L1529

* [scripts] Fix CppCheck error "Memory leak: nargv"

* [tests] Fix CppCheck error: "Memory leak: reference"

* [aot-compiler] Fix CppCheck error: "Resource leak: infile"

* [metadata] Fix CppCheck error: "Uninitialized variable: ret"

7 years agoMerge pull request #4274 from kumpera/cctor-abort
Rodrigo Kumpera [Sun, 22 Jan 2017 15:20:38 +0000 (10:20 -0500)]
Merge pull request #4274 from kumpera/cctor-abort

[runtime] Latest attempt at the cctor abort race. All tests passing locally.

7 years agoFix tarball build
Alexander Köplinger [Sun, 22 Jan 2017 02:13:56 +0000 (03:13 +0100)]
Fix tarball build

w32api.h wasn't included in any sources in the Makefile.
Also fix path in vcxproj, the file is in mono/utils not mono/metadata.

7 years ago[aot] Init the plt before setting acfg->methods_loaded which is accessed outside...
Zoltan Varga [Sat, 21 Jan 2017 11:04:22 +0000 (06:04 -0500)]
[aot] Init the plt before setting acfg->methods_loaded which is accessed outside the lock.

7 years ago[io-layer] Extract error (#4279)
Ludovic Henry [Sat, 21 Jan 2017 01:15:19 +0000 (20:15 -0500)]
[io-layer] Extract error (#4279)

* [file] Remove dead field

* [process] Remove wapi_getpid

* [process] Remove CloseHandle

* [io-layer] Remove dead MONO_TRACE

* [io-layer] Extract error

* [io-layer] Extract wapi.h

* [io-layer] Remove the io-layer

7 years ago[runtime] Fix the loaded llvm build.
Zoltan Varga [Sat, 21 Jan 2017 00:02:43 +0000 (19:02 -0500)]
[runtime] Fix the loaded llvm build.

7 years ago[corlib] Removes unused method
Marek Safar [Fri, 20 Jan 2017 22:23:58 +0000 (23:23 +0100)]
[corlib] Removes unused method

7 years ago[btls] Remove last traces of statically linked btls
Alexander Köplinger [Fri, 20 Jan 2017 19:34:29 +0000 (20:34 +0100)]
[btls] Remove last traces of statically linked btls

It was removed in d831fc4ec4c90930026342431641e529b2e34dc8.

7 years ago[btls] Add dependency on btls source files in Makefile so change tracking works
Alexander Köplinger [Fri, 20 Jan 2017 19:33:37 +0000 (20:33 +0100)]
[btls] Add dependency on btls source files in Makefile so change tracking works

7 years agoReally fix the file mode this time...
Alexander Köplinger [Fri, 20 Jan 2017 18:49:03 +0000 (19:49 +0100)]
Really fix the file mode this time...

Sorry, should probably get a coffee :(

7 years agoFix inadvertent file mode change in previous commit
Alexander Köplinger [Fri, 20 Jan 2017 18:44:36 +0000 (19:44 +0100)]
Fix inadvertent file mode change in previous commit

7 years ago[Facades] Refresh netstandard20 typeforwarders
Alexander Köplinger [Fri, 20 Jan 2017 18:40:55 +0000 (19:40 +0100)]
[Facades] Refresh netstandard20 typeforwarders

7 years ago[profiler] Add mono-profiler-aot.h to EXTRA_DIST
Alexander Köplinger [Fri, 20 Jan 2017 15:59:55 +0000 (16:59 +0100)]
[profiler] Add mono-profiler-aot.h to EXTRA_DIST

This broke the tarball build.