platform/upstream/dotnet/runtime.git
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

4 years agoDebugging
Alexis Christoforides [Sat, 31 Aug 2019 00:42:49 +0000 (20:42 -0400)]
Debugging

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

4 years ago[merp] Fix logic of 'is_managed' attribute
Alexis Christoforides [Sat, 31 Aug 2019 00:41:15 +0000 (20:41 -0400)]
[merp] Fix logic of 'is_managed' attribute

Commit migrated from https://github.com/mono/mono/commit/4840f4161f75d55462234cc07959e354075d4269

4 years agoFix pointing to stack on string && some add tracing
Alexis Christoforides [Fri, 30 Aug 2019 19:57:03 +0000 (15:57 -0400)]
Fix pointing to stack on string && some add tracing

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

4 years agoGuard writing to out_module
Alexis Christoforides [Fri, 30 Aug 2019 13:03:42 +0000 (09:03 -0400)]
Guard writing to out_module

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

4 years agoUpdate MONO_CORLIB_VERSION
Alexis Christoforides [Thu, 29 Aug 2019 16:19:37 +0000 (12:19 -0400)]
Update MONO_CORLIB_VERSION

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

4 years agoRemove problematic assert from SIGILL handler
Alexis Christoforides [Thu, 29 Aug 2019 15:33:39 +0000 (11:33 -0400)]
Remove problematic assert from SIGILL handler

mono_handle_native_crash() function can actually return if the native crash has triggered or has been trigerred by  more than one signal. So it is possible to reach the point of the assert

Commit migrated from https://github.com/mono/mono/commit/001398e05bc5f16119e17a737102f6f6fb027047

4 years agoAdd stub of new function when crash reporting is disabled
Alexis Christoforides [Tue, 6 Aug 2019 07:51:20 +0000 (10:51 +0300)]
Add stub of new function when crash reporting is disabled

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

4 years agoSet out_module, to avoid getting no useful information in the printout
Alexis Christoforides [Tue, 16 Jul 2019 18:42:51 +0000 (14:42 -0400)]
Set out_module, to avoid getting no useful information in the printout

It seems that without this, most/all entries in the unmanaged frames list are have no useful information.

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

4 years ago[merp] Add API method that whitelists all native libraries
Alexis Christoforides [Tue, 9 Jul 2019 00:35:17 +0000 (20:35 -0400)]
[merp] Add API method that whitelists all native libraries

This is so that complex consumers such as Visual Studio for Mac can forego attempting to enumerate all loaded libraries, register them one at a time and potentially keep the list updated

Commit migrated from https://github.com/mono/mono/commit/40a8d88d8e0178d333c53ea3cb0e53363c2304ba

4 years ago[wasm] Avoid aligning the stack bounds, they are not page aligned on wasm.
Zoltan Varga [Tue, 3 Sep 2019 17:27:24 +0000 (13:27 -0400)]
[wasm] Avoid aligning the stack bounds, they are not page aligned on wasm.

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

