platform/upstream/dotnet/runtime.git
4 years ago[debugger] remove extraneous ErrorCode declaration (mono/mono#16862)
Ryan Lucia [Mon, 16 Sep 2019 21:14:42 +0000 (17:14 -0400)]
[debugger] remove extraneous ErrorCode declaration (mono/mono#16862)

With the single point of exit, this means the main ErrorCode isn't being written to and uninitialized memory is returned.

Commit migrated from https://github.com/mono/mono/commit/a23da4b8b33aa6929e2f82303d5a390b0cc5c422

4 years ago[wasm] Initial netcore support. (mono/mono#16718)
Zoltan Varga [Mon, 16 Sep 2019 19:42:57 +0000 (15:42 -0400)]
[wasm] Initial netcore support. (mono/mono#16718)

* [runtime] Fix configure support for netcore+out of tree builds. Add wasm support for generating netcore/config.make.

* [runtime] Add bundle support for the netcore assembly loader.

* [netcore] Add missing linker exclusion.

* [wasm] Add netcore builds, enabled by defining ENABLE_WASM_NETCORE in Make.config.

The targets are 'package-wasm-runtime-netcore' and 'package-wasm-bcl-netcore'.
The binaries are copied to out/wasm-runtime-netcore-<CONFIG> and out/wasm-bcl/netcore.

* [wasm] Add netcore support to the build system and packager.

* Fix the build.

* Fix the dynamic build.

Commit migrated from https://github.com/mono/mono/commit/422d559ea45f2e7e998825da26c3fd79a03d5e99

4 years agoStrike a size and conditional branch balance between (mono/mono#16836)
Jay Krell [Mon, 16 Sep 2019 07:10:47 +0000 (00:10 -0700)]
Strike a size and conditional branch balance between (mono/mono#16836)

https://github.com/mono/mono/pull/16835
and
 https://github.com/mono/mono/pull/16834

The main 4 call opcodes should have no conditionality here.
The non-virtuals no extra branch.
The other opcodes all have one condition and branch into common code.

Everything could be smaller or faster but not both.

Commit migrated from https://github.com/mono/mono/commit/9f3effc1775f2889e43dd3888abf6081c354ee59

4 years ago[Coop] ParseRouteInfo, fix some leaks, cleanup. (mono/mono#16815)
Jay Krell [Mon, 16 Sep 2019 04:10:12 +0000 (21:10 -0700)]
[Coop] ParseRouteInfo, fix some leaks, cleanup. (mono/mono#16815)

Commit migrated from https://github.com/mono/mono/commit/67fb575d11ef63aba77f1ece1e2dff23c2029467

4 years agoFix infrequent hangs in test-runner. (mono/mono#16793)
Johan Lorensson [Mon, 16 Sep 2019 00:51:07 +0000 (02:51 +0200)]
Fix infrequent hangs in test-runner. (mono/mono#16793)

* Fix infrequent hangs in test-runner.

test-runner has been plagued with very infrequent hangs causing long
timeouts on CI. Turns out that there is a race in AsyncStreamReader
used by Process class for handling stdout/stderr when closing down
process. Since AsyncStreamReader::Dispose didn't make sure no pending
async read requests were still in flight before closing the stream
and underlying handle, it led to a race condition deadlocking the
complete process, hanging test-runner. A similar race has also been
observed but instead of causing a deadlock, it could also manifest as an
System.ObjectDisposedException when doing EndRead while another thread
is disposing the underlying stream. Hitting that race didn't deadlock
the process but failed to complete invoke of test-runner.

Fix is to better protect the async callback and the thread doing the
dispose call. In order to make sure we don't close underlying handle
while still having async reads in flight, fix also checks async result
for completion and if not completed when trying to dispose AsyncStreamReader
it will try to cancel outstanding pending IO and wait for completion
before closing the stream.

Since the issue has only been seen on Windows, the fix will try
to cancel pending IO and wait for completion before closing stream
on Windows. On other platforms, old behavior will be preserved, meaning
that the implementation will still be vunarable to race between pending
reads and close of stream, but since problem has not been observed on
other platforms and since there is no good way of cancel outstanding
blocking reads, old behavior is kept.

At some point in future we should look into replacing the implementation
of AsyncStreamReader and use cancelation tokens, but since we don't have
all corefx support around cancelation in Mono BCL, that currently won't
solve the issue, meaning that we need to bring in more classes. Since the
problem also occur in test-runner using the build BCL profile, even more
needs to be added to that profile in order to get similar support. But due
to the infrequency of the problem and that it has only been observed on
Windows, the isolated fix seems more reasonable.

* Build error fix.

* Review feedback.

* Fix type cast not working on linux builds.

* Adjust icall naming in icall-def.h.

Commit migrated from https://github.com/mono/mono/commit/7fa706a316f043068e4d37a7d512bd44295e14b0

4 years ago[Coop] GetValueInternal. (mono/mono#16811)
Jay Krell [Mon, 16 Sep 2019 00:50:25 +0000 (17:50 -0700)]
[Coop] GetValueInternal. (mono/mono#16811)

Commit migrated from https://github.com/mono/mono/commit/8da3616e7fe0ad17d249f8f00df96d3e6c683729

4 years agoFix warnings in libmono. (mono/mono#16813)
Johan Lorensson [Mon, 16 Sep 2019 00:49:53 +0000 (02:49 +0200)]
Fix warnings in libmono. (mono/mono#16813)

Commit migrated from https://github.com/mono/mono/commit/9249d38079f97896da7f97ca54342d58eddc52a6

4 years ago[netcore] Change an ArrayList to a List<T>. (mono/mono#16842)
Zoltan Varga [Mon, 16 Sep 2019 00:45:13 +0000 (20:45 -0400)]
[netcore] Change an ArrayList to a List<T>. (mono/mono#16842)

* [netcore] Change an ArrayList to a List<T>.

* [netcore] Call the generic version of Array.IndexOf () in the ICollection wrappers. Update exclusions file.

Commit migrated from https://github.com/mono/mono/commit/cdb04c042f1e57053047e28373ef35fe2a898270

4 years agoLLVM: Dump Module instead of Function in JIT mode (mono/mono#16837)
Egor Bogatov [Mon, 16 Sep 2019 00:43:10 +0000 (03:43 +0300)]
LLVM: Dump Module instead of Function in JIT mode (mono/mono#16837)

Since each function has its own module (in JIT mode) it makes sense to dump the whole module for MONO_VERBOSE_METHOD instead of just LLVM::Function.
It adds metadata, attributes and global variables (so it will be possible to copy-paste it to godbolt)

Example

static int Test(int x)
{
    return x / 10;
}

Diff for Unoptimized IR: https://www.diffchecker.com/NrF413Ts
Diff for Optimized IR: https://www.diffchecker.com/jbEkeFFS

So now we can see global variables and metadata for each function (and can easily paste them to godbolt.org)

NOTE: optimized IR for this case contains "dead" variables (dump_module allowed us to see such), we probably need some Module-wide optimizations to strip dead code such as -globaldce

NOTE2: why do we emit exceptions in the first place for this case at all?

Commit migrated from https://github.com/mono/mono/commit/0438397b8afc51aac45da55c155162e13e83cf19

4 years ago[interp] Speed up passing this parameter. (mono/mono#16846)
Jay Krell [Sun, 15 Sep 2019 19:26:41 +0000 (12:26 -0700)]
[interp] Speed up passing this parameter. (mono/mono#16846)

Commit migrated from https://github.com/mono/mono/commit/304f3add20dcdb32a3c4c095779efba3a8f5bca1

4 years agoFix small sized argument output with tracing enabled (mono/mono#16841)
Calvin Buckley [Sun, 15 Sep 2019 15:50:32 +0000 (12:50 -0300)]
Fix small sized argument output with tracing enabled (mono/mono#16841)

This is a legacy of before the profiler was used for the trace
output; it would apparently get the raw stack pointer and try to
dereference things by recalculating the offset as needed (no for
little, yes for big). However, because the profiler returns the
actual fixed-up pointer, this recalculation isn't needed on BE,
but instead grabs garbage a bit ahead on the stack.

To fix, use what was the little endian case unconditionally.

Example before:

[1: 20.70598 14] ENTER: System.Globalization.CultureInfo:.ctor (int,bool,bool)(this:700000000408fb0[System.Globalization.CultureInfo platform.exe], 271824864, -32, -32, )

Example after:

[1: 1.93377 14] ENTER: System.Globalization.CultureInfo:.ctor (int,bool,bool)(this:700000000408fb0[System.Globalization.CultureInfo platform.exe], 127, 0, 1)

Commit migrated from https://github.com/mono/mono/commit/babe881bf2753043023ee88b240c85adbcbdd767

4 years ago[Coop] ves_icall_InternalExecute. (mono/mono#16611)
Jay Krell [Fri, 13 Sep 2019 13:57:45 +0000 (06:57 -0700)]
[Coop] ves_icall_InternalExecute. (mono/mono#16611)

Commit migrated from https://github.com/mono/mono/commit/9608debd7bdf94fe27258d7365d7c04d1c648d90

4 years ago[aot] Do not wrap tool_prefix path when calling strip (mono/mono#16792)
Radek Doulik [Fri, 13 Sep 2019 13:05:27 +0000 (06:05 -0700)]
[aot] Do not wrap tool_prefix path when calling strip (mono/mono#16792)

[aot] Do not put quotes around wrapped path

Should fix: https://github.com/xamarin/xamarin-android/issues/3619

As it results in double quoting, which vanishes the effect and breaks
AOT for XA on Windows.

The actual error:

    [aot-compiler stdout] Stripping the binary: ""C:\Program Files (x86)\Microsoft Visual Studio\2019\Stable\MSBuild\Xamarin\Android\ndk\arm-linux-androideabi-"strip" --strip-symbol=\$a --strip-symbol=\$d obj\Release\90\aot\armeabi-v7a\libaot-Xamarin.Android.Arch.Core.Common.dll.so.tmp
    [aot-compiler stderr] '""C:\Program' is not recognized as an internal or external command,
    [aot-compiler stderr] operable program or batch file.
    [aot-compiler stderr] AOT of image C:\Users\peter\source\repos\App9\App9\App9.Android\obj\Release\90\android\assets\Xamarin.Android.Support.CoordinaterLayout.dll failed.

Commit migrated from https://github.com/mono/mono/commit/131b3a9a92c43d673bbe46229668062a0d447a9f

4 years agoImprove alias analysis for pointer sized variables (mono/mono#16812)
Filip Navara [Fri, 13 Sep 2019 13:02:50 +0000 (15:02 +0200)]
Improve alias analysis for pointer sized variables (mono/mono#16812)

Commit migrated from https://github.com/mono/mono/commit/10e72a7ab6237f74d0f4eabbdf6fecda66085e55

4 years ago[interp] Propagate locals and kill dead ones afterwards (mono/mono#16791)
Vlad Brezae [Fri, 13 Sep 2019 07:35:44 +0000 (10:35 +0300)]
[interp] Propagate locals and kill dead ones afterwards (mono/mono#16791)

* [interp] Add flag for locals that have their address taken

The previous handling of LDLOCA was broken because if the address was taken before the instructions that would be optimized we would miss any potential changes to the local value. Right now we just skip optimizing locals that have their address taken. This is achieved simply by not pushing LDLOC on the evaluation stack, for those locals.

* [interp] Add separate counters for optimized instructions

To provide more insight.

* [interp] Propagate locals

Whenever we generate a movloc we remember what local was copied. When loading a local we check if it's currently storing the value of another local, in which case we load the original local instead.

* [interp] Kill instructions that write to dead locals

We track the liveness of a local by counting how many times the local is loaded using ldloc. When such instructions are optimized, the ldloc counter is updated accordingly.

* [interp] Don't optimize code if under debugger

Commit migrated from https://github.com/mono/mono/commit/6908a1941b7278fe6711c75976f2434db55136f0

4 years ago[interp] Replace frame_objref with a volatile store to local. (mono/mono#16790)
Jay Krell [Fri, 13 Sep 2019 02:39:02 +0000 (19:39 -0700)]
[interp] Replace frame_objref with a volatile store to local. (mono/mono#16790)

* [interp] Replace frame_objref with volatile stores to non-volatile locals.
Non-volatiles subject to volatile read/write still get stack-packed.
Volatiles do not.

This will possibly conserve stack, unless MINT_NEWOBJ_FAST is critical path.
 It looks like it is -- enabling this for Linux/gcc/amd64 grows
  frame from 0x98 to 0xA8.

In either case, it is more efficient as the reads do not have to be volatile.
The value can be on the stack and in registers. The stack value will pin it.

* PR: Comments.

* PR: Rearrange comment for correctness, same length.

Commit migrated from https://github.com/mono/mono/commit/735b2cd20c51a926aae93f50903b4e022e851c58

4 years ago[interp] Add percentage to opcode count stats
Vlad Brezae [Thu, 12 Sep 2019 14:20:13 +0000 (17:20 +0300)]
[interp] Add percentage to opcode count stats

Commit migrated from https://github.com/mono/mono/commit/aa183799681c4d016af144e9ad1cadbe07948d64

4 years ago[interp] Disable computed goto when debugging interp
Vlad Brezae [Thu, 12 Sep 2019 11:25:45 +0000 (14:25 +0300)]
[interp] Disable computed goto when debugging interp

It makes tracing and following the code more painful.

Commit migrated from https://github.com/mono/mono/commit/6d75b066eebbc98331edfcfcbca38016adafc009

4 years ago[interp] Fix COUNT_OPS
Vlad Brezae [Thu, 12 Sep 2019 09:45:35 +0000 (12:45 +0300)]
[interp] Fix COUNT_OPS

And make it print the sorted opcode counts when runtime is shutting down

Commit migrated from https://github.com/mono/mono/commit/54a7e61115ba556fbef59c0849ded109baa67cde

4 years agoMerge pull request mono/mono#16388 from naricc/naricc/GetTotalAllocatedBytes
naricc [Thu, 12 Sep 2019 22:12:26 +0000 (18:12 -0400)]
Merge pull request mono/mono#16388 from naricc/naricc/GetTotalAllocatedBytes

Naricc/get total allocated bytes

Commit migrated from https://github.com/mono/mono/commit/bfe5e1efd36c5f3c68d967028b20869309f8e061

4 years ago[Coop] Debugger single point of exit. (mono/mono#16620)
Jay Krell [Thu, 12 Sep 2019 21:57:02 +0000 (14:57 -0700)]
[Coop] Debugger single point of exit. (mono/mono#16620)

* [Coop] Debugger single point of exit.
Extracted from https://github.com/mono/mono/pull/16614.

* Use a label per error for code size.

Commit migrated from https://github.com/mono/mono/commit/b2a1c6cd921877ff5e854e7d09fe00225ce8ff46

4 years ago[interp] Emit more stloc.np (mono/mono#16796)
Vlad Brezae [Thu, 12 Sep 2019 17:46:22 +0000 (20:46 +0300)]
[interp] Emit more stloc.np (mono/mono#16796)

Use STLOC_NP_O also for MINT_TYPE_P. It has the same behavior.

Commit migrated from https://github.com/mono/mono/commit/72405f68af0d7684c3601d0d8b2c63b966022622

4 years ago[mini] Fix couple of R4 constant folding checks (mono/mono#16782)
Filip Navara [Thu, 12 Sep 2019 16:37:52 +0000 (18:37 +0200)]
[mini] Fix couple of R4 constant folding checks (mono/mono#16782)

* Fix couple of R4 constant folding checks

* Address feedback

* Split RMOVE and FMOVE

Commit migrated from https://github.com/mono/mono/commit/017f21c2c6b3c23c248b5d9a2d6816edd5deeb04

4 years ago[interp] Remove unused parameters. (mono/mono#16773)
Jay Krell [Thu, 12 Sep 2019 12:42:23 +0000 (05:42 -0700)]
[interp] Remove unused parameters. (mono/mono#16773)

Commit migrated from https://github.com/mono/mono/commit/9bb3912590ab6e994d6cc4cf5688b30df92e360c

4 years ago[interp] Add assert in jmp that sp == stack at start. (mono/mono#16788)
Jay Krell [Thu, 12 Sep 2019 12:06:31 +0000 (05:06 -0700)]
[interp] Add assert in jmp that sp == stack at start. (mono/mono#16788)

It makes it true sometimes, only if not calling alloca.
Throwing invalid IL if false might be preferred here.

Commit migrated from https://github.com/mono/mono/commit/c7df01524a1dd6ef713bb074c199bae908532b9b

4 years ago[netcore] Add LLVM to nuget (mono/mono#16524)
Egor Bogatov [Thu, 12 Sep 2019 11:09:03 +0000 (14:09 +0300)]
[netcore] Add LLVM to nuget (mono/mono#16524)

* nuspec for llvm

* Add llvm to matrix

* fix scripts/ci/pipeline-netcore-runtime.yml

* fix scripts/ci/pipeline-netcore-runtime.yml

* fix scripts/ci/pipeline-netcore-runtime.yml

* run tests with llvm

* add macOS lane

* disable llvm tests for now

Commit migrated from https://github.com/mono/mono/commit/977a37844b158e5aabbffa65891fa2ffaf1a416c

4 years agoFix DynamicMethodToString.ToStringTest
EgorBo [Wed, 11 Sep 2019 23:03:01 +0000 (02:03 +0300)]
Fix DynamicMethodToString.ToStringTest

Commit migrated from https://github.com/mono/mono/commit/1d324e617acf855f97c191fb9ae31605e36f68b7

4 years agouse full name for llvm ir and asm dumps
EgorBo [Wed, 11 Sep 2019 22:01:39 +0000 (01:01 +0300)]
use full name for llvm ir and asm dumps

Commit migrated from https://github.com/mono/mono/commit/313ce184be497a259f9ebfd40bf1f14a8cc35794

4 years ago[interp] Fix buffer overreads and overwrites found by valgrind. (mono/mono#16726)
Jay Krell [Thu, 12 Sep 2019 00:35:05 +0000 (17:35 -0700)]
[interp] Fix buffer overreads and overwrites found by valgrind. (mono/mono#16726)

* [interp] Fix buffer overreads and overwrites found by valgrind.

* Attempt to deal with inlining correctly.

* PR: Dial back IR changes. Only IL relevant.

* PR: Dial back more -- only needed changes to .NET IL manipulation, not interpreter IR manipulation.

* PR: Remove one more line.

Commit migrated from https://github.com/mono/mono/commit/2235e37470312828bae5c0d2448f1e5ee8e651a8

4 years ago[netcore] Create a separate version of threadpool.c for netcore with the domain suppo...
Zoltan Varga [Thu, 12 Sep 2019 00:04:44 +0000 (20:04 -0400)]
[netcore] Create a separate version of threadpool.c for netcore with the domain support removed. (mono/mono#16250)

* [netcore] Create a separate version of threadpool.c for netcore with the domain support removed.

* Fix the windows build.

* Fix the build.

Commit migrated from https://github.com/mono/mono/commit/6a1ac97dc757f7004f0d6160c4a9c8c19c587ae0

4 years agoWhite space, naming convetions.
Nathan Ricci [Wed, 11 Sep 2019 18:43:06 +0000 (14:43 -0400)]
White space, naming convetions.

Commit migrated from https://github.com/mono/mono/commit/4acfcef038133d4944b342d87088e38896d1c990

4 years agoWhite space issues, typos.
Nathan Ricci [Wed, 11 Sep 2019 18:28:16 +0000 (14:28 -0400)]
White space issues, typos.

Commit migrated from https://github.com/mono/mono/commit/b88d67d5641df6d60233fa582c67f31c97de3a45

4 years ago[interp] Reduce register pressure in endfinally.
Jay Krell [Fri, 6 Sep 2019 11:52:45 +0000 (04:52 -0700)]
[interp] Reduce register pressure in endfinally.
Eventually this could contribute to stack savings. On its own, nothing.
The compiler apparently likes to create temporaries, like ip and ip - 1.
Which then have to survive functions calls, on the stack, if nonvolatile registers are exhausted.
This combats that and in a larger PR helped.

Commit migrated from https://github.com/mono/mono/commit/f4c1358ed0c496865c24ee32efa498ace0e8ed5e

4 years ago[aot] Emit interp entry code for methods which are not AOTed when using AOT profiling...
Zoltan Varga [Wed, 11 Sep 2019 04:11:51 +0000 (00:11 -0400)]
[aot] Emit interp entry code for methods which are not AOTed when using AOT profiling. Also emit most wrappers.

Commit migrated from https://github.com/mono/mono/commit/52d24a57d266d52db53381962e11e5416d3ff1f2

4 years ago[wasm] Add missing aot-profile/runtime.js. (mono/mono#16762)
Zoltan Varga [Wed, 11 Sep 2019 02:24:40 +0000 (22:24 -0400)]
[wasm] Add missing aot-profile/runtime.js. (mono/mono#16762)

* [wasm] Add missing aot-profile/runtime.js.

* [aot] Avoid writing out a zero AOTID in deterministic mode.

* [wasm] Add --aot-profile= option to packager.

Commit migrated from https://github.com/mono/mono/commit/2e78f0c739840768d192fbc27c1cfec9dacd30e8

4 years ago[docs] Improve sgen write barrier documentation (mono/mono#16761)
Vlad Brezae [Wed, 11 Sep 2019 01:54:07 +0000 (04:54 +0300)]
[docs] Improve sgen write barrier documentation (mono/mono#16761)

Commit migrated from https://github.com/mono/mono/commit/f1a57de62128506c1f72ddc65ad6bafe7e24504b

4 years ago[netcore] Disable more features. (mono/mono#16748)
Zoltan Varga [Tue, 10 Sep 2019 19:36:29 +0000 (15:36 -0400)]
[netcore] Disable more features. (mono/mono#16748)

Commit migrated from https://github.com/mono/mono/commit/697ab15c1281acfbef46c26fb668546e610bd38f

4 years ago[wasm] test cleanup (mono/mono#15727)
Larry Ewing [Tue, 10 Sep 2019 17:08:58 +0000 (12:08 -0500)]
[wasm] test cleanup (mono/mono#15727)

* [wasm] stop excluding test_0_large_nullable_invoke on wasm

* [wasm] remove wasm exclusion from test_0_simple_double_casts

* Add category MultiThreaded to more of the concurrent collection tests

* Add more MultiThreaded annotations to HttpListener2Test

* Add category MultiThreaded to HttpWebRequestTest

* [wasm] flag more tests that are taking down the runtime

* [wasm] force sockets to throw PNSE in the ctor for now

* [wasm] enable corlib interpreter tests

* [wasm] Increase timeout for corlib tests

* try to fix wasm-cross-win-release-configure on macos

Commit migrated from https://github.com/mono/mono/commit/47905828121f9929961cc105d1d0b835b3333b32

4 years agoUpdate tests exclusion
Marek Safar [Tue, 10 Sep 2019 09:17:57 +0000 (11:17 +0200)]
Update tests exclusion

Commit migrated from https://github.com/mono/mono/commit/9894bfa6fadb1b2c2c1452cda65896274ddd321f

4 years ago[netcore] Update System.Private.CoreLib public APIs
Marek Safar [Tue, 10 Sep 2019 09:08:00 +0000 (11:08 +0200)]
[netcore] Update System.Private.CoreLib public APIs

Commit migrated from https://github.com/mono/mono/commit/96b7fead3377a0944bbb16dea309749bc995226e

4 years ago[aot] move method_addresses to data.rel.so section to avoid text relocations (mono...
Bernhard Urban [Tue, 10 Sep 2019 08:16:07 +0000 (10:16 +0200)]
[aot] move method_addresses to data.rel.so section to avoid text relocations (mono/mono#16729)

[aot] move method_addresses to data.rel.so section to avoid text relocations

Another revert of a revert! ðŸŽ‰

After some discussions with @grendello and @radekdoulik, we came up with this solution. It's a better attempt to fix https://github.com/mono/mono/issues/16369 as it (1) works within the restrictions of Android 10 and (2) still works for armv7 AOT.

`.text` relocations aren't allowed in Android 10 (and this change shouldn't hurt on Linux).

AOT compilation:
```console
$ MONO_PATH=/Users/lewurm/Downloads/xamarin.android-oss-v10.0.99.136_Darwin-x86_64_pr_766265b9-Debug/bin/Debug/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v1.0/ \
MONO_ENV_OPTIONS="" \
./sdks/out/android-cross-arm-release/bin/armv7-linux-android-mono-sgen \
--aot=keep-temps,outfile=here.dll.so,asmwriter,mtriple=armv7-linux-gnueabi,tool-prefix=/Users/lewurm/android-toolchain/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-,ld-flags= \
~/Downloads/xamarin.android-oss-v10.0.99.136_Darwin-x86_64_pr_766265b9-Debug/bin/Debug/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v10.0/Mono.Android.dll

Mono Ahead of Time compiler - compiling assembly /Users/lewurm/Downloads/xamarin.android-oss-v10.0.99.136_Darwin-x86_64_pr_766265b9-Debug/bin/Debug/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v10.0/Mono.Android.dll
AOTID 7DDD05DA-37E0-813A-8C27-3E1634391BB3
Compiled: 144382/144382
Executing the native assembler: "/Users/lewurm/android-toolchain/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-as"   -mfpu=vfp3 -o /var/folders/p3/5279mmgn1p575bz28j0ngfqw0000gn/T/mono_aot_550yHJ.o /var/folders/p3/5279mmgn1p575bz28j0ngfqw0000gn/T/mono_aot_550yHJ
Executing the native linker: "/Users/lewurm/android-toolchain/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ld"  -shared -o here.dll.so.tmp  /var/folders/p3/5279mmgn1p575bz28j0ngfqw0000gn/T/mono_aot_550yHJ.o
Stripping the binary: "/Users/lewurm/android-toolchain/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-strip" --strip-symbol=\$a --strip-symbol=\$d here.dll.so.tmp
Retained input file.
JIT time: 15031 ms, Generation time: 7374 ms, Assembly+Link time: 75130 ms.
```

Before:
```console
$ grep -C 6 'method_addresses:' /var/folders/p3/5279mmgn1p575bz28j0ngfqw0000gn/T/mono_aot_550yHJ
        .align 3
jit_code_end:

        .byte 0,0,0,0
.text 1
        .align 3
method_addresses:
        .local method_addresses
        .type method_addresses,#function
ldr pc,=.Lm_0
.ltorg
ldr pc,=.Lm_1
.ltorg
$ arm-linux-androideabi-readelf -a here.dll.so | grep -i textrel
 0x00000016 (TEXTREL)                    0x0
 0x0000001e (FLAGS)                      TEXTREL
```

After switching to `.data.rel.so`:
```console
$ grep -C 6 'method_addresses:' /var/folders/p3/5279mmgn1p575bz28j0ngfqw0000gn/T/mono_aot_1YhAgn  # assembly file produced by AOT compiler
jit_code_end:

        .byte 0,0,0,0
.section ".data.rel.ro"
.subsection 0
        .align 3
method_addresses:
        .local method_addresses
        .type method_addresses,#object
ldr pc,=.Lm_0
.ltorg
ldr pc,=.Lm_1
.ltorg
$ arm-linux-androideabi-readelf -a here.dll.so | grep -i textrel
$ echo $?
1
```

Commit migrated from https://github.com/mono/mono/commit/e40e24b4cdc902c82cfe0a140cdb284611104242

4 years agoDisable failing tests
Marek Safar [Tue, 10 Sep 2019 07:04:40 +0000 (09:04 +0200)]
Disable failing tests

Commit migrated from https://github.com/mono/mono/commit/e819930ea2365e21f3f6870b1742f31f5f702ddd

4 years agoRefactored where the varaibles for allocation count live.
Nathan Ricci [Mon, 9 Sep 2019 20:39:51 +0000 (16:39 -0400)]
Refactored where the varaibles for allocation count live.

Commit migrated from https://github.com/mono/mono/commit/f7dcc20bc63febff0b8c800ec2fbcfcc16f7e252

4 years agoVtable [i] can be null so this should be check before use it. (mono/mono#16733)
Thays Grazia [Mon, 9 Sep 2019 20:07:34 +0000 (17:07 -0300)]
Vtable [i] can be null so this should be check before use it. (mono/mono#16733)

Fixes mono/mono#16712

Commit migrated from https://github.com/mono/mono/commit/055818f3449b5176dcf0e4eb07491b2501112701

4 years ago[interp] Let compiler decide clear_resume_state inlining. (mono/mono#16704)
Jay Krell [Mon, 9 Sep 2019 17:31:37 +0000 (10:31 -0700)]
[interp] Let compiler decide clear_resume_state inlining. (mono/mono#16704)

Manual inlining shows no additional stack use any longer.

Commit migrated from https://github.com/mono/mono/commit/83f965eca5cda8dc8bfd01b969a1d1481faa6977

4 years ago[llvm] Mark Vector128/Vector256 types as SIMD.
Zoltan Varga [Thu, 22 Aug 2019 06:01:17 +0000 (02:01 -0400)]
[llvm] Mark Vector128/Vector256 types as SIMD.

These are not currently supported, but marking them as simd helps llvm eliminate dead variables with these types, since
XZERO is easier to eliminate than VZERO.

Commit migrated from https://github.com/mono/mono/commit/798af6613796fcbe11cf20a33a889705483197a7

4 years agoDefault to SAFEARRAY(VARIANT) as CCW argument for object[]. (mono/mono#16673)
Nikolay Sivov [Mon, 9 Sep 2019 17:02:46 +0000 (20:02 +0300)]
Default to SAFEARRAY(VARIANT) as CCW argument for object[]. (mono/mono#16673)

* [cominterop] Add a helper to create default marshal spec for ccw arguments.

* [cominterop] Default to SAFEARRAY(VARIANT) as CCW argument for object[].

* [cominterop] Fix build with --enable-cxx.

Commit migrated from https://github.com/mono/mono/commit/8590a25b301ec08ac688e93df37fe3ef3c2ddb11

4 years ago[interp] Embrace that ip is const guint16* and remove casts to that type, (mono/mono...
Jay Krell [Mon, 9 Sep 2019 15:06:16 +0000 (08:06 -0700)]
[interp] Embrace that ip is const guint16* and remove casts to that type, (mono/mono#16708)

[interp] Embrace that ip is const guint16* and remove casts to that type.

or to gint16*. Or is there a reason for this style?

Maybe could change type but still want to cast for the deref?

Commit migrated from https://github.com/mono/mono/commit/1f76ab9270db6db36481bbfde99a7e90256b70f9

4 years ago[interp] Defer local offset allocation to compacted emit phase (mono/mono#16714)
Vlad Brezae [Mon, 9 Sep 2019 14:10:50 +0000 (17:10 +0300)]
[interp] Defer local offset allocation to compacted emit phase (mono/mono#16714)

Before this commit, the only information associated with a local was just the offset at which it resides and instructions had this offset embedded from the start. This makes it awkward to have data structures indexed on the local, or have additional information per local, which we might care at some point (for example if it is multi basic block local, if the address of the local was taken etc). In addition to this, if we will want to remove some instructions that make some locals dead, it means that we will have to compact the whole locals space and update all the offsets referenced by all instructions. We solve all these problems by resolving (and allocating) the local offset at the latest time, while emitting the instruction in the compacted byte stream. At this point dead locals will remain dead, with no additional work needed to handle them.

For now, IL locals of the current method that we are compiling are immortal. We can address that later if needed.

Commit migrated from https://github.com/mono/mono/commit/b9dbd2ff91c1ae9dbd5e1651cb239ca741406a43

4 years ago[netcore] Tweak inlining heurestic for memcpy
Filip Navara [Sat, 31 Aug 2019 16:30:16 +0000 (18:30 +0200)]
[netcore] Tweak inlining heurestic for memcpy

Commit migrated from https://github.com/mono/mono/commit/320f91129dbc839ccd19154ea687945aa0ce2a77

4 years ago[netcore][x64] Implement lowering of new SIMD OPs into SSE opcodes (mono/mono#16672)
Filip Navara [Sun, 8 Sep 2019 19:57:21 +0000 (21:57 +0200)]
[netcore][x64] Implement lowering of new SIMD OPs into SSE opcodes (mono/mono#16672)

* [netcore][x64] Implement lowering of new SIMD OPs into SSE2 or SSE4.1 opcodes.

* Implement LZCNT/POPCNT in mini JIT

* Fix C++ build

Commit migrated from https://github.com/mono/mono/commit/cf2c8575e15c53153add54453c97d1d37a6db719

4 years ago[interp] Fix debug build. (mono/mono#16720)
Jay Krell [Sun, 8 Sep 2019 06:25:33 +0000 (23:25 -0700)]
[interp] Fix debug build. (mono/mono#16720)

Commit migrated from https://github.com/mono/mono/commit/8c77bcdfaf841fea6214f8027afbc54c8db6de80

4 years ago[interp] Fix recent warnings I added. (mono/mono#16722)
Jay Krell [Sat, 7 Sep 2019 19:30:48 +0000 (12:30 -0700)]
[interp] Fix recent warnings I added. (mono/mono#16722)

Commit migrated from https://github.com/mono/mono/commit/5ba104cf39cf3ed0a6b507af7aeaf324e2a06239

4 years ago[interp] Assign sp once is enough in leave. (mono/mono#16694)
Jay Krell [Sat, 7 Sep 2019 01:48:15 +0000 (18:48 -0700)]
[interp] Assign sp once is enough in leave. (mono/mono#16694)

Move vt_sp there too.

Commit migrated from https://github.com/mono/mono/commit/b18840e92cb5b1afef6c0e5df05cc026eb32efbf

4 years agoRemove accidentally committed debug line
Alexis Christoforides [Fri, 6 Sep 2019 18:27:57 +0000 (14:27 -0400)]
Remove accidentally committed debug line

Commit migrated from https://github.com/mono/mono/commit/18fb728c65b806285454af7ef3da0faa7c7160db

4 years ago[jit][llvm] Track variable nullness separately from array length ranges/index ranges...
imhameed [Fri, 6 Sep 2019 12:55:21 +0000 (05:55 -0700)]
[jit][llvm] Track variable nullness separately from array length ranges/index ranges in abcrem. (mono/mono#16499)

* [jit][llvm] Track variable nullness separately from array length ranges/index ranges in abcrem.

"Nullness" is tracked via a separate field that is stored adjacent
variable/array value ranges; values may be "maybe-null" or "not-null";
the intersection of maybe-null and not-null yields not-null, the union of
maybe-null and not-null yields maybe-null. The existing graph traversal logic
is reused as much as possible, which makes the implementation of this
null value approximation slightly more complicated than it would be
otherwise.

Fixes https://github.com/mono/mono/issues/16310, which was caused by
the use of non-empty array length ranges as a way to encode non-null
values.

This also allows null check elision for zero-sized arrays.

* Fix C++ compatibility. Fix a typo in a comment.

* Add symmetric nullness relations.

* Make ldlen imply that the source register is not-null, similar to CHECK_THIS or any other null check.

Commit migrated from https://github.com/mono/mono/commit/b4886817efcb1825b6dad38ef6cf3999563b3581

4 years ago[metadata] Fix leaks when handling a few attributes (mono/mono#16675)
Vlad Brezae [Fri, 6 Sep 2019 07:31:39 +0000 (10:31 +0300)]
[metadata] Fix leaks when handling a few attributes (mono/mono#16675)

Callers of mono_reflection_create_custom_attr_data_args_noalloc were leaking some of the returned information. Accessed attributes are FixedBufferAttribute and UnmanagedFunctionPointerAttribute.

Commit migrated from https://github.com/mono/mono/commit/e49be5b9ec63e526d6bec04a957cbe48753b651b

4 years ago[debugger][android] It was not initialising seq_points on MonoCompile on Android...
Thays Grazia [Fri, 6 Sep 2019 01:16:50 +0000 (22:16 -0300)]
[debugger][android] It was not initialising seq_points on MonoCompile on Android, so when was compiling dynamic methods, seq_points wasn't created and we got the assert when try to single step. (mono/mono#16691)

Commit migrated from https://github.com/mono/mono/commit/c23a8906f3e0d8572a6c28b06e8a85f3d3c0ea8c

4 years ago[interp] Kill InterpFrame.ex (mono/mono#16666)
Vlad Brezae [Thu, 5 Sep 2019 20:10:13 +0000 (23:10 +0300)]
[interp] Kill InterpFrame.ex (mono/mono#16666)

* [interp] Reduce unnecessary uses of frame->ex

* [interp] Remove ex from InterpFrame

We save stack space and move the exception where it belongs, in ThreadContext. It was confusing what frame->ex really meant, it was probably not used / initialized properly. We move it now to ThreadContext where it represents the current exception being thrown during EH (when we have a resume state set).

Commit migrated from https://github.com/mono/mono/commit/f0dabc6618931ccd4c544657ed1a7f3d3d803c25

4 years ago[netcore] Bump CoreFX, core-setup dependencies (mono/mono#16681)
Filip Navara [Thu, 5 Sep 2019 18:03:47 +0000 (20:03 +0200)]
[netcore] Bump CoreFX, core-setup dependencies (mono/mono#16681)

* [netcore] Bump CoreFX, core-setup dependencies

* Update .deps.json hacks

* Update test exclusions

Commit migrated from https://github.com/mono/mono/commit/673c8835fd90c5aa05a8836fcfcf24711d456fc7

4 years ago[interp] Localize endfinally_ip to leave, and it cannot be null (barring (mono/mono...
Jay Krell [Thu, 5 Sep 2019 17:46:12 +0000 (10:46 -0700)]
[interp] Localize endfinally_ip to leave, and it cannot be null (barring (mono/mono#16676)

[interp] Localize endfinally_ip to leave, and it cannot likely be null (unless offset carefully formed).

Commit migrated from https://github.com/mono/mono/commit/7fc0f8842e19f2e9f83a4df8f6d56011b414e3b9

4 years agoFix distclean (mono/mono#16667)
Jo Shields [Thu, 5 Sep 2019 17:25:48 +0000 (13:25 -0400)]
Fix distclean (mono/mono#16667)

* Disable `subdir-objects` mode in Automake

This forces creation of subdirectories' files (e.g. .deps/*.Plo) in the
parent directory listing the source file. This works around a situation
where two different files specify files in a different parent directory
(i.e. ../../support/adler32.c in mono/metadata/ and adler32.c in
support/) both emit files into the same place (support/.deps), causing
`make distclean` to try and delete support/.deps from two different
places, breaking distclean.

This unfortunately adds a pile of Automake warnings, during autogen.

The "correct" fix is to stop specifying zlib as a pile of flat .c files,
and instead put it in its own subdirectory, conditionally including
its .la files as required.

Partially fixes https://github.com/mono/mono/issues/16605

* Ship netcore/Makefile with an empty distclean rule

We need a netcore/ directory because we write to it during configure,
and we need a netcore/Makefile with a distclean rule, so top-level
recursive distclean doesn't fail. So specify both here.

Partially fixes https://github.com/mono/mono/issues/16605

Commit migrated from https://github.com/mono/mono/commit/a67839540ef15948b4aebbdcee9ec44ee0f0e9a1

4 years agoRemove redundant function call of EscapeTypeName to make (mono/mono#16425)
Fan Yang [Thu, 5 Sep 2019 16:12:57 +0000 (12:12 -0400)]
Remove redundant function call of EscapeTypeName to make  (mono/mono#16425)

* Remove redundant function call

* Remove commented out line of code

Commit migrated from https://github.com/mono/mono/commit/abe48e3fd48407a5b76a6581ae7853c66d800b19

4 years ago[interp] Remove unused parameter to ves_pinvoke_method. (mono/mono#16677)
Jay Krell [Thu, 5 Sep 2019 15:30:59 +0000 (08:30 -0700)]
[interp] Remove unused parameter to ves_pinvoke_method. (mono/mono#16677)

[interp] Remove unused parameter to ves_pinvoke_method.

It might actually cause stack pressure (but on its own, this PR does not save stack).

Commit migrated from https://github.com/mono/mono/commit/ee85b695c8be5bddf7a29acf6674381024e16266

4 years ago[netcore] Fix the range checks for Vector.CopyTo(). (mono/mono#16663)
Zoltan Varga [Thu, 5 Sep 2019 11:55:53 +0000 (07:55 -0400)]
[netcore] Fix the range checks for Vector.CopyTo(). (mono/mono#16663)

* [netcore] Fix the range checks for Vector.CopyTo().

* [netcore] Fix Vector.get_Item () for u1/u2, the llvm type is a vector of i1/i2, so we need to zero extend.

Commit migrated from https://github.com/mono/mono/commit/c3541c27389846dafe731999b31e4ade5263dee5

4 years ago[llvm] Use branch weight metadata in some cases. (mono/mono#16668)
Zoltan Varga [Wed, 4 Sep 2019 22:17:07 +0000 (18:17 -0400)]
[llvm] Use branch weight metadata in some cases. (mono/mono#16668)

* [llvm] Add functions to create weighted branches.

* [llvm] Use weighted branches in GC_SAFE_POINT, some llvm passes doesn't seem to recognize llvm.expect so the LLVM JIT generates the slow inline.

Commit migrated from https://github.com/mono/mono/commit/db626fe9d370fb1f431667ae31a370b70275ef2b

4 years agoTake stars out of types where they make more sense.
Jay Krell [Tue, 3 Sep 2019 22:47:18 +0000 (15:47 -0700)]
Take stars out of types where they make more sense.

Co-Authored-By: Larry Ewing <lewing@microsoft.com>
Commit migrated from https://github.com/mono/mono/commit/1f21aae8cb410fb4c6e695489a27eae9d22e265d

4 years agoTake stars out of types where they make more sense.
Jay Krell [Tue, 3 Sep 2019 22:46:35 +0000 (15:46 -0700)]
Take stars out of types where they make more sense.

Co-Authored-By: Larry Ewing <lewing@microsoft.com>
Commit migrated from https://github.com/mono/mono/commit/9fc2ade131f7c2ca7b176854b7891a998065c832

4 years agoTake stars out of types where they make more sense.
Jay Krell [Tue, 3 Sep 2019 22:46:16 +0000 (15:46 -0700)]
Take stars out of types where they make more sense.

Co-Authored-By: Larry Ewing <lewing@microsoft.com>
Commit migrated from https://github.com/mono/mono/commit/4359ad66d0621afc79b4f46174a8a20acb418905

4 years agoTake stars out of types where they make more sense.
Jay Krell [Tue, 3 Sep 2019 22:45:52 +0000 (15:45 -0700)]
Take stars out of types where they make more sense.

Co-Authored-By: Larry Ewing <lewing@microsoft.com>
Commit migrated from https://github.com/mono/mono/commit/e25d2e55360d6b108a51d823c45aaaae766e0923

4 years agoTake stars out of types where they make more sense.
Jay Krell [Tue, 3 Sep 2019 22:45:36 +0000 (15:45 -0700)]
Take stars out of types where they make more sense.

Co-Authored-By: Larry Ewing <lewing@microsoft.com>
Commit migrated from https://github.com/mono/mono/commit/557645fea31c4d58987940711ca3b5ce85c7bcf9

4 years agoTake stars out of types where they make more sense.
Jay Krell [Tue, 3 Sep 2019 22:45:14 +0000 (15:45 -0700)]
Take stars out of types where they make more sense.

Co-Authored-By: Larry Ewing <lewing@microsoft.com>
Commit migrated from https://github.com/mono/mono/commit/b3f996d45d1711e0b6b0b76d15ff78665b113a96

4 years agoTake stars out of types where they make more sense.
Jay Krell [Tue, 3 Sep 2019 22:44:59 +0000 (15:44 -0700)]
Take stars out of types where they make more sense.

Co-Authored-By: Larry Ewing <lewing@microsoft.com>
Commit migrated from https://github.com/mono/mono/commit/8232c85e4c1e0e9d812513cb2221e19fafe41591

4 years agoTake stars out of types where they make more sense.
Jay Krell [Tue, 3 Sep 2019 22:44:43 +0000 (15:44 -0700)]
Take stars out of types where they make more sense.

Co-Authored-By: Larry Ewing <lewing@microsoft.com>
Commit migrated from https://github.com/mono/mono/commit/bd9ae10c7cf657e676e89eba88384e1739de6775

4 years agomore star placement
Jay Krell [Tue, 3 Sep 2019 22:43:44 +0000 (15:43 -0700)]
more star placement

Co-Authored-By: Larry Ewing <lewing@microsoft.com>
Commit migrated from https://github.com/mono/mono/commit/b071aa91925a8d5db5a4648c162b397dde383142

4 years agoMove stars to sometimes but not always onventional and wierd location. C syntax exper...
Jay Krell [Tue, 3 Sep 2019 22:43:13 +0000 (15:43 -0700)]
Move stars to sometimes but not always onventional and wierd location. C syntax experiment takes it toll for decades on.

Co-Authored-By: Larry Ewing <lewing@microsoft.com>
Commit migrated from https://github.com/mono/mono/commit/46ea28c95b5cdd9c573f3eb0c0446050c6ed3eaa

4 years agoMove stars to conventional but wierd place.
Jay Krell [Tue, 3 Sep 2019 22:42:20 +0000 (15:42 -0700)]
Move stars to conventional but wierd place.

Co-Authored-By: Larry Ewing <lewing@microsoft.com>
Commit migrated from https://github.com/mono/mono/commit/90e256352383aa3dca659f8bedf9f12fcb52dc6f

4 years agoUpdate mono/eglib/gmodule-win32.c
Jay Krell [Tue, 3 Sep 2019 22:41:54 +0000 (15:41 -0700)]
Update mono/eglib/gmodule-win32.c

Co-Authored-By: Larry Ewing <lewing@microsoft.com>
Commit migrated from https://github.com/mono/mono/commit/b8313d586aa875bd4c0916b8e52ca960d02a5739

4 years agoUpdate mono/eglib/glib.h
Jay Krell [Tue, 3 Sep 2019 22:41:11 +0000 (15:41 -0700)]
Update mono/eglib/glib.h

Co-Authored-By: Larry Ewing <lewing@microsoft.com>
Commit migrated from https://github.com/mono/mono/commit/d0817ccdc6492665fd57ca678d5fc55a216287fb

4 years agoRemove unnecessary cast.
Jay Krell [Tue, 3 Sep 2019 18:27:00 +0000 (11:27 -0700)]
Remove unnecessary cast.

Commit migrated from https://github.com/mono/mono/commit/a7357e8177a95b7b01c92e30747e823d71a8aeda

4 years agoAllocate MAX_PATH to start, but it usually wastes memory.
Jay Krell [Tue, 3 Sep 2019 18:26:06 +0000 (11:26 -0700)]
Allocate MAX_PATH to start, but it usually wastes memory.
Double later for clarity.

Commit migrated from https://github.com/mono/mono/commit/595b66c0ebe530054895f2c74bcd4212e77536b9

4 years agoFix C++?
Jay Krell [Fri, 30 Aug 2019 00:35:08 +0000 (17:35 -0700)]
Fix C++?

Commit migrated from https://github.com/mono/mono/commit/8723e49b0efa61d15e2eda74a90ac8a8f7a91b2e

4 years agocleanup
Jay Krell [Thu, 29 Aug 2019 18:47:58 +0000 (11:47 -0700)]
cleanup

Commit migrated from https://github.com/mono/mono/commit/fb6e2c75cd42dddc7ee7c62a72d0292e942a11b3

4 years agoTest invalid module.
Jay Krell [Thu, 29 Aug 2019 18:44:13 +0000 (11:44 -0700)]
Test invalid module.

Commit migrated from https://github.com/mono/mono/commit/da2471d0010eff53a63a3a6b852bb4000ce89408

4 years agoSkip psapi.dll and go right to the Windows 7 or newer versions in kernel32.dll.
Jay Krell [Thu, 29 Aug 2019 18:36:13 +0000 (11:36 -0700)]
Skip psapi.dll and go right to the Windows 7 or newer versions in kernel32.dll.

Commit migrated from https://github.com/mono/mono/commit/74f1312cd395dcb37d1123a5be6ea493c52a3053

4 years agoRemove cast.
Jay Krell [Thu, 29 Aug 2019 18:29:11 +0000 (11:29 -0700)]
Remove cast.

Commit migrated from https://github.com/mono/mono/commit/2db0c8c2d423094423137becff64d7e85996f1c2

4 years agocomments
Jay Krell [Thu, 29 Aug 2019 18:03:52 +0000 (11:03 -0700)]
comments

Commit migrated from https://github.com/mono/mono/commit/06f4f93aa554f9710527587323efc1b0b1783d1f

4 years agoRemove accident.
Jay Krell [Thu, 29 Aug 2019 16:53:12 +0000 (09:53 -0700)]
Remove accident.

Commit migrated from https://github.com/mono/mono/commit/3ca5b2687f67daefcc70e0c9b839810c84f917da

4 years agoMAX_PATH reduction.
Jay Krell [Thu, 29 Aug 2019 13:07:16 +0000 (06:07 -0700)]
MAX_PATH reduction.

Commit migrated from https://github.com/mono/mono/commit/f8be8c6de73646e7ed636d8ce1c36f997193bd66

4 years agoTweak names and fix preexisting leak under low memory.
Jay Krell [Sat, 31 Aug 2019 18:46:33 +0000 (11:46 -0700)]
Tweak names and fix preexisting leak under low memory.

Commit migrated from https://github.com/mono/mono/commit/a55da2a9036199c5c18442f465c4fd007c136e62

4 years ago[Coop] GetStackTraces.
Jay Krell [Fri, 30 Aug 2019 03:45:59 +0000 (20:45 -0700)]
[Coop] GetStackTraces.

Commit migrated from https://github.com/mono/mono/commit/14afe79a0ab064ea769025ded95ae961e8df8247

4 years agoImplement more Math LLVM intrinsics (mono/mono#16578)
Egor Bogatov [Wed, 4 Sep 2019 13:54:52 +0000 (16:54 +0300)]
Implement more Math LLVM intrinsics (mono/mono#16578)

* Implement more Math intrinsics

* Test on CI

* Update pipeline-netcore-runtime.yml

* undo "test on CI"

Commit migrated from https://github.com/mono/mono/commit/30625b25df4e3d83f6abb30cea2bd57ff0c49539

4 years ago[Coop] ves_icall_System_IOSelector_Add
Jay Krell [Tue, 3 Sep 2019 23:07:29 +0000 (16:07 -0700)]
[Coop] ves_icall_System_IOSelector_Add

Commit migrated from https://github.com/mono/mono/commit/350dd0e2de44a8ea0cfde38fdd3fb6747481e869

4 years agoThrow NRE if src or dst in Memmove are nulls (mono/mono#16650)
Egor Bogatov [Wed, 4 Sep 2019 09:01:53 +0000 (12:01 +0300)]
Throw NRE if src or dst in Memmove are nulls (mono/mono#16650)

Commit migrated from https://github.com/mono/mono/commit/1558316cecdf7186a3b792b021304c6356079bfe

4 years ago[netcore] Fix the exception thrown by the Vector<T>.CopyTo() intrinsic. (mono/mono...
Zoltan Varga [Wed, 4 Sep 2019 08:57:39 +0000 (04:57 -0400)]
[netcore] Fix the exception thrown by the Vector<T>.CopyTo() intrinsic. (mono/mono#16618)

Fixes https://github.com/mono/mono/issues/16616.

Commit migrated from https://github.com/mono/mono/commit/55ac86fe8bd738a50b2c7c63cb620f535f328dcf

4 years agoFix overly sensitive g_ascii_strncasecmp tests.
Jay Krell [Sat, 20 Jul 2019 07:18:29 +0000 (00:18 -0700)]
Fix overly sensitive g_ascii_strncasecmp tests.

Commit migrated from https://github.com/mono/mono/commit/82d4d8d81d5a5d9eefaec7bac09e9eb9cd2ce32f

4 years agoAdd g_asciiz_equal_caseinsensitive, g_ascii_equal_caseinsensitive, g_asciiz_equal.
Jay Krell [Sat, 20 Jul 2019 07:17:23 +0000 (00:17 -0700)]
Add g_asciiz_equal_caseinsensitive, g_ascii_equal_caseinsensitive, g_asciiz_equal.
The default takes a length.
"z" means zero terminated, the usually slower not preferred.

Commit migrated from https://github.com/mono/mono/commit/b66ec468dae0305d85db4fef48bed8f6d5866c4a

4 years agoCleanup and augment string handling based on https://github.com/mono/mono/pull/15522.
Jay Krell [Wed, 3 Jul 2019 02:55:10 +0000 (19:55 -0700)]
Cleanup and augment string handling based on https://github.com/mono/mono/pull/15522.

1. When comparing strings, check pointer equality.
Faster when they match, slower when they do not.

2. Provide string lowercasing into a provided buffer, which can equal
the input, to avoid extra malloc/free.

3. define G_STRING_CONSTANT_AND_LENGTH(x) (x), G_N_ELEMENTS (x) - 1
e.g. strncmp (foo, G_STRING_CONSTANT_AND_LENGTH ("version"))

Commit migrated from https://github.com/mono/mono/commit/8c288f06664c65050b153da0a8952209adc958a0

4 years ago[netcore] Enable Vector<T>.get_Item () intrinsics for floats/doubles.
Zoltan Varga [Tue, 3 Sep 2019 21:14:50 +0000 (17:14 -0400)]
[netcore] Enable Vector<T>.get_Item () intrinsics for floats/doubles.

Commit migrated from https://github.com/mono/mono/commit/e1b568b5293a5f85c0f0c6b3c68255c810c085df

4 years ago[netcore] Disable socket support to fix warnings.
Zoltan Varga [Sun, 1 Sep 2019 11:30:07 +0000 (07:30 -0400)]
[netcore] Disable socket support to fix warnings.

Commit migrated from https://github.com/mono/mono/commit/4107a1538993b75e08f5ed062a27bb76dfd20c5a