4 years ago[coop] CustomAttributeBuilder_GetBlob, etc. (mono/mono#16579)
Jay Krell [Tue, 3 Sep 2019 22:52:41 +0000 (15:52 -0700)]
[coop] CustomAttributeBuilder_GetBlob, etc. (mono/mono#16579)

mono_reflection_get_custom_attrs_blob_checked
 ModuleBuilder_WriteToFile
 ModuleBuilder_build_metadata

Commit migrated from https://github.com/mono/mono/commit/1780e1d1f8b01feafe6ddcb2c59d241122a6e61a

4 years ago[Coop] ves_icall_InternalInvoke. (mono/mono#16625)
Jay Krell [Tue, 3 Sep 2019 22:18:21 +0000 (15:18 -0700)]
[Coop] ves_icall_InternalInvoke. (mono/mono#16625)

* [Coop] ves_icall_InternalInvoke.

(Part taken from ves_icall_InternalExecute https://github.com/mono/mono/pull/16622.)

* error_init_reuse.

* Remove stars from types.

Commit migrated from https://github.com/mono/mono/commit/651eb7696e7887597df0eb149cd7eb222ea807b4

4 years ago[debugger][android] Fixing single step inside Exception on Android (mono/mono#16596)
Thays Grazia [Tue, 3 Sep 2019 20:28:37 +0000 (17:28 -0300)]
[debugger][android] Fixing single step inside Exception on Android (mono/mono#16596)

* Fixing single step inside Exception on Android...
The method is null because on ss_create_init_args the IL is -1 when calling method Mono_UnhandledException_internal what I think it's expected, because of that I ignore the single step on android if there is no method. (debugger-engine.c)
After that the sequence point cannot be found because it's calling a method of class DynamicMethodNameCounter what I think it's expected, because of that I remove the assert on android. (debugger-agent.c)
Fixes mono/mono#14772

* Changing comment to make it clear...

Commit migrated from https://github.com/mono/mono/commit/1046dd746f3f99e97f034a2c2b51bdb4e19128ae

4 years ago[netcore] Use CoreRT's Overlapped (mono/mono#16106)
Egor Bogatov [Tue, 3 Sep 2019 20:22:04 +0000 (23:22 +0300)]
[netcore] Use CoreRT's Overlapped (mono/mono#16106)

Made it Nullability friendly

Interop.MemFree  -> Marshal.FreeHGlobal
Interop.MemAlloc -> Marshal.AllocHGlobal

Fixes https://github.com/mono/mono/issues/15308
Fixes https://github.com/mono/mono/issues/15310

Also, copy ThreadPoolBoundHandle.PlatformNotSupported.cs

Commit migrated from https://github.com/mono/mono/commit/625af20cefcc3944fa10f341329ff40fc9e27694

4 years agoFix non-netcore warning about add_assembly_to_alc. (mono/mono#16622)
Jay Krell [Tue, 3 Sep 2019 20:09:24 +0000 (13:09 -0700)]
Fix non-netcore warning about add_assembly_to_alc. (mono/mono#16622)

Commit migrated from https://github.com/mono/mono/commit/37e49876b9b5a43f4144ca2972e5bdbfa4d75090

4 years ago[netcore] Add intrinsic implementation for Unsafe.InitBlockUnaligned
Filip Navara [Fri, 30 Aug 2019 18:40:14 +0000 (20:40 +0200)]
[netcore] Add intrinsic implementation for Unsafe.InitBlockUnaligned

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

4 years ago[interp] Transform ldloc/stloc pairs to a movloc instruction (mono/mono#16546)
Vlad Brezae [Tue, 3 Sep 2019 16:36:21 +0000 (19:36 +0300)]
[interp] Transform ldloc/stloc pairs to a movloc instruction (mono/mono#16546)

* [interp] Add stack information for each instruction

For each instruction PopN indicates how many values from the top of the stack are used by the instruction. PushN signals how many values are pushed back. These are also used to prevent values from the stack being optimized out, since they might still be used by an instruction. VarPop and VarPush mean that the number is not constant, so we need to inspect the data fields of the instruction (typically for an imethod or csignature) to figure out the stack usage.

* [interp] Convert ldloc/stloc pairs to movloc

The movloc instruction operates directly on locals. This is faster due to avoiding dispatch and stack indirection. More important is that it makes it easy to do copy propagation of locals and it has no stack usage, which means that it could even be killed if the destination local is no longer referenced (as well as STLOC_NP). In the future we could reuse this mechanism of tracking the value of a stack slot to do constant propagation and kill even more instructions (we might need to have _IMM versions of opcodes for this to work).

* [interp] Enable disabling of interp optimization

* [interp] Add time tracking stat for cprop optimizations

* [interp] Move stloc.np transformations to the cprop pass

It makes more sense to do such transformations here and we also don't want transformations in the generate phase prevent us from detecting alternative transformations when running the full pass.

* [interp] Add counter for instructions that were optimized away

* [interp] Make it explicit that we are dealing with IR code

It can be confusing in verbose output.

Commit migrated from https://github.com/mono/mono/commit/930a5d7d440a735b8b50e57ed397a700e3ee27b5

4 years ago[cominterop] Maintain object domain around ccw wrapper calls.
Nikolay Sivov [Mon, 2 Sep 2019 10:48:24 +0000 (13:48 +0300)]
[cominterop] Maintain object domain around ccw wrapper calls.

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

4 years agoRemove MAX_PATH usage in w32process (mono/mono#16553)
Ryan Lucia [Tue, 3 Sep 2019 15:41:27 +0000 (11:41 -0400)]
Remove MAX_PATH usage in w32process (mono/mono#16553)

* Remove MAX_PATH usage in w32process

* Fixes

* Shrink buffer temporarily

* More fixes

* Reset buffer size to 260

* Fix length check and add notes

* Actually free things

* Add tracing and zero len at start

* Typo

* Fix another leak

* Simplify logic

Commit migrated from https://github.com/mono/mono/commit/5377f9655d24c3ff19545398f89df462c77589b3

4 years ago[llvm] Implement more SIMD intrinsics on netcore. (mono/mono#16449)
Zoltan Varga [Tue, 3 Sep 2019 12:31:16 +0000 (08:31 -0400)]
[llvm] Implement more SIMD intrinsics on netcore. (mono/mono#16449)

* [netcore] Add intrinsics for Vector128/Vector256.Count.

* [netcore] Implement Vector<T>.get_Item () as an intrinsic.

Commit migrated from https://github.com/mono/mono/commit/98a4d5ec1eb2becf1d002a5fbb070f1079bc6fe4

4 years agoImprove Fast-Math mode for LLVM (mono/mono#16599)
Egor Bogatov [Tue, 3 Sep 2019 12:19:03 +0000 (15:19 +0300)]
Improve Fast-Math mode for LLVM (mono/mono#16599)

It turns out it's not enough to set global fast math parameters, it's also required to mark some instructions as "fast" (see https://llvm.org/docs/LangRef.html#fast-math-flags) like, for instance, clang does, see https://godbolt.org/z/U8TFST
E.g. all optimizations inside SimplifyLibCalls pass (it's a subpass of InstCombine) need it.

Commit migrated from https://github.com/mono/mono/commit/416a31796e6a34a134d251760c6055bacc39878c

4 years ago[netcore] Makefile clean up (mono/mono#16630)
Egor Bogatov [Tue, 3 Sep 2019 11:55:22 +0000 (14:55 +0300)]
[netcore] Makefile clean up (mono/mono#16630)

Remove ASP.NET sample (we currently have to download apsnet runtime everytime)
instead we can do:

dotnet new webapp

and do make patch-app APP_PATH=/path/to/myasp (works for any kind of apps/templates)

Commit migrated from https://github.com/mono/mono/commit/5692180ea21e596a08120090dd804872be3df1aa

4 years agoRelax assembly checking for 64 bit targets to allow running mixed-mode MSVC code...
Bernhard Urban [Tue, 3 Sep 2019 10:14:02 +0000 (12:14 +0200)]
Relax assembly checking for 64 bit targets to allow running mixed-mode MSVC code. (mono/mono#16330)

* [jit] Relax assembly checking for 64 bit targets to allow running mixed-mode MSVC code.

Fixes mono/mono#37913

* STACK_PTR|I8 should be the same as I8|STACK_PTR tuple

* fix i4 to ptr conv on 64bit

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

4 years ago[interp] Remove varargs from InterpFrame and recompute it instead (mono/mono#16598)
Vlad Brezae [Tue, 3 Sep 2019 08:21:56 +0000 (11:21 +0300)]
[interp] Remove varargs from InterpFrame and recompute it instead (mono/mono#16598)

It is a waste of stack space.

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

4 years agoUse CMP_GE/CMP_LE/CMP_GE_UN/CMP_LE_UN instead of manual decomposition
Filip Navara [Mon, 2 Sep 2019 21:55:07 +0000 (23:55 +0200)]
Use CMP_GE/CMP_LE/CMP_GE_UN/CMP_LE_UN instead of manual decomposition

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

4 years ago[netcore] Add intrinsics for Vector.GreaterThanOrEqual/LessThanOrEqual
Filip Navara [Sun, 1 Sep 2019 09:38:54 +0000 (11:38 +0200)]
[netcore] Add intrinsics for Vector.GreaterThanOrEqual/LessThanOrEqual

Commit migrated from https://github.com/mono/mono/commit/03899588bae58b30bd13548f49c779037a4bf177

4 years agoMirror changes from mono/coreclr (mono/mono#16547)
Dotnet-GitSync-Bot [Mon, 2 Sep 2019 20:02:59 +0000 (13:02 -0700)]
Mirror changes from mono/coreclr (mono/mono#16547)

* Move FormatTypeName to Type (dotnet/coreclrmono/mono#25631)

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
* Fix for mono

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

4 years agoMerge pull request mono/mono#16624 from filipnavara/hebrew
Egor Bogatov [Mon, 2 Sep 2019 17:43:08 +0000 (20:43 +0300)]
Merge pull request mono/mono#16624 from filipnavara/hebrew

[corlib] Add hack for Hebrew calendar data

Commit migrated from https://github.com/mono/mono/commit/73c8017b1f1f9a1350c10971acd07d1b54139923

4 years ago[Coop] Monitor. (mono/mono#16608)
Alexander Köplinger [Sun, 1 Sep 2019 13:14:17 +0000 (15:14 +0200)]
[Coop] Monitor. (mono/mono#16608)

* [Coop] Monitor.

* PR: Rename function; cleanup slightly.

* PR: And then rename the icall back.

* Rename parameter back.

Commit migrated from https://github.com/mono/mono/commit/07b7c7d82452dc4255e4d626bc4843712a0129c6

4 years ago[Coop] Fully inline NULL_HANDLE (do not even access a global variable). (mono/mono...
Jay Krell [Sun, 1 Sep 2019 13:13:20 +0000 (06:13 -0700)]
[Coop] Fully inline NULL_HANDLE (do not even access a global variable). (mono/mono#16612)

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

4 years ago[netcore] Add handle frame to loop body in GetTopLevelForwardedTypes (mono/mono#16594)
Ryan Lucia [Sun, 1 Sep 2019 01:40:52 +0000 (21:40 -0400)]
[netcore] Add handle frame to loop body in GetTopLevelForwardedTypes (mono/mono#16594)

* [netcore] Add handle frame to loop body in GetTopLevelForwardedTypes

* No early returns

* Move scope of cols

* Fix C++ builds, probably

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

4 years agoLLVM: Make Buffer.Memmove intrinsic (mono/mono#16610)
Egor Bogatov [Sat, 31 Aug 2019 23:42:44 +0000 (02:42 +0300)]
LLVM: Make Buffer.Memmove intrinsic (mono/mono#16610)

* Add memmove intrinsic

* Fix typo

* Add -lower-expect

Commit migrated from https://github.com/mono/mono/commit/6327274b54cca5ad11207c79f5a611ca1623c60f

4 years agoRename parameter back.
Jay Krell [Sat, 31 Aug 2019 17:35:14 +0000 (10:35 -0700)]
Rename parameter back.

Commit migrated from https://github.com/mono/mono/commit/24180e9106d1940795363ae70634ebe1d1446fb3

4 years agoPR: And then rename the icall back.
Jay Krell [Sat, 31 Aug 2019 17:34:32 +0000 (10:34 -0700)]
PR: And then rename the icall back.

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

4 years agoPR: Rename function; cleanup slightly.
Jay Krell [Sat, 31 Aug 2019 17:13:47 +0000 (10:13 -0700)]
PR: Rename function; cleanup slightly.

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

4 years ago[aot] Avoid crashing with --aot=llvm is used in a runtime without llvm support. ...
Zoltan Varga [Sat, 31 Aug 2019 13:03:45 +0000 (09:03 -0400)]
[aot] Avoid crashing with --aot=llvm is used in a runtime without llvm support. (mono/mono#16577)

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

4 years ago[Coop] Monitor.
Jay Krell [Sat, 31 Aug 2019 12:16:07 +0000 (05:16 -0700)]
[Coop] Monitor.

Commit migrated from https://github.com/mono/mono/commit/91445e2286023292b219f3733bc629ed65f06e96

4 years ago[coop] Allow SETUP_ICALL_FRAME (i.e. a loop) to reference calling frame w/o HANDLE_FU...
Jay Krell [Sat, 31 Aug 2019 12:20:44 +0000 (05:20 -0700)]
[coop] Allow SETUP_ICALL_FRAME (i.e. a loop) to reference calling frame w/o HANDLE_FUNCTION_ENTER or SETUP_ICALL_FUNCTION. (mono/mono#16498)

This is based on my read of https://github.com/mono/mono/pull/16487.

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

4 years ago[interp] Fixes for il_offsets associated with instructions (mono/mono#16587)
Vlad Brezae [Sat, 31 Aug 2019 10:37:06 +0000 (13:37 +0300)]
[interp] Fixes for il_offsets associated with instructions (mono/mono#16587)

* [interp] Remove some some false is_bb_start markings

Having fewer basic blocks makes potential optimizations more effective.

* [interp] Persist variables in TransformData

Thate are not used by inlined code because we don't inline code that has multiple basic blocks or clauses.

* [interp] Enable emitting of MINT_NOP instruction

This instruction will be optimized away when compacting the instruction stream.

* [interp] Clear instructions insead of removing them

Makes everything easier.

* [interp] Fix some instructions size inconsistencies

* [interp] Add more is_bb_start markings

* [interp] Add nop instead of extending bb

We should always have an IR instruction associated with an IL offset, especially when that instruction is a bb_start since we will need to branch to it and resolve the IR instruction from the il_offset.

* [interp] Simplify resolving in offset

We should always have an in_offset associated with the il_offset we are branching to.

* [interp] Add correct il_offset for all instructions

Except for special prolog instructions that will have -1 as the offset. We don't make much use of il_offset for non bb_start instructions, but they might be useful for debugging.

* [interp] Fix il_offset of some conv opcodes

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

4 years agoFollow convention -- "static inline" is only for .h files, "static" is for .c. (mono...
Jay Krell [Sat, 31 Aug 2019 07:40:33 +0000 (00:40 -0700)]
Follow convention -- "static inline" is only for .h files, "static" is for .c. (mono/mono#15502)

inlining is up to the compiler to decide.
It is used in .h files for linkage/dedup, not to affect codegen.

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

4 years ago[coop] InternalGetHashCode (mono/mono#16583)
Jay Krell [Sat, 31 Aug 2019 07:38:12 +0000 (00:38 -0700)]
[coop] InternalGetHashCode (mono/mono#16583)

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

4 years ago[runtime] Make eglib tests run on CI (mono/mono#16187)
Aleksey Kliger (λgeek) [Sat, 31 Aug 2019 06:06:25 +0000 (02:06 -0400)]
[runtime] Make eglib tests run on CI (mono/mono#16187)

[runtime] Make eglib tests run on CI

Update mono/eglib SUBDIRS to build tests after eglib is built.

Add a check-local automake rule.

Add CI steps to run the eglib tests.

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

4 years agoCleanup x86_patch and amd64_patch. (mono/mono#16474)
Jay Krell [Fri, 30 Aug 2019 21:45:55 +0000 (14:45 -0700)]
Cleanup x86_patch and amd64_patch. (mono/mono#16474)

* Cleanup x86_patch and amd64_patch.

amd64_patch has two incorrect looking probably unused cases.
 g_assert(0) and fix them.
 call and jmp indirect (one case)
 move reg RIP relative

x86_patch is large-ish inline macro.
Presumably for sharing with amd64, not inlining.
Restructure as an inline function, called once.
Try to make the code a little clearer also, with same functionality and efficiency
 (modulo the optimized perf of "if i == 4" vs. "if i")
i.e. speak of instruction_size and offset_size, not pos and boolean size.

Add to x86_patch the ability to patch jmp/call indirect,
as amd64_patch has, but which was incorrect.
This would seem useful for a later change (using "thunks"
to patch nearby data instead of patching aligned instructions,
indirect call/jmp vs. direct).

amd64_patch largely delegates to x86_patch.
One case asserts and delegates.
Move the assert to the x86 side, where an optimizing
compiler should know to remove it for x86 anyway.

Change some assert to g_assert.

Remove some unnecessary casts.

Fix an assert (https://github.com/mono/mono/pull/16471).

* Change g_assert back to assert except where making larger changes
and less expansion.

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

4 years ago[mini] publish global patches after JitInfo has been added (mono/mono#16589)
Bernhard Urban [Fri, 30 Aug 2019 20:46:10 +0000 (22:46 +0200)]
[mini] publish global patches after JitInfo has been added (mono/mono#16589)

[mini] publish global patches after JitInfo has been added

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

Consider the following example:

```csharp
static void CommonCallTarget () { }

static void TailA () {
    tailcall CommonCallTarget ();
}

static void TailB () {
    tailcall CommonCallTarget ();
}
```

Since `TailA` and `TailB` are tailcalling into `CommonCallTarget`, the resolution at patch-time is a bit tricky, that is, since it's a jump-like instruction the patching machinery won't know where it was called from. That's why we maintain a global hashtable `jump_target_hash` where each jump-site is signed up to be patched. At patch-time we know the target method (in the example `CommonCallTarget`), but since we don't know where we are coming from, we will just apply all patches for that target.

This works since ages, so why did it crash on arm64 sometimes?
When the patching happens, we check if the displacement between jump-site and target fits into it (24bit). If not, which happens not very often, we have to allocate a _thunk_:
https://github.com/mono/mono/blob/mono/mono@36296ce291f8a7b19de3eccb7a32c7e4ed9df8f2/mono/mini/mini-arm64.c#L928-L942

So instead of jumping to the target directly, we'll branch to the thunk. This is a little trampoline that loads the full address of the target and then finally branches to it. This one will live close-by the jump-site, because during compilation we will reserve specifically for that scenario some space after the generated code. For this, however, we need the JitInfo of the jump-site. And that's where the origin of the race is. Let's say:

* Thread A compiles `TailA`, and then jumps into it. Thus one patch point is in the `jump_target_hash`.
* Now Thread B compiles `TailB`, registers the patch point but has _not_ yet registered its JitInfo.
* Then Thread A continues, does the tailcall into `CommonCallTarget`, enters the patching machinery, which sees two patches. Now assume when applying the patch for `TailB` the displacement is too large, thus it tries to allocate a thunk but can't find the relevant JitInfo for it that it needs to emit the thunk. So it crashes as reported in https://github.com/mono/mono/issues/14080

As far as I can tell this only affects ARM64, ARM and PPC.

<!--
Thank you for your Pull Request!

If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.

Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->

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

4 years agoTurned the compiler server off on Windows because Named Pipes aren't fully working...
Steve Pfister [Fri, 30 Aug 2019 20:27:14 +0000 (16:27 -0400)]
Turned the compiler server off on Windows because Named Pipes aren't fully working (mono/mono#16552)

* Turned the compiler server off on Windows because Named Pipes aren't fully working

* Added win32 to the CS is turned off message

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

4 years agoRevert "[android] add hardware specific workaround for Nexus9 in armv7 mode" (mono...
Bernhard Urban [Fri, 30 Aug 2019 20:26:12 +0000 (22:26 +0200)]
Revert "[android] add hardware specific workaround for Nexus9 in armv7 mode" (mono/mono#14691)

Revert "[android] add hardware specific workaround for Nexus9 in armv7 mode"

This reverts commit mono/mono@ee90fc601e762dc31eeb90fc61b6305246ad5275 (also see https://github.com/mono/mono/pull/4878 ).

The device was released November 2014.  I think it's fair to assume it isn't widely used anymore.

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

4 years ago[netcore] Fix make patch-local-dotnet if .dotnet has more than one netcore install...
Zoltan Varga [Fri, 30 Aug 2019 18:08:41 +0000 (14:08 -0400)]
[netcore] Fix make patch-local-dotnet if .dotnet has more than one netcore install. (mono/mono#16590)

Commit migrated from https://github.com/mono/mono/commit/4997d832916d092ee5a69bd28d0ee354a49c6e35

4 years ago[coop] mono_runtime_class_init_full (mono/mono#16580)
Jay Krell [Fri, 30 Aug 2019 17:30:58 +0000 (10:30 -0700)]
[coop] mono_runtime_class_init_full (mono/mono#16580)

Commit migrated from https://github.com/mono/mono/commit/86c45ff645e59c997341ac44e95d03d4491c50eb

4 years ago[cominterop] Respect ComDefaultInterfaceAttribute when constructing ccw. (mono/mono...
Nikolay Sivov [Fri, 30 Aug 2019 16:29:54 +0000 (19:29 +0300)]
[cominterop] Respect ComDefaultInterfaceAttribute when constructing ccw. (mono/mono#16584)

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

4 years ago[Coop] ves_icall_RuntimeFieldInfo_GetRawConstantValue. (mono/mono#16582)
Jay Krell [Fri, 30 Aug 2019 14:53:40 +0000 (07:53 -0700)]
[Coop] ves_icall_RuntimeFieldInfo_GetRawConstantValue. (mono/mono#16582)

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

4 years ago[configure] remove autodection of llvm-config in $PATH (mono/mono#16569)
Bernhard Urban [Fri, 30 Aug 2019 13:16:03 +0000 (15:16 +0200)]
[configure] remove autodection of llvm-config in $PATH (mono/mono#16569)

[configure] remove autodection of llvm-config in $PATH

Instead `./autogen.sh --with-llvm=<path>` should be used if a build from `external/llvm` is not preferred.

The old behavior was confusing when a `llvm-config` is on `$PATH`, which can be the case when you have LLVM packages installed on a Linux distribution. It picked that up when `./autogen.sh --enable-llvm` was used.

/cc @brianrob

Commit migrated from https://github.com/mono/mono/commit/07045604cf8e436359d04f18eff05ae00668e752

4 years ago[interp] Compress interpreter opcode names in usual way, offsets vs. pointers. (mono...
Jay Krell [Fri, 30 Aug 2019 08:27:19 +0000 (01:27 -0700)]
[interp] Compress interpreter opcode names in usual way, offsets vs. pointers. (mono/mono#16350)

* [interp] Compress the interpreter opcode names in the usual way, by changing
from an array of pointers to an array of 16 bit offsets into one large "string".

* PR: Make mono_interp_opname a function.

Commit migrated from https://github.com/mono/mono/commit/36296ce291f8a7b19de3eccb7a32c7e4ed9df8f2

4 years ago[coop] Convert System_Runtime_Remoting_Messaging_AsyncResult, etc. (mono/mono#16566)
Jay Krell [Fri, 30 Aug 2019 03:51:15 +0000 (20:51 -0700)]
[coop] Convert System_Runtime_Remoting_Messaging_AsyncResult, etc. (mono/mono#16566)

* [coop] Convert System_Runtime_Remoting_Messaging_AsyncResult_Invoke, etc.

* Remove mono_load_remote_field_checked from this PR.

* Pin ac->msg earlier (should not matter).

* Add missing barrier.

* Pin slightly earlier -- still should not matter.

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

4 years ago[Coop] mono_runtime_class_init_full mostly single point of exit.
Jay Krell [Wed, 28 Aug 2019 00:20:02 +0000 (17:20 -0700)]
[Coop] mono_runtime_class_init_full mostly single point of exit.

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

4 years agoBump ikvm to pick up mono/mono@caa8e7f54279a47422626005d228447f5d3670d5. (mono/mono...
Zoltan Varga [Fri, 30 Aug 2019 00:46:30 +0000 (20:46 -0400)]
Bump ikvm to pick up mono/mono@caa8e7f54279a47422626005d228447f5d3670d5. (mono/mono#16567)

* Bump ikvm to pick up mono/mono@caa8e7f54279a47422626005d228447f5d3670d5.

* [monodis] Add a missing cattr parent case.

Commit migrated from https://github.com/mono/mono/commit/796a5751315dbf95bc7dedea684840e4cce84861

4 years agoMake Math.Pow, Min and Max for doubles intrinsics (mono/mono#16561)
Egor Bogatov [Thu, 29 Aug 2019 23:01:15 +0000 (02:01 +0300)]
Make Math.Pow, Min and Max for doubles intrinsics (mono/mono#16561)

* Add new Math intrinsics

* call EB.setTargetOptions only for fast-math

* Address feedback

* rename float opcodes

* Rename opcodes

* Update CoreFX.issues.rsp

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

4 years ago[simd] Implement .ctor(T[]) and CopyTo () as intrinsics. (mono/mono#16558)
Zoltan Varga [Thu, 29 Aug 2019 23:00:59 +0000 (19:00 -0400)]
[simd] Implement .ctor(T[]) and CopyTo () as intrinsics. (mono/mono#16558)

Commit migrated from https://github.com/mono/mono/commit/210b3243471a61024d54b16d4092e90134ff098e

4 years agoCleanup trampoline size checks. (mono/mono#15624)
Jay Krell [Thu, 29 Aug 2019 20:16:14 +0000 (13:16 -0700)]
Cleanup trampoline size checks. (mono/mono#15624)

Cleanup trampoline size checks.

- named `int` everywhere
- `assert` everywhere
- assert `<=` everywhere instead of `<`
- `const` almost everywhere
Names not consistent, following existing code (`size`, `buf_len`, `kMaxCode`.)

Only touching x86/amd64, granted.

Could be better -- make them two pass and avoid the presizing.

Commit migrated from https://github.com/mono/mono/commit/5390b796dd9c16eaded61c406a4cea9c66ea8905

4 years ago[netcore] Implement AssemblyLoadContext.LoadUnmanagedDllFromPath (mono/mono#16525)
Ryan Lucia [Thu, 29 Aug 2019 16:35:15 +0000 (12:35 -0400)]
[netcore] Implement AssemblyLoadContext.LoadUnmanagedDllFromPath (mono/mono#16525)

* [netcore] Implement AssemblyLoadContext.LoadUnmanagedDllFromPath

* Fixes

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

4 years ago[cominterop] Implement native-to-managed safearray marshalling. (mono/mono#16483)
Nikolay Sivov [Thu, 29 Aug 2019 12:19:09 +0000 (15:19 +0300)]
[cominterop] Implement native-to-managed safearray marshalling. (mono/mono#16483)

* [cominterop] Implement native-to-managed safearray marshalling.

* [tests] Fix index variable type.

In attempt ot fix MSVC build failure (int* vs LONG* on Windows).

* [cominterop] Use proper statement block for newly added switch entry.

* [marshal] Conditionally compile in mono_cominterop_emit_marshal_safearray().

Hopefully should fix remaining build failures.

* [cominterop] Don't free user array argument

Commit migrated from https://github.com/mono/mono/commit/421bd79f06a92372e0259be5349e4236edf0e7bb