Compare commits

...
418 Commits
Author SHA1 Message Date
Bepis 7328415ac5 Marshal extension is finally working 2020-09-04 22:41:37 +10:00
Bepis 20a03cdb8e Separate mono_delegate_to_ftnptr_impl into new method 2020-09-04 21:45:16 +10:00
Bepis 5f805b6b03 Fix extension parameter placement and convention overwriting 2020-09-04 20:07:17 +10:00
Bepis 4205769da9 Implement custom GetFunctionPointerForDelegateInternal extension 2020-09-04 19:34:03 +10:00
Zoltan Varga 5756e65a5c [runtime] Allocate code memory using MAP_JIT on apple silicon, patching code randomly crashes without it. (#20342) 2020-09-03 17:56:24 -04:00
monojenkinsandvargaz dfd7ba8ff6 Add ios support to the cmake build system. (#20333)
Co-authored-by: vargaz <[email protected]>
2020-09-03 19:57:08 +02:00
Vlad Brezae 623fc84874 [interp] Optimize out conditional branches (#20330)
* [interp] Remove unop conditional branch applied to constant

Convert it to unconditional branch

* [interp] Enable more optimization

If we failed to emit stloc.np we no longer track stack contents or try other optimizations

* [interp] Fix emit_store_value_as_local

mint_type for a native type is i4/i8 while we were loading the address of this local using LDLOC_VT. This was wrong. Passing a valuetype this is done with LDLOCA.

* [interp] Fix incorrect cond branch opcodes

We didn't emit correct conditional branch opcode, because we didn't check the new stack types, after the addition of the implicit conversion opcodes.

* [interp] Remove binop conditional branch applied to constant

Convert it to unconditional branch
2020-09-02 00:01:38 +03:00
monojenkinsandCoffeeFlux f6d04a53f9 [mono] Add mono_image_open_from_data_alc to unstable embedding API (#20303)
Xamarin-Android will need this for the net6 migration, so might as well add it before I forget about it. They currently use `mono_image_open_from_data_with_name`. cc: @grendello

Co-authored-by: CoffeeFlux <[email protected]>
2020-08-31 14:53:45 -04:00
monojenkinsandradical e5cb8c4e34 [wasm][debugger] Disable an extraneous debug message (#20317)
Recent debugger test runs were showing lot of
`CWL: Failed to lookup sequence point` messages.

These are being shown for cases like:

`CWL: list_frames: Failed to lookup sequence point. method: runtime_invoke_direct_void, native_offset: 56`

This is a warning, and doesn't need to be emitted by default.

Co-authored-by: radical <[email protected]>
2020-08-31 17:10:47 +02:00
csanchezdll 59ee4edb6e Ignore EINVAL errors on ioctl TIOCMGET/TIOCMSET so (#20219)
pseudo-ttys are usable. (#20218)
2020-08-31 15:15:09 +02:00
Stefanos Kornilios Mitsis Poiitidis c58000534f mono: result of regmask should be stored in regmask_t, not int (#20322) 2020-08-31 15:13:09 +02:00
jeffgoku 30689421ab Fix potential crash for Encoder.Convert (#20271)
GetByteCount will not return the right number of bytes needed, so GetBytes in Encoder.Convert will crash for some input
2020-08-31 15:08:58 +02:00
Eberhard BeilharzandMarkS 728b1e9258 [resgen] Honour absence of -usesourcepath (#20247)
* Only set basepath to the source directory if useSourcePath is set.
* Fixes a regression from mono 4 that happened when changing the code
  to not use reflection.

Co-authored-by: MarkS <[email protected]>
2020-08-31 11:38:39 +02:00
Leslie Zhai d71eff1541 [MIPS32] Fix mono_arch_get_cie_program and ELF_MACHINE undefined issue (#20323) 2020-08-30 12:17:16 -04:00
imhameed 8e75f5a28e [mono] Squelch Mach exception handlers (#20321)
Work around LLDB's unconditionally-installed and inflexible Mach
exception handler by installing a no-op task-wide Mach exception
handler.

See also:
- https://github.com/openjdk/jdk/blob/50cc54c730bb0f130991648d1547d42483edddc1/src/hotspot/os/bsd/os_bsd.cpp#L2810-L2817
- https://github.com/mono/mono/issues/10180#issuecomment-683119507
2020-08-29 11:23:09 -07:00
monojenkinsandvargaz cd226d8452 [runtime] Fix signature of mini_cleanup (). (#20320)
Fixes https://github.com/dotnet/runtime/issues/41470.

Co-authored-by: vargaz <[email protected]>
2020-08-29 04:05:06 -04:00
Alexander Köplinger 481e856031 Revert "[mono] Convert Environment.CurrentManagedThreadId to an icall (#20313)" (#20319)
This reverts commit 5d30ccbafc.
2020-08-28 11:05:29 +02:00
monojenkinsandEgorBo 5d30ccbafc [mono] Convert Environment.CurrentManagedThreadId to an icall (#20313)
In order to avoid the static Thread initialization (System.Thread.CurrentThread inits a static field) see https://github.com/dotnet/runtime/pull/41360

Benchmark:
```csharp
[Benchmark]
public int CurrentThreadId() => Environment.CurrentManagedThreadId;
```

Mono JIT (benchmarked on a slow machine):
```
       |          Method |     Mean |     Error |    StdDev |
       |---------------- |---------:|----------:|----------:|
master | CurrentThreadId | 7.191 ns | 0.0128 ns | 0.0107 ns |
PR     | CurrentThreadId | 5.034 ns | 0.0395 ns | 0.0350 ns |
```

Co-authored-by: EgorBo <[email protected]>
2020-08-28 10:09:43 +03:00
HinTakandRyan Lucia b1b58ccc0d Issue18826 fix (#19580)
* Look for "xmonkeysloveplay" also at the end of LC_SYMTAB section, for signed Mac OS X binaries

This extends Miguel de Icaza's previous work on allowing mono to load embedded
assemblies / shared libraries, which was in turn a workaround on recent
Mac OS X's increased security (and stopping LD_LIBRARY_PATH and friends from
working). Miguel de Icaza came up with the idea of appending all of those
embedded assemblies / shared libraries to the end of mono's main executable,
and getting it to look at its own file and unpacking resources from an offset
number + "xmonkeysloveplay" written to the end of file.

Even more recent Mac OS X starts to prefer /require binaries to be code-signed.
Code signing appends a "LC_CODE_SIGNATURE" section to the binary, thus breaking
mono's embedded resource-loading. Also code-signing requires that the binary
has no unknown parts.

To make mkbundle / mono embedded resource-loading work in a code-signing
situation, two parts are required:

- adjust mkbundle to extend the LC_SYMTAB section to cover the appended
assemblies / shared libraries, so code-signing can happen.
( addresses https://github.com/mono/mono/issues/17881 )

- adjust mono's main executable to also look at the end of the LC_SYMTAB
section for the magic offset +  "xmonkeysloveplay" token to find the embedded
resources.
( addresses https://github.com/mono/mono/issues/18826 )

This change addresses the 2nd of the above. I also tried looking for the
presence and beginnig of the LC_CODE_SIGNATURE section, but that proves
unreliable: Code-signing can pad a few null bytes after "xmonkeysloveplay"
to align the LC_CODE_SIGNATURE section to an 8(?)-byte boundary.

* saving offset before read, so later lseek does not need to backtrack on the read

This is a small simplification of the previous commit on this part of code.

* fixes wrong drop-through from mis-positioning of #endif

* Update mono/mini/main.c

Adding spaces for clarity

Co-authored-by: Ryan Lucia <[email protected]>

* Update mono/mini/main.c

Adding spaces for clarity

Co-authored-by: Ryan Lucia <[email protected]>

* Update mono/mini/main.c

Adding spaces for clarity

Co-authored-by: Ryan Lucia <[email protected]>

* Update mono/mini/main.c

Adding spaces for clarity

Co-authored-by: Ryan Lucia <[email protected]>

* Update mono/mini/main.c

Added comment about what's going on.

Co-authored-by: Ryan Lucia <[email protected]>

* Adding comments for clarity

* rename variable "h" to "bin_header", for clarity

* Limit Apple code-signing work around to only the desktop OS (vs iDevices/TV)

* remove stylistic "else"; no change in functionality

Co-authored-by: Ryan Lucia <[email protected]>
2020-08-27 11:38:38 -04:00
monojenkinsandCoffeeFlux 123ac44eb3 [mono] ALC function restructuring for unloadability (#20306)
We previously had a weird split between the domain and loader headers/files. This makes fewer things public, moves the useful ALC functions to loader-internals.h with the implementation in assembly-load-context.c, and cleans up the flow for some unloading behavior.

Co-authored-by: CoffeeFlux <[email protected]>
2020-08-27 10:56:34 -04:00
monojenkinsandvargaz 6f23092e7c Add support for using cmake in the mono runtime build. (#20309)
Not enabled by default. Ninja is used for building if available, else we fall
back to make.

Co-authored-by: vargaz <[email protected]>
2020-08-27 10:14:06 -04:00
Thays Grazia 26ae896ecb [wasm][debugger] Merge dotnet/runtime to mono/mono (#20307)
* Merge dotnet/runtime.

* Missing file.
2020-08-26 14:14:07 -03:00
monojenkinsandCoffeeFlux 990f516a4b [mono] Add mono_assembly_decref, return value on both decref and addref (#20305)
Needed for unloadability

Co-authored-by: CoffeeFlux <[email protected]>
2020-08-26 10:00:03 -04:00
monojenkinsandCoffeeFlux ad95c02c2a [mono] Enable additional warnings as errors (#20293)
This PR:
* Enables `-Wc++-compat` on all platforms: we support building the runtime as C++, so this helps catch errors before they're found in CI and will help keep the netcore build C++-compatible
* Sets `-Werror` on netcore CI for OSX

It also fixes various warnings currently present in the build.

`-Werror` should probably be extended to cover all CI platforms eventually. Adding a new platform is as simple as adding to the line in mono.proj whitelisting platforms and fixing the warnings.

Not sure if there's a better way to handle the cpuidex function, but if we're using that from mini it should definitely be in a header somewhere.

Co-authored-by: CoffeeFlux <[email protected]>
2020-08-25 17:55:37 -04:00
Alexander Köplinger d543f5e540 Update README.md 2020-08-25 22:13:18 +02:00
Alexander Köplinger d724f744bc Replace gitter links with discord 2020-08-25 22:00:57 +02:00
imhameedandAlexis Christoforides 1f3fbedc39 [runtime] Catch attempts to create enum types with an underlying type that is itself an incomplete enum type. (#20282)
* Catch attempts to create enum types with an underlying type that is itself an incomplete enum type.

Previously, only non-enum types containing fields with incomplete enum
types were forbidden.

* Permit static constant fields with incomplete types if the incomplete type is the type currently being defined

Co-authored-by: Alexis Christoforides <[email protected]>
2020-08-25 10:42:44 -07:00
monojenkinsandlateralusX 45d996b7ba Port EventPipe CoreCLR changes to Mono. (#20278)
Port changes done in the following CoreCLR PR's affecting corresponding Mono runtime EventPipe library sources:

https://github.com/dotnet/runtime/pull/36720
https://github.com/dotnet/runtime/pull/37002
https://github.com/dotnet/runtime/pull/38967
https://github.com/dotnet/runtime/pull/40191
https://github.com/dotnet/runtime/pull/40332
https://github.com/dotnet/runtime/pull/40499

EventPipe native code changes track by https://github.com/dotnet/runtime/issues/36820.

Co-authored-by: lateralusX <[email protected]>
2020-08-25 08:43:03 +02:00
imhameed 8aeab70720 Avoid following invalid pointers in mono_w32process_get_modules on Darwin. (#20277)
* Avoid following invalid pointers in mono_w32process_get_modules on Darwin.

`_dyld_get_image_name` and `_dyld_get_image_header` can return pointers
to data that will be freed or unmapped by concurrent calls to `dlclose`.
Avoid this by using `_dyld_register_func_for_add_image` and
`_dyld_register_func_for_remove_image` to install callbacks that
maintain a runtime-internal set of loaded dynamic libraries.

Some notes:

- dyld doesn't provide a public "app store friendly" API (like
`dl_iterate_phdr`) to traverse a snapshot of all loaded dynamic
libraries in a process. There are two alternative private APIs that do
this: one uses `_dyld_process_info_create` and friends and is present in
macOS 10.12 and above, and the other depends on
`_dyld_get_all_image_infos`, which is documented by Apple (... in a WWDC
video) to "go away" at some point in dyld3.

- `dladdr` linearly scans the dyld loaded image array (and each image's
segment set) for a matching address, so `image_added` will get slower as
more dynamic libraries are loaded in the process. But dyld3's
implementation of dlopen already scales linearly in time with the number
of loaded libraries. The use of `dladdr` can be avoided by using
`_dyld_register_for_image_loads` or
`_dyld_register_for_bulk_image_loads`, but those are both private APIs.

- The callbacks registered with `_dyld_register_func_for_add_image` and
`_dyld_register_func_for_remove_image` can never be unregistered, so
this is yet another thing that makes it impossible to safely unload an
embedded mono.

- `MonoW32ProcessModule::inode` only seems to be used to avoid dupicates
in other implementations of w32process; sorting the returned module list
in `mono_w32process_get_modules` wouldn't be necessary if the
`mono_dyld_image_info`s were also kept in an intrusive circular doubly
linked list.

- It looks like `mono_w32process_get_modules` in `w32process-unix-bsd.c`
has a similar race condition.

Also see: https://github.com/mono/mono/issues/20107

* Formatting.

* Make `image_added` and `image_removed` non-blocking.

It is theoretically possible for `mono_w32process_get_modules` to cause
a deadlock if either `image_added` or `image_removed` is waiting for the
image table mutex to be released and if `g_new0`, `g_strdup`,
`g_hash_table_iter_next`, or any of the symbols they depend on are
lazily bound and haven't already been resolved.

Only one thread may iterate over the image table and only one thread may
add/remove entries to/from the image table.

The writer thread attemps to lock a mutex to block readers from
iterating over the table. If the writer successfully acquires this lock,
then no readers are concurrently iterating over the image table and it
is safe to eagerly free stale data.

If the writer doesn't successfully acquire this lock, then the reader
thread is running concurrently with the writer; if this happens, the
writer pushes stale data into a limbo list. Readers opportunistically
clear this list.

Use `mono_mutex_t` instead of `MonoCoopMutex`. Hand-roll the necessary
GC state transitions inside `mono_w32process_get_modules`.

Add `mono_conc_hashtable_foreach_snapshot` to mono-conc-hashtable.{h,c}.

`MonoConcurrentHashTable` depends on the hazard pointer table
(`hazard_table` inside hazard-pointer.c), which is initialized lazily on
the first call to `mono_thread_small_id_alloc`. Perhaps this should be
explicitly initialized early during `mono_init_internal`.

* Revert "Make `image_added` and `image_removed` non-blocking."

This reverts commit a22a4440df5f0f13da29b1b90e80a3420223c2b9.

* Use mono_mutex_t instead of MonoCoopMutex

* Explicitly load symbols not used by `image_added` before `mono_w32process_get_modules` runs
2020-08-24 19:06:37 -04:00
monojenkinsandBrzVlad ced76ae314 [coop] Add configuration option to disable stack scan (#20264)
When this experiment is enabled, the GC doesn't scan stack or registers. This mode is meant to disable scanning of native frames. This implementation only makes sense in full interpreter mode, where the interp stack is scanned separately from the thread stack. Longer term we could use this mode to scan only the managed stack, also in jit mode.

The point of this mode is to be able to stress test the GC in a wasm like environment, where stack can't be scanned. We can more easily reproduce and investigate GC crashes in this configuration, that would also happen on wasm.

Co-authored-by: BrzVlad <[email protected]>
2020-08-24 23:03:37 +03:00
Zoltan Varga b854e882b4 [wasm] Bump emscripten to 2.0.1. (#20287) 2020-08-24 11:02:27 -04:00
monojenkinsandCoffeeFlux fbfc91536f [mono] Thread DllImportSearchPath flags down to LoadLibraryEx (#20292)
This mostly completes support for the attribute. Our algorithm differs a bit from CoreCLR right now, so we don't support the legacy behavior flag since it makes less since in the context of our algorithm, but this should be good enough for most cases.

Co-authored-by: CoffeeFlux <[email protected]>
2020-08-24 10:40:49 -04:00
monojenkinsandCoffeeFlux 44d5fa37ad [mono] Add more detailed logs for the PInvoke resolution process (#20291)
Similar logging was added to the managed loading algorithm when it proved extremely useful for debugging a Blazor crash, so the equivalent is probably useful for the unmanaged library algorithm as well

Co-authored-by: CoffeeFlux <[email protected]>
2020-08-24 00:24:56 -04:00
monojenkinsandCoffeeFlux eb2267f30b [mono] Don't leak coop handles, fix type in managed ALC struct (#20281)
The important change here is not leaking the coop handles, the other is because I'm too lazy to create two separate PRs for this.

Co-authored-by: CoffeeFlux <[email protected]>
2020-08-22 14:27:52 -04:00
monojenkinsandCoffeeFlux 6f0cc47bbf [mono] Disable XML file loading entirely on netcore (#20280)
Co-authored-by: CoffeeFlux <[email protected]>
2020-08-22 07:09:22 -04:00
monojenkinsandCoffeeFlux 3cb098653b [mono] Add g_ptr_array_find to eglib (#20279)
Co-authored-by: CoffeeFlux <[email protected]>
2020-08-22 07:09:02 -04:00
Zoltan Varga 8afa37c663 [runtime] Make the code which handles pinvoke lookup retries netcore only. (#20289) 2020-08-22 05:19:39 -04:00
monojenkinsandvargaz 5521167e5d [runtime] Ongoing work on mono cmake build (#20268)
Co-authored-by: vargaz <[email protected]>
2020-08-22 01:30:44 -04:00
monojenkinsandEgorBo 84d66c6b35 [mono][llvm] Revert noopt modifier (#20286)
For some reason it leads to a crash on Windows x64+FullAOT+LLVM config, investigating...

Co-authored-by: EgorBo <[email protected]>
2020-08-21 22:31:26 -04:00
monojenkinsandBrzVlad 39138f1ed5 [coop] Add handles for some SRE scenarios (#20259)
Co-authored-by: BrzVlad <[email protected]>
2020-08-22 01:38:59 +03:00
monojenkinsandfanyang-mono dc1bd5bde1 Add missing exception checkpoint (#20274)
Fixes dotnet/runtime#38826

Co-authored-by: fanyang-mono <[email protected]>
2020-08-21 19:35:46 +02:00
Alexander Köplinger e88d9ced3b Bump corefx to disable DateTime test
See https://github.com/mono/mono/issues/16623
2020-08-21 17:17:06 +02:00
monojenkinsandEgorBo f564c1d808 [mono] Add MethodImplOptions.NoOptimization support (#20265)
Mono currently just ignores `MethodImplOptions.NoOptimization` flag, this PR adds support for it.

```csharp
static int Add(int a, int b) => a + b;

[MethodImpl(MethodImplOptions.NoOptimization)]
static int Test(int a, int b) => Add(a, b) * Add(a, b); // NoOpt means - don't inline Add here, don't do opts

static void Main(string[] args)
{
    Test(1, 2);
}
```
Codegen for Test:
```asm
0000000000000000 <gram_Test__int_int_>:
<BB>:2
   0:   48 83 ec 18             sub    $0x18,%rsp
   4:   4c 89 34 24             mov    %r14,(%rsp)
   8:   4c 89 7c 24 08          mov    %r15,0x8(%rsp)
   d:   4c 8b f7                mov    %rdi,%r14
  10:   4c 8b fe                mov    %rsi,%r15
  13:   e8 29 00 00 00          callq  41 <gram_Test__int_int_+0x41>
  18:   48 89 44 24 10          mov    %rax,0x10(%rsp)
  1d:   49 8b fe                mov    %r14,%rdi
  20:   49 8b f7                mov    %r15,%rsi
  23:   e8 19 00 00 00          callq  41 <gram_Test__int_int_+0x41>
  28:   48 8b c8                mov    %rax,%rcx
  2b:   48 8b 44 24 10          mov    0x10(%rsp),%rax
  30:   0f af c1                imul   %ecx,%eax
<BB>:1
  33:   4c 8b 34 24             mov    (%rsp),%r14
  37:   4c 8b 7c 24 08          mov    0x8(%rsp),%r15
  3c:   48 83 c4 18             add    $0x18,%rsp
  40:   c3                      retq
```
with llvm backend (emits `noopt` attribute for llvm function):
```asm
0000000000000000 <gram_Test__int_int_>:
<BB>:1
   0:   55                      push   %rbp
   1:   41 57                   push   %r15
   3:   41 56                   push   %r14
   5:   53                      push   %rbx
   6:   50                      push   %rax
   7:   41 89 f6                mov    %esi,%r14d
   a:   89 fd                   mov    %edi,%ebp
   c:   eb 00                   jmp    e <gram_Test__int_int_+0xe>
   e:   eb 00                   jmp    10 <gram_Test__int_int_+0x10>
  10:   49 bf c0 b6 7c 53 37    movabs $0x5637537cb6c0,%r15
  17:   56 00 00
  1a:   49 8b 07                mov    (%r15),%rax
  1d:   89 ef                   mov    %ebp,%edi
  1f:   44 89 f6                mov    %r14d,%esi
  22:   ff d0                   callq  *%rax
  24:   89 c3                   mov    %eax,%ebx
  26:   49 8b 07                mov    (%r15),%rax
  29:   89 ef                   mov    %ebp,%edi
  2b:   44 89 f6                mov    %r14d,%esi
  2e:   ff d0                   callq  *%rax
  30:   0f af d8                imul   %eax,%ebx
  33:   89 d8                   mov    %ebx,%eax
  35:   48 83 c4 08             add    $0x8,%rsp
  39:   5b                      pop    %rbx
  3a:   41 5e                   pop    %r14
  3c:   41 5f                   pop    %r15
  3e:   5d                      pop    %rbp
  3f:   c3                      retq
```
If I replace `LLVM_ATTR_OPTIMIZE_NONE` with `LLVM_ATTR_OPTIMIZE_FOR_SIZE` it becomes https://www.diffchecker.com/S02HEp0w for llvm.

Co-authored-by: EgorBo <[email protected]>
2020-08-20 13:12:54 +02:00
monojenkinsandYoussef1313 ef1589a6cd Fix trailing whitespaces (#20254)
Related to dotnet/runtime#40887 and dotnet/runtime#40884

Co-authored-by: Youssef1313 <[email protected]>
2020-08-20 12:14:59 +02:00
Alexander Köplinger 07e2ed7708 Add --sdk_root to sdkmanager 2020-08-19 02:24:13 +02:00
Alexander Köplinger c73aa699d6 Support overriding SDK_DIR/NDK_DIR in sdks/android/Makefile
We need this for the new Jenkins Android emulator plugin since it uses a different adb version than what we have in $(ANDROID_TOOLCHAIN_DIR)/sdk.
2020-08-19 01:25:30 +02:00
Zoltan Varga 746ece2e0f [aot] Fix the lookup of jit info for WASM. On wasm, methods have no size, so (#20262)
only the method address can be looked up, jinfo->code_size is set to 1.

Fixes https://github.com/mono/mono/issues/20256.
2020-08-18 14:23:56 -04:00
monojenkinsandlateralusX 1d85cba972 Enable tests failing due to missing array ctor and lbound index checks. (#20100)
Fix https://github.com/mono/mono/pull/19494 adds missing array ctor needed by several tests currently failing as described by https://github.com/dotnet/runtime/issues/34068.

This PR fixes an additional problem hit by the IL array tests using an lbound != 0. Current Mono codegen for Set/Get/Address array methods didn't adjust index with regards to lbound causing failures in several of the array tests. NOTE, this scenario should only be hit when directly calling Set/Get/Address using IL on an array with an lbound != 0. It shouldn't affect regular szarray's at all since that code paths should never be used and the codegen currently looks up the lbounds unconditionally in the array, so if that code path ever gets hit by a szarray, it will imdediate crash, so shouldn't be causing any performance impact on szarrays. There is also an additional check on the array type as well as an additional precaution, so only arrays of type MONO_TYPE_ARRAY, hitting codegen for Set/Get/Address array method calls will adjust index based on lbound.

This PR fix the lbound index codegen for that specific code path and re-eanbles the tests currently listed in https://github.com/dotnet/runtime/issues/34068.

Co-authored-by: lateralusX <[email protected]>
2020-08-18 18:49:26 +02:00
monojenkinsandlateralusX 6d26f8ba24 Fix EventActivityIdControl test on MonoVM. (#20106)
Make EventSource call static version of EventActivityIdControl in EventPipeEventProvider instead of direct calling low level
EventPipeInternal (now only called from EventPipe* sources). Doing it that way will also keep EventPipeEventProvider.EventActivityIdControl in S.P.C meaning that tests like eventactivityidcontrol won't risk
of using methods that has been trimmed away by linker.

Added missing case into Mono's EventPipeInternal::EventActivityIdControl implementations.

Enabled eventactivityidcontrol test on Mono runtime. Adjusted test to use static EventPipeEventProvider.EventActivityIdControl version.

Co-authored-by: lateralusX <[email protected]>
2020-08-18 13:02:40 +02:00
monojenkinsandCoffeeFlux 669ed125e3 [mono] Loader improvements: bundle optimization and logging (#20246)
See individual commits and description.

Co-authored-by: CoffeeFlux <[email protected]>
2020-08-17 18:53:59 -04:00
monojenkinsandimhameed f51cfe74e3 [mono] Add X86Base support. (#20253)
Implement `BitScanForward` and `BitScanReverse` as intrinsics.

Implement `__cpuidex` as a netcore-only icall. Rename `cpuid` (in
mono-hwcap-x86.c) to `mono_cpuidex`, give it extern linkage, and add
support for extended CPUID.

Related: https://github.com/dotnet/runtime/pull/40167

Co-authored-by: imhameed <[email protected]>
2020-08-17 15:21:35 -07:00
Zoltan Varga 1ebc801381 [aot] Avoid emitting generic instances with vtype arguments on wasm to save space. (#20252)
* [aot] Avoid emitting generic instances with vtype arguments on wasm to save space.

* [aot] Avoid dedup-ing gsharedvt methods.
2020-08-17 17:15:27 -04:00
Thays Grazia 70219cc2b5 [wasm] Merge dotnet/runtime changes to mono/mono. (#20249)
* Reformatting files.
Merging dotnet/runtime to mono/mono

* Removing testharnessstartup from browserdebughost.
Fix format of EvaluateOnCallFrameTests.

* Fix package.
2020-08-15 14:03:15 -03:00
monojenkinsandCoffeeFlux 0161714a5a [mono] Make bundle filename changes netcore-only (#20251)
cc: @thaystg

Co-authored-by: CoffeeFlux <[email protected]>
2020-08-15 01:18:40 -03:00
Caleb Cornett 442aeedc5e [wasm] Add extra-emcc-flags parameter to packager (#20220)
* Add extra-emcc-flags parameter to packager

* Style fix
2020-08-14 20:52:36 -07:00
monojenkinsandvargaz 2d845f0711 [runtime] Update cmake build. (#20243)
Co-authored-by: vargaz <[email protected]>
2020-08-14 10:56:35 -04:00
monojenkinsandCoffeeFlux 02b9be1282 [mono] Improve MonoImage filename handling for bundled images (#20245)
This change means we will handle bundles consistently across platforms and ensures that the MonoImageStorage is keyed by the in-memory location rather than the assembly name, which seems less error-prone.

Co-authored-by: CoffeeFlux <[email protected]>
2020-08-14 09:42:34 -04:00
Thays Grazia 2d567b395e [wasm] Renaming debugger files. (#20244)
* Renaming projects and files as we did on dotnet/runtime repo.

* Fixing library-mono.js to run debugger tests.
Fixing typo on DebuggerTestSuite.
2020-08-14 08:29:47 -03:00
monojenkinsandakoeplinger 5f44f27a0d Cleanup old corefx/coreclr GitHub issue links (#20201)
Replace them with the current URL after the redirect.

Similar to @stephentoub's PR: https://github.com/dotnet/runtime/pull/2063.

This is a mechanical find/replace, I did not check whether the references are still accurate or issues are already fixed.

Co-authored-by: akoeplinger <[email protected]>
2020-08-13 23:14:08 +02:00
monojenkinsandthaystg 5b33599427 [wasm] Remove unnecessary console messages. (#20236)
Changing some console.log to console.debug to not pollute the console.
Changing printf to DEBUG_PRINTF to follow the debug level chosen by user.
Remove unnecessary console.log.
Fix dotnet/runtime#40721

Co-authored-by: thaystg <[email protected]>
2020-08-13 08:46:09 +02:00
Zoltan Varga 5e05c87d3d [aot] Fix an assert which is hit for generic instances with a lot of arguments. (#20238)
The c# compiler generates these for anonymous types.

Fixes https://github.com/xamarin/xamarin-macios/issues/9289.
2020-08-12 20:02:19 -04:00
monojenkinsandBrzVlad 89e7e5c210 [interp] Rework OBJREF and fix a GC issue (#20234)
Co-authored-by: BrzVlad <[email protected]>
2020-08-13 01:39:55 +03:00
monojenkinsandCoffeeFlux e3b3a6f864 [mono] Fix configure to actually disable dllmap on non-mobile platforms (#20230)
`$enable_monodroid` and `$enable_monotouch` are set to no by default, not an empty string.

Accidentally enabled globally here: https://github.com/dotnet/runtime/commit/a54d391d9daebf7b53e7f1efc1690c1c35177570#diff-294e5f7514d4059e724506770913e1d7R1386

Fixes https://github.com/dotnet/runtime/issues/40147

Co-authored-by: CoffeeFlux <[email protected]>
2020-08-12 12:35:26 -04:00
monojenkinsandBrzVlad 74243d9b93 [coop] Use handles for mono_runtime_try_invoke_array (#20225)
Co-authored-by: BrzVlad <[email protected]>
2020-08-12 17:25:32 +03:00
Zoltan Varga 92ce33daba [aot] Avoid dedup-ing non-public instances. (#20226)
This will decrease the size of the dedup assembly which can get
large with lots of instances.

Hopefully fixes https://github.com/mono/mono/issues/20224.
2020-08-11 23:35:09 -04:00
monojenkinsandbenaadams 0cd363fb98 Type.IsAssignableTo (#20206)
Resolves https://github.com/dotnet/runtime/issues/30714

Co-authored-by: benaadams <[email protected]>
2020-08-11 11:56:35 +02:00
monojenkinsandvargaz a7aa383fc6 [runtime] If the initial pinvoke lookup fails, emit some code inside the managed-to-native wrapper to retry to lookup on every call until it succeeds. (#20187)
Fixes dotnet/runtime#35219

Co-authored-by: vargaz <[email protected]>
2020-08-10 19:54:40 -04:00
Alex Thibodeau 45f2b54612 Fixing debugger hang that would occur when inspecting a field that has a Debugger.Break in it's accessor. (#20211)
Fixing TypeInfo debugger test. I added a new property which broke the num properties check.
2020-08-10 18:18:10 -03:00
Zoltan Varga 9d9ec219c1 [aot] Fix the handling of r4/r8 parameter types with attributes during generic sharing. (#20217)
The attributes need to be ignored as with the other types, otherwise gsharedvt wrappers for signatures with
parameters like double f = default will not be found.

Fixes https://github.com/mono/mono/issues/20195.
2020-08-10 08:30:49 -04:00
monojenkinsandradical 4835e29470 [wasm][debugger] Add support for invoking getters on ValueTypes (#20222)
- this allows IDEs to let users invoke property getters for ValueTypes

Co-authored-by: radical <[email protected]>
2020-08-09 21:11:58 +02:00
8a2dc9dc32 [wasm] [debugger] Support Exception Break on Debugger (handled and unhandled) (#20215)
* [wasm] [debugger] Support Exception Break on Debugger (handled and unhandled)

Based on https://github.com/mono/mono/pull/20142

* Add missing function to library_mono.js

Co-authored-by: thaystg <[email protected]>
Co-authored-by: Larry Ewing <[email protected]>
2020-08-08 12:32:02 +02:00
monojenkinsandimhameed 61ba224a6e [mono] Allow creating TypedReference * and TypedReference & via reflection. (#20221)
CoreCLR gained support for creating`TypedReference *` and `TypedReference &` via `MakePointerType` and `MakeByRefType` in https://github.com/dotnet/coreclr/pull/25817.

Reenable byref System.Void-related reflection tests.

Fixes https://github.com/dotnet/runtime/issues/31713.
Fixes https://github.com/dotnet/runtime/issues/37489.

Co-authored-by: imhameed <[email protected]>
2020-08-07 14:55:58 -07:00
monojenkinsandsteveisok 350828e54c [Wasm] Ensure monovm_initialize is called on startup and address other startup items (#20129)
This PR addresses:

- Calling monovm_initialize matches how other mono platforms init themselves (Fixes https://github.com/dotnet/runtime/issues/39074)
- Set the entry assembly (Fixes https://github.com/dotnet/runtime/issues/38994)
- Make sure the assembly location is set to empty for assemblies that are loaded from memory (Fixes https://github.com/dotnet/runtime/issues/39650)

Co-authored-by: steveisok <[email protected]>
2020-08-07 09:30:48 -04:00
monojenkins 743ebf9c09 [mono][interp] Optimize box+unbox to no-op (#20174) 2020-08-07 16:08:26 +03:00
monojenkinsandvargaz 1ae5414a2c [wasm] Fix GC support in ves_icall_get_trace (). (#20210)
Co-authored-by: vargaz <[email protected]>
2020-08-06 10:53:01 -04:00
monojenkinsandimhameed 9d4e3ba229 [mono] Don't save byref System.Void into MonoDomain::typeof_void. (#20212)
`mono_type_get_object_checked` will return the `MonoReflectionType`
referred to by `MonoDomain::typeof_void` if present. If a byref
`System.Void` is stored in this field, then
`get_ContainsGenericParameters` applied to `System.Void` will loop
indefinitely, because our implementation of
`get_ContainsGenericParameters` expects `GetElementType` to yield a
`MonoReflectionType` with one layer of "type function application"
removed.

Fixes https://github.com/dotnet/runtime/issues/37489.

Co-authored-by: imhameed <[email protected]>
2020-08-05 17:49:13 -07:00
monojenkinsandakoeplinger 9f129a6b3a Mono: Ensure tasklets are removed in netcore build (#20203)
Tasklets were an old mono-specific extension for continuations that is no longer relevant.

Co-authored-by: akoeplinger <[email protected]>
2020-08-04 22:26:08 +02:00
monojenkinsandakoeplinger 462971120c Fix warning in debugger-agent.c (#20204)
```
  CC       libmono_dbg_la-debugger-agent.lo
/Users/runner/work/1/s/src/mono/mono/mini/debugger-agent.c:1088:9: warning: unused variable 'argv' [-Wunused-variable]
                char *argv [ ] = {
```

Co-authored-by: akoeplinger <[email protected]>
2020-08-04 21:51:16 +02:00
monojenkinsandvargaz ce43eb0beb [runtime] Handle null byref returns in runtime invokes. (#20179)
Fixes https://github.com/dotnet/runtime/issues/39380.

Co-authored-by: vargaz <[email protected]>
2020-08-04 20:02:35 +02:00
monojenkinsandfanyang-mono 4ca4a459ad Check if a method is dynamic when transforming internal calls (#20199)
Fixes dotnet/runtime#38897 , by allowing transforming internal calls when method is dynamic.

Co-authored-by: fanyang-mono <[email protected]>
2020-08-03 22:11:45 -04:00
monojenkinsandakoeplinger 601a2d6e8a Fix ICU_CFLAGS in mono configure.ac (#20198)
We need to set these defines so we don't use obsolete ICU functions and cause warnings, just like we do in the CMakeLists.txt version..

Co-authored-by: akoeplinger <[email protected]>
2020-08-03 16:05:11 +02:00
Ankit Jain d09e9e21b3 [master] Bump msbuild to track xplat-master (#20189) 2020-08-02 15:43:57 +02:00
Zoltan Varga 92f54ee4c2 [runtime] Add a configure workaround for apple silicon + older config.guess versions. (#20192) 2020-08-02 15:42:47 +02:00
Neale Ferguson 71307187cb Fix __asm__ specifications for Clang (#20190)
* Fix __asm__ specs to work with clang

* 1. No need for USE_STRING_INLINES anymore
2. Code around clang bug where %r0 is being rejected from BASR instruction

* Fix a couple of more __asm__ specifications for clang
2020-07-31 15:24:58 +02:00
Zoltan Varga f0229da768 Bump emscripten to 1.40.0. (#20188) 2020-07-31 01:32:08 -04:00
Bernhard Urban-Forster 2921130fa8 [RISCV] Build fixes and simple exception handling (#20184)
* [riscv] add ELF machine definition

* [riscv] add mono_arch_get_cie_program to fix the build

* [interp] remove unused pointer

* [riscv] add offsets for MonoContext members

* [riscv] add pattern to nop_stub, so it is easier to spot in the debugger what caused the hang

* [riscv] minimal exception handling support
2020-07-30 19:20:45 -04:00
Zoltan Varga a57e7e4d5f [jit] Avoid calling mono_marshal_get_native_wrapper () too early, it needs to be called when the pinvoke method is first called. (#20177) 2020-07-30 10:04:44 -04:00
monojenkinsandakoeplinger b258af8b7f [wasm] Remove unused icalls for Environment properties (#20180)
They are no longer needed after https://github.com/dotnet/runtime/pull/38996 since we return values in managed code now.

Co-authored-by: akoeplinger <[email protected]>
2020-07-29 17:34:09 +02:00
Glenn Slayden c16f6e0955 jay.exe (ILASM): Incorrect loop indexing, fixes #14241 (#20144)
Fix incorrect loop indexing.

Fixes #14241
2020-07-29 14:30:24 +02:00
EsmeandVincent Povirk 9a66d68d96 [System] Mark BTLS callbacks as cdecl. (#19872)
Fixes crashes when BTLS is compiled for Windows x86 with Clang.

Co-authored-by: Vincent Povirk <[email protected]>
2020-07-29 14:29:48 +02:00
Karl 957d1942d1 Fix Line problem with wrapping and tabs (#20112)
Also adds a minor improvement to line wrapping, by not updating the wrap
position when it can only move it earlier. This means when processing
end-of-wrapped-line whitespace that it doesn't get adjusted every time.
Also doesn't update the previous wrap position, but that shouldn't be
used in this situation as it is only for wrapping after dashes.

The real problem that this fixes is that wrapping a line at a point such
that there was whitespace including a tab after the wrap position could
cause an infinite loop. Without the fix, with a wrap_pos > 0 (normal),
it only split the line after reaching non-whitespace. In most situations
that was OK as we norwally wrap after whitespace. However a tab is
whitespace we wrap before. Once pos was equal to wrap_pos it stopped
incrementing pos as it was now at the split position and therefore it
shouldn't change. But it didn't set split_tag, so didn't split, and
therefore didn't exit the outer loop.
2020-07-29 14:28:16 +02:00
monojenkinsandEgorBo 4c7c1181cf [mono][interp] Intrinsify MemoryMarshal.GetArrayDataReference (#20163)
it's used under the hood in String, Span, Memory, etc.
It's also a public API now.

Co-authored-by: EgorBo <[email protected]>
2020-07-29 14:11:24 +02:00
Aleksey Kliger (λgeek) b3ce259316 Make install-culture-table write to mono/culture/ (#20124)
As part of https://github.com/mono/mono/pull/19912 we moved the locale files to the mono/culture/ subdirectory.
2020-07-29 12:01:31 +02:00
monojenkinsandCoffeeFlux b6d95e093b [mono] Disable cfgdir config on Windows netcore builds (#20173)
This was already disabled with autotools, but I forgot to update winconfig.h as well.

Co-authored-by: CoffeeFlux <[email protected]>
2020-07-29 11:19:17 +02:00
monojenkinsandvargaz cb2d589e24 [interp] Add null checks to STIND opcodes. (#20176)
Co-authored-by: vargaz <[email protected]>
2020-07-29 11:04:59 +02:00
monojenkinsandkg cb630c292c Update threadpool callback error messages to fix dotnet/runtime#38803 (#20171)
EDIT: Simple test case to trigger an error:
```csharp
        ThreadPool.QueueUserWorkItem((_) => {
            throw new Exception("test");
        });
        var t = typeof(System.Threading.ThreadPool);
        var m = t.GetMethod("PumpThreadPool", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static);
        m.Invoke(null, null);
```

Co-authored-by: kg <[email protected]>
2020-07-29 10:46:04 +02:00
Thays Grazia cf9935e136 Revert "[debugger] Removing unhandled_exception which was used for android. (#20122)" (#20175)
This reverts commit 60643c36f5.
2020-07-28 19:35:45 -03:00
monojenkinsandCoffeeFlux be199e71b5 [mono] Fix warnings on OSX netcore (#20170)
This commit brings us back to zero warnings for the default build configuration.

Co-authored-by: CoffeeFlux <[email protected]>
2020-07-28 15:57:16 -04:00
Zoltan Varga ae983fe58f Apple Silicon support (#20166)
* Fix configure check for arm64+osx.

* Add mono_codeman_enable_write/disable_write functions.

* Use clang --shared for linking aot images.

* Fix eglib remapping.

* Make code memory writable during code generation.

* Enable/disable writable code around dlmalloc operations, dlmalloc allocates from code memory.

* Fix some defines.

* Fix set/clear_breakpoint.

* Fix llvm jit support.

* Fix gsharedvt.

* Force float32 to be enabled on osx/arm64.

* Add codegen macros for arm64e.

* Disable some crash tests if --disable-crash-reporting is used.

* Disable btls. Disable boehm by default.

* Fix a warning.

* Fix vararg calls, the vararg icalls assume every argument is in in own stack slot, but the default osx/arm64 calling code is the same as ios which allows small arguments to share a stack slot.

* Fix formatting.

* Fix the build.

* Use aarch64-darwin-ios as the target triple when cross compiling to ios so configure can distinguish between osx/arm64 and ios.

* Assume ios when cross compiling to aarch64-darwin.
2020-07-28 08:34:07 -04:00
monojenkinsandalexischr fbe6a9618a [mono] Use DefaultDllSearchPaths attribute for PInvokes (#20090)
So far we have been ignoring the flags contained in the attribute.

Attribute can be applied to a pinvoke method or an assembly. See https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.defaultdllimportsearchpathsattribute.-ctor?view=netcore-3.1#System_Runtime_InteropServices_DefaultDllImportSearchPathsAttribute__ctor_System_Runtime_InteropServices_DllImportSearchPath_

Co-authored-by: alexischr <[email protected]>
2020-07-28 01:22:27 -04:00
Zoltan Varga 218419e77b [wasm] Use interp-only instead of interp-llvmonly as the default execution mode. (#20159)
* [wasm] Use interp-only instead of interp-llvmonly as the default execution mode.

interp-llvmonly caused mono_llvm_only to be set, causing bad behavior like
stack walks not working.

* Address comments.
2020-07-27 21:59:29 -04:00
monojenkinsandvargaz 5d7d1b12be [jit] Add a intrinsic for ThrowForUnsupportedVectorBaseType<T>. (#20167)
Part of https://github.com/dotnet/runtime/issues/38718.

Co-authored-by: vargaz <[email protected]>
2020-07-27 20:21:23 -04:00
monojenkinsandakoeplinger f87a9d7baf [mono] Fix building multiple os/arch combinations in the same working directory (#20168)
After adding the ICU shim code to the runtime we hit an issue when e.g. compiling for "desktop" mono in a working directory that already had Browser wasm artifacts in it.
This is due to automake putting the intermediate compilation artifacts at the same location where a file was referenced from.

This means that e.g. when using `../../../libraries/Native/Unix/System.Globalization.Native/pal_icushim.c` in the Makefile.am we'd get the intermediaries in `artifacts/obj/mono/libraries/` instead of somewhere in `artifacts/obj/mono/OSX.x64.Debug`.

Later on we'd get the following error because it was reusing the existing .o file from another architecture:

```
Undefined symbols for architecture x86_64:
  "_gPalGlobalizationNative", referenced from:
    _c_qcalls in libmonoruntimesgen.a(libmonoruntimesgen_la-native-library-qcall.o)
```

Fix this by symlinking the source files into the build directory.

Co-authored-by: akoeplinger <[email protected]>
2020-07-28 01:00:33 +02:00
Thays Grazia 60643c36f5 [debugger] Removing unhandled_exception which was used for android. (#20122)
* Removing unhandled_exception that was used for android.

* Removing unhandled_exception that was used for android.
2020-07-24 11:42:15 -03:00
Alexander Köplinger c0aa77d2ea Fix Cairo issue on macOS Big Sur
Bumps bockbuild to get the changes from mono/bockbuild#162

BigSur's CoreGraphics seems to need a copy of the data to stick around longer than the surface,
so we provide it a copy of the data instead.

Backport of https://github.com/mono/mono/pull/20154 to master
2020-07-24 13:54:57 +02:00
monojenkinsandvargaz aafaa6d93f [runtime] Fix some more gc tracking problems in create_cattr_named/typed_arg. (#20155)
Co-authored-by: vargaz <[email protected]>
2020-07-24 11:23:49 +02:00
Zoltan Varga 83083ef905 [aot] Avoid a crash in generic sharing for invalid generic instances. (#20157)
Fixes https://github.com/mono/mono/issues/20138.
2020-07-23 20:58:34 -04:00
monojenkinsandvargaz 5d3116f4ff [runtime] Make sure newly created objects are pinned during a runtime invoke in create_cattr_typed/named_arg (). (#20148)
Hopefully helps with https://github.com/dotnet/runtime/issues/39473.

Co-authored-by: vargaz <[email protected]>
2020-07-22 23:05:35 +02:00
monojenkinsandvargaz 850af3ba40 [runtime] Initialize the class if needed in type_is_blittable (). (#20145)
Fixes https://github.com/dotnet/runtime/issues/39100.

Co-authored-by: vargaz <[email protected]>
2020-07-21 18:08:55 -04:00
Zoltan Varga a2fcf072e8 Bump emscripten to 1.39.20. (#20143) 2020-07-21 07:31:37 -04:00
monojenkinsandeerhardt f8d27a4847 Allow Debugger attributes to be trimmed in Mono (#20132)
* Changed debugger-agent to allow for the Debugger Attributes to not exist.
* Removed the Debugger Attributes entries from the Descriptors.xml file.

Fix mono/linker#1355

Co-authored-by: eerhardt <[email protected]>
2020-07-20 23:20:44 +02:00
monojenkinsandBrzVlad 0372a381ad [wasm] Trim down size of dotnet.wasm (#20139)
This disables several debugging features in sgen, helps the compiler remove some unused code related to concurrent collector and disables more assertion messages, but also some other logs. We might have to reenable some of them if this is problematic.

Saves about 60k on wasm

Co-authored-by: BrzVlad <[email protected]>
2020-07-19 00:40:17 +03:00
Ganbarukamo41 2058deb70f Remove some non-unicode characters from source code (#20137)
* Remove ZWS from the source code

* Remove smart quotes from source code
2020-07-18 12:45:25 +02:00
monojenkinsandvargaz 2b6531e9b4 [mono] Fix an assert which happens when marshalling ftnptr types. (#20134)
MonoClass-es created for ftnptr types have an implicit pointer field so their size is not
the same as the computed size.

Co-authored-by: vargaz <[email protected]>
2020-07-17 23:54:15 +02:00
monojenkinsandvargaz e9560636b9 Add a --enable-minimal=eventpipe configure option. Disable eventpipe on wasm. (#20095)
Co-authored-by: vargaz <[email protected]>
2020-07-17 12:28:03 -04:00
Matthew Leibowitz d8dda25c27 [Wasm] Additional signatures for SkiaSharp interop + More (#20133)
* [Wasm] Additional signatures for SkiaSharp interop

* Update InterpToNativeGenerator.cs

* Generate more APIs
Include the bits in https://github.com/dotnet/runtime/commit/aa667de1e3fff0f951d5136a45fbe8acefad9be9
2020-07-17 16:47:40 +02:00
Zoltan Varga e1ba14ff82 [wasm] Fix handling of enum types in the pinvoke generator. (#20125)
Fixes https://github.com/mono/mono/issues/20123.
2020-07-17 02:45:46 -04:00
monojenkinsandkg 28315c66b7 ICU integration and asset loading overhaul (#20029)
Co-authored-by: kg <[email protected]>
2020-07-17 02:28:26 +02:00
monojenkinsandEgorBo f026b9a31c [mono] fix bound checks for Spans in LLVM-jit mode (add extra SROA pass) (#20054)
I noticed that the following code leaves bound checks when compiled using LLVM-JIT:
```csharp
static void Test(Span<int> span)
{
    for (int i = 0; i < span.Length; i++)
        x[i] = 0;
}
```
#### Current codegen:
```asm
Test:
0000000000000000	pushq	%rax
0000000000000001	testl	%esi, %esi
0000000000000003	jle	0x3f
0000000000000005	xorl	%eax, %eax
0000000000000007	movl	%esi, %ecx
0000000000000009	cmpq	%rcx, %rax
000000000000000c	jae	0x2c
000000000000000e	nop
0000000000000010	movl	$0x0, (%rdi)
0000000000000016	incq	%rax
0000000000000019	movslq	%esi, %rcx
000000000000001c	cmpq	%rcx, %rax
000000000000001f	jge	0x3f
0000000000000021	addq	$0x4, %rdi
0000000000000025	movl	%esi, %ecx
0000000000000027	cmpq	%rcx, %rax
000000000000002a	jb	0x10
000000000000002c	movabsq	$0x7fc330531710, %rax
0000000000000036	movl	$0x106, %edi
000000000000003b	callq	*(%rax) ;; <---- bound check
000000000000003d	ud2
000000000000003f	popq	%rax
0000000000000040	retq
```
looks like an additional -sroa pass after lower-expect and instcombine fixes it:
#### New codegen:
```asm
Test:
0000000000000000	testl	%esi, %esi
0000000000000002	jle	0x1f
0000000000000004	movl	%esi, %eax
0000000000000006	nopw	%cs:(%rax,%rax)
0000000000000010	movl	$0x0, (%rdi)
0000000000000016	addq	$0x4, %rdi
000000000000001a	decq	%rax
000000000000001d	jne	0x10
000000000000001f	retq
```
Here is the original LLVM IR before optimizations: https://godbolt.org/z/PLfR6x

Co-authored-by: EgorBo <[email protected]>
2020-07-16 20:08:51 +03:00
Zoltan Varga 3856ef71f8 [wasm] Fix handling of void types in the pinvoke generator. (#20121)
Fixes https://github.com/mono/mono/issues/20120.
2020-07-15 17:56:08 -04:00
monojenkinsandBrzVlad a463d28a41 [interp] Intrinsify span ctor (#20108)
Co-authored-by: BrzVlad <[email protected]>
2020-07-15 18:37:32 +02:00
Zoltan Varga a64bca988d Bump ikvm to pick up unmanaged cconv changes. (#20119) 2020-07-15 11:48:23 -04:00
Zoltan Varga b601abd311 [wasm] Fix the propagation of exceptions through runtime invokes. (#20117)
The previous code would convert exceptions into errors which would
be rethrown later, clearing the resume state.

Hopefully fixes https://github.com/dotnet/runtime/issues/38337.
2020-07-15 02:22:33 -04:00
monojenkinsandimhameed 77ae877253 Update Mono's implementation of Vector<T> intrinsics. (#20118)
Recognize `get_AllBitsSet` instead of `get_AllOnes`; this internal
intrinsic was renamed in https://github.com/dotnet/runtime/pull/36579
(1c66ad1b71bb84a16b71bb5efcef1fa999c1c8bc).

Implement `Vector<T>.One` as an intrinsic.

Co-authored-by: imhameed <[email protected]>
2020-07-14 21:40:32 -07:00
Zoltan Varga b923fc1651 [wasm] Restrict the changes in #20113 to netcore only. (#20114) 2020-07-14 15:50:36 -04:00
monojenkinsandakoeplinger 74782ab634 WASM: Fix System.Diagnostics.Tracing (#20115)
It was missing a few signatures in wasm_m2n_invoke.g.h that caused it to fail with `WASM-ERR: CANNOT HANDLE INTERP ICALL SIG IIILIIII`

Co-authored-by: akoeplinger <[email protected]>
2020-07-14 18:07:05 +02:00
monojenkinsandlateralusX 0bced44f8f Keep weak gc handle for EventPipe delegate callback in provider. (#20110)
Delegate callback can be held in native event pipe provider instance and called multiple times during provider lifetime (enable/disable sessions). Store a weak GC reference to delegate to correctly handle case where delegate gets moved by GC. It should not be collected since delegate should be held alive by managed event pipe class.

Co-authored-by: lateralusX <[email protected]>
2020-07-14 15:09:14 +02:00
monojenkinsandvargaz 4647328f76 [wasm] Fail right away in interp_create_method_pointer () when trying to create a function pointer to a native-to-managed wrapper. (#20113)
The previous method of returning interp_no_native_to_managed doesn't work:
* The runtime expects different function pointers for different methods, returning
  the same pointer leads to all kinds of weird errors.
* On wasm, the native caller expects the function to have the right signature, so
  calling interp_no_native_managed () will leads a to signature mismatch error which is
  hard to debug.

Co-authored-by: vargaz <[email protected]>
2020-07-14 08:49:05 -04:00
monojenkins 3059051ddd Run CoreCLR runtime tests using Mono with LLVM AOT. (#20077)
- coreclr/build-test.sh now has a new subcommand: 'mono_aot', which builds a
new target, named 'MonoAotCompileTests', added to
coreclr/tests/src/runtest.proj. This target compiles the runtime tests using
Mono LLVM AOT in a simple configuration where the host platform is identical to
the target platform. Parallel compilation happens via a hack: actual
compilation happens in mono/msbuild/aot-compile.proj, a single-target msbuild
file, and runtest.proj invokes this single-purpose project and target using
batching to create multiple parallelizable instances of this project. Future
work: use the MonoAOTCompiler custom task currently used to build the iOS
sample program.

- Avoid using the runtimeVariant string when defining
coreClrProductArtifactName in mono/templates/xplat-pipeline-job.yml. There are
no "runtime variants" of CoreCLR configured with this parameter; instead,
depend on a shared non-runtime-variant build of CoreCLR.

- Mark function DISubprograms as local definitions--this is an LLVM 9
compatibility fix.

- Use --tag=CXX when linking libmonosgen-2.0.so via libtool when LLVM is linked
into Mono.

  This makes libtool use the C++ compiler driver when linking Mono--which uses
whatever platform-specific flags are necessary to link against the C++ stdlib.
Previously, libtool would use the C compiler driver, which didn't do this and
would produce shared objects with no explicit dependency on libstdc++.

  This problem is normally masked because of the very lax dynamic linking
semantics on ELF, but Mono on our CI setup is built in a CentOS 7 image (which
does not contain a C++11 libstdc++) that has a GCC 7 compatibility package
installed, along with a clang 9 installation that detects headers from the GCC
7 compatibility package. This compatibility package includes a libstdc++ linker
script that links C++11 libstdc++ components statically into the target while
dynamically linking against components present in pre-C++11 libstdc++. The end
result of all of this is that Mono built with this configuration will
dynamically depend on C++11 libstdc++ symbols that should have been statically
linked into the library, and will outright fail to run on machines without a
newer version of libstdc++ available.

- Add tests that fail after LLVM AOT compilation to issues.targets.
2020-07-13 21:05:55 -07:00
monojenkinsandhughbe c94f94bb17 Add some edge case tests for Array.CreateInstance and fix Mono handling (#19796)
Co-authored-by: hughbe <[email protected]>
2020-07-13 17:16:23 +02:00
monojenkinsandBrzVlad 047ed897dd [interp] Add intrinsics for some common operations (#20071)
These are mostly around string operations and are meant to be a quick boost in performance for some common blazor scenarios, around rendering and json parsing, before interp optimizations catch up. Even if the interpreter will have more advanced optimization passes, it is likely that it would still be much slower on these low level operations. Long term we would have methods like these AOT-ed, but, depending on how easy to maintain and how effective these turn out to be, we could also stick to intrinsifying some bcl code in the future.

Co-authored-by: BrzVlad <[email protected]>
2020-07-13 12:05:13 +03:00
monojenkinsandCoffeeFlux 4456328a3e [mono] Disable config dir lookups on netcore (#20074)
Fixes https://github.com/dotnet/runtime/issues/33079

Co-authored-by: CoffeeFlux <[email protected]>
2020-07-13 10:53:07 +02:00
Ankit Jain ee3a669dc3 [wasm][debugger] Fix callFunctionOn+silent arg behavior (#20044)
`silent` argument for `callFunctionOn` should not cause errors to be
suppressed. According to the protocol docs:

`In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.`

- so, the result returned should have the error, if any.
- Added corresponding JS test, so that we know we are matching the
correct behavior.
2020-07-10 18:54:22 -04:00
monojenkinsandBrzVlad 9ecb588fc7 [interp] Add debug option which reports the hottest methods (#20097)
This tracks how many interpreter opcodes were executed as part of each method and reports them during runtime shutdown. Example output :
```
Total executed opcodes 305590200
11% Opcounts 34261110, calls 81900, Method System.Text.Json.JsonWriterHelper:ToUtf8 (System.ReadOnlySpan`1<byte>,System.Span`1<byte>,int&,int&), imethod ptr 0x55f2d503d870
22% Opcounts 33980080, calls 849502, Method System.Text.ASCIIUtility:WidenFourAsciiBytesToUtf16AndWriteToBuffer (char&,uint), imethod ptr 0x55f2d4d9ce08
29% Opcounts 23040810, calls 81900, Method System.Text.Encodings.Web.DefaultJavaScriptEncoderBasicLatin:FindFirstCharacterToEncode (char*,int), imethod ptr 0x55f2d5038218
36% Opcounts 20590344, calls 1715862, Method System.ReadOnlySpan`1<byte>:.ctor (void*,int), imethod ptr 0x55f2d4d3fee0
```

Co-authored-by: BrzVlad <[email protected]>
2020-07-10 15:00:25 +03:00
monojenkins 47ef5a8d6a [bcl] Update BCL Linked Size (#19446) 2020-07-09 20:39:05 -05:00
24be27d5e7 [mono] Add support for UnmanagedCallersOnlyAttribute (#20060)
* [marshal] Add mono_method_has_unmanaged_callers_only_attribute

* [marshal] Allow calls to mono_marshal_get_managed_wrapped without a delegate class

   In that case, create a wrapper based on the signature of the method itself.

* [aot] Allow decode_method_ref to decode NATIVE_TO_MANAGED wrappers without a delegate class

   Bump the AOT file format

* [interp] ldftn will return a native-to-managed wrapper to UnmanagedCallersOnly methods

* aot: emit byte when we don't expect a class

* jit: create wrapper creation for ldftn in method-to-ir

   Do it at IR generation of the caller, not every time the ldftn is executed

* jit: don't create a jump trampoline for ldftn of a native-to-managed wrapper

   The wrapper might be called from a thread that's not attached to the runtime, and the jump trampoline will look at TLS vars that are not initialized

* interp: transform LDFTN into LDC of a create_method_pointer for UnmanagedCallersOnly method

* marshal: throw invalid program exception for instance and generic methods

* Emit IPE throw instead of aborting JIT or interp compilation for bad UnmanagedCallersOnly methods

   Instead of throwing while JITing (or transforming), throw when the LDFTN is executed.

* disallow delegate constructor calls on UnmanagedCallersOnly methods

* throw IPE if UnmanagedCallersOnly method has non-blittable args

* disallow DllImport and UnmanagedCallersOnly together

   throw NotSupportedException

Co-authored-by: Ryan Lucia <[email protected]>
Co-authored-by: lambdageek <[email protected]>
2020-07-09 20:37:38 -04:00
monojenkinsandvargaz 47777a57c0 [wasm] Add beginnings of support for building with ICU. (#20091)
Co-authored-by: vargaz <[email protected]>
2020-07-10 01:12:51 +02:00
monojenkinsandpi1024e f963132ac8 Change double NOT operation to comparison to 0 (#19960)
If strstr does not return 0, found is true, so instead of using !!, let's use != 0.

Co-authored-by: pi1024e <[email protected]>
2020-07-10 01:11:59 +02:00
monojenkinsandstephentoub 1e27513c9b Improve terminology used in code (#20089)
Co-authored-by: stephentoub <[email protected]>
2020-07-09 20:48:28 +02:00
monojenkinsandlateralusX c9664e6c40 Use mono_runtime_delegate_invoke in EventPipeInternal::CreateProvider. (#20093)
Due to issues on some platforms related to mono_delegate_to_ftnptr_impl, switch to use mono_runtime_delegate_invoke without need for delegate wrapper generation currently not supported on all platforms.

Co-authored-by: lateralusX <[email protected]>
2020-07-09 19:16:09 +02:00
monojenkinsandstephentoub 0edd8d4102 Fix remaining license headers (#20088)
After https://github.com/dotnet/runtime/pull/38793 tweaked the license header on ~30K files, this cleans up after it, handling another ~1300, and adding license headers where they were missing in .cs files under libraries.  It also adds a default license header to the .editorconfig.

cc: @jkotas

Co-authored-by: stephentoub <[email protected]>
2020-07-09 11:08:03 +02:00
monojenkinsandlateralusX b35ae56d96 Fix case where EventPipeInternal::Enable is called with NULL output file. (#20084)
Co-authored-by: lateralusX <[email protected]>
2020-07-08 22:01:51 -04:00
monojenkinsandlambdageek ffea1753d3 [metadata] Move rarely used bits out of MonoMethod and give 1 bit back to MonoMethod:slot (#20061)
The `MonoMethod:slot` width was accidentally changed in https://github.com/dotnet/runtime/commit/8465be73eb40a9c409dc8974b9d6b235a1b5158f

To compensate, we move 3 bits out to image properties
   * `verification_success` - rarely used nowadays, protected by the image lock (like all image properties)
   * `is_reabstracted`, `is_covariant_override_impl` - infrequently used features of newer C# language features (default interface methods and covariant returns).  Setting these assumes the loader lock is held.

Co-authored-by: lambdageek <[email protected]>
2020-07-08 21:22:17 -04:00
Zoltan Varga 1bf3add26d [wasm] Fix the build. (#20085) 2020-07-08 17:22:24 -05:00
Pablo Martínez 9c0121161c Init a timer on TransactionScope initialization to be able to timeout (#20080)
Fixes #19955
2020-07-08 21:05:42 +02:00
Alexander Köplinger 5bd9f53dc0 Update license headers 2020-07-08 17:05:37 +02:00
Thays Grazia 1d94e306fb [wasm][debugger] DebugDirectoryEntryType = Reproducible means that has debug information (#20083)
* Considering DebugDirectoryEntryType = Reproducible as an assembly that has debug information.
Fix #20075

* Adding test which Ankit wrote.
2020-07-08 11:39:50 -03:00
Zoltan Vargaandmonojenkins f047b0b299 [wasm] Implement support for pinvoke callbacks in the interpeter. (#20076)
* [wasm] Refactor the wasm tuner.

Move the pinvoke table generation code into a new PInvokeTableGenerator.cs file,
to be similar to the corresponding code in WasmAppBuilder in dotnet/runtime. NFC.

* [wasm] Implement support for pinvoke callbacks in the interpeter.

* Modify the tuner to generate a table of trampoline functions which
have the same signature as the pinvoke callback methods.
* These functions transfer control to the interpreter.
* Modify the interpreter/wasm runtime to look up the functions
corresponding to the pinvoke callback methods.

* [csproj] Update project files

* Fix license.

* Remove leftover debug code.

Co-authored-by: monojenkins <[email protected]>
2020-07-08 09:47:32 -04:00
monojenkinsandBrzVlad dc7448f15f [interp] Remove usage of some gotos (#20073)
Their usage resulted in worse code on wasm.

Co-authored-by: BrzVlad <[email protected]>
2020-07-08 14:04:08 +03:00
Ankit Jain 1da3a20c8b [wasm][debugger] Add support for deref'ing pointers (#19760)
* [wasm][debugger] Send var names also, to `mono_wasm_get_variables`

- this will be useful in upcoming commits, which will need to use the
names for local pointer vars

* [wasm][debugger] Add support for deref'ing pointers

* [wasm][debugger] Dereference the pointer in js, instead of debugger.c

Based on suggestion from @vargaz

* [wasm][debugger][tests] Fix setting async methods when setting

.. breakpoint by method name. Async methods themselves don't have the
debug information. Instead, that can be found on the generated async
implementation type/method. Here, we just look for a type name
starting with `{original_type_name}/<{async_method_name}>`, and use the
method `MoveNext` from that.

* [wasm][debugger][tests] Update to set bp by method name+lineoffset

* Address review comments from Katelyn Gadd (@kg)

* Add test to check deref'ing invalid pointers

- We should really be handling invalid object ids, and report errors for
those, where appropriate. This will be done in a future PR
- For this PR, I'm adding tests that just check that invalid objects, or
trying to deref regular objects, doesn't blow up

* Remove old unused test code

* [wasm][debugger] Use JsonConvert instead of manually building the json string

- addresses review comment from @lewing
2020-07-07 13:39:12 -04:00
Andrii Vitiv 618cdf6ff7 Fix typo in docs/README (#20070) 2020-07-07 19:17:23 +02:00
Neale Ferguson 6cb3c5bdbb Add eventpipe to dist files (#20079) 2020-07-07 14:10:47 +02:00
Vlad Brezae 6de06a3636 [interp] Access frame arguments as locals (#20040)
* [interp] Make args part of called method stack frame

This also compacts stack usage. A new frame starts at the location of the first pushed argument.

* [interp] Remove ldarg/starg opcodes

We replace them with opcodes that operate on locals instead. This also enables additional optimizations that were applying to locals.

* [interp] Kill stack_args

It is now redundant

* [interp] Actually allocate filter frame in separate space

By mistake, the filter frame was using the same stack space as the original frame. This means that the filter clause could corrupt frames from which we still need to run finally clauses. This also refactors the code a little bit, moving frame copying outside interp_exec_method, which is already overly complex.
2020-07-07 10:46:16 +03:00
Thays Grazia 8b8ee716f4 [wasm][debugger] Don't download unnecessary assemblies to DebugProxy (#20032)
* Identifying if an assembly has debug info and only download it to debug proxy if it has, this will speed up a lot the debugger initialisation.
2020-07-06 09:04:47 -03:00
Martin Baulig b6ef72c244 Fix sdk/wasm/.gitignore to not-ignore the DebuggerTestSuite directory. (#20058)
The top-level .gitignore has `[Dd]ebug*/` - which matches `sdk/wasm/DebuggerTestSuite/*`;
to override, we need to add `!DebuggerTestSuite` to sdk/wasm/.gitignore
2020-07-02 15:05:21 +02:00
Martin Bauligandmonojenkins b70c794f70 [wasm][System.IO.Compression]: Disable BrotliStream on wasm. (#19961)
* [wasm][System.IO.Compression]: Disable Brotli on wasm.

* [csproj] Update project files

Co-authored-by: monojenkins <[email protected]>
2020-07-02 07:54:04 -05:00
monojenkinsandakoeplinger 38850478fd WASM: Add an internal method to pump the threadpool (#20056)
This can by used by the xharness xunit runner to make sure async tasks are executed.

We also need to tweak how `ThreadPoolTaskScheduler` handles `TaskCreationOptions.LongRunning` since the usual mode of starting a new thread doesn't work, instead we treat it like the option wasn't set and queue the task on the threadpool.

Co-authored-by: akoeplinger <[email protected]>
2020-07-02 14:25:37 +02:00
monojenkinsandalexischr 793020489a [mono] Implement getting the type modifiers for DynamicMethod parameters (#20052)
Fixes https://github.com/dotnet/runtime/issues/36271

Co-authored-by: alexischr <[email protected]>
2020-07-01 16:15:03 -04:00
Thays Grazia 96927e3532 Adding qcalls-def.h to Makefile.am 2020-06-30 19:19:06 -03:00
monojenkinsandBrzVlad 163ab2747d [interp] Small improvements around ByReference ctor (#20041)
Co-authored-by: BrzVlad <[email protected]>
2020-06-30 16:04:18 +03:00
monojenkinsandlateralusX ffb6ee3c0a Port EventPipeBuffer, EventPipeBufferList, EventPipeBufferManager to Mono. (#19958)
Continuation of https://github.com/dotnet/runtime/pull/34600, adding BufferManager into the library including unit tests, merging source files and additional library restructuring.

- Port EventPipeBuffer.
- Port EventPipeBufferList.
- Port EventPipeManager.
- Merge internals source files. Changed GETTER_SETTER to only mandate use of inlined functions when calling betweeen source files for different types. Upgraded all use within each source file for direct struct access.
- Changed function entry error checkin strategy. Only apply active checks on outer library API, ep.h, and use EP_ASSERT for all other functions.
- Dropped requires_lock_held in function naming, switch to comment in header or in forward declare for functions that validates that lock is held.
- Removed currently unused GETTER/SETTERS.
- Moved more comments into sources from corresponding CoreCLR EventPipe sources.
- Add EventPipeBuffer/EventPipeBufferManager unit tests.

Next step after this PR will be to enable a file session during runtime and add more unit tests and then start getting diagnostic server component over to Mono.

Co-authored-by: lateralusX <[email protected]>
2020-06-30 14:31:19 +02:00
monojenkinsandBrzVlad f50ea76a08 [interp] Intrinsify ClearWithReferences (#20042)
This greatly impacts Array.Clear performance, which is commonly used in blazor rendering.

Co-authored-by: BrzVlad <[email protected]>
2020-06-30 14:55:34 +03:00
mathieubourgeois 51dfcfe5c0 Bring back previous debug_abbrev offset behavior on Apple platforms (#20031)
https://github.com/mono/mono/pull/19794 broke on iOS. Analyzing the result showed that, while the assembly was generated as expected, the linked result was different. Analyzing the LLVM code (which triggered the original fix) seems to imply that, on Apple platforms, they will not generate a label for it, only doing the 0-offset as we were doing before. Therefore, match the LLVM behavior by bringing back our previous logic when targetting Mach, otherwise use the new way of doing things.

Fixes https://github.com/mono/mono/issues/8806 (again)
2020-06-30 12:01:52 +02:00
Zoltan Varga 174aeaa31c [wasm] Optimize interp->native transitions. (#20034)
* [wasm] Optimize interp->native transitions.

* Generate tables of signatures/transition functions.
* Add mono_wasm_get_interp_to_native_trampoline () function to look up the transition function
for a signature.
* Cache the transition function in a imethod->method_data slot.

Previously, we were calling a mono_wasm_interp_to_native_trampoline () function and a generated
icall_trampoline_dispatch () function which added a lot of overhead.

* Avoid sharing cache entries.
2020-06-30 04:13:18 -04:00
Neale Ferguson 1d3e43ec3a Fix #20022 - changing the signature of mono_handle_native_crash() for s390x (#20028)
* - Update exception signature as per other archs
- Make roslyn the default for s390x

* Put the compiler check in the right place
2020-06-29 21:41:28 -04:00
Martin Baulig b873e91b11 Add mono_exception_try_get_managed_backtrace(). (#20024)
This is an enhanced version of mono_exception_get_managed_backtrace()
that takes an optional `const char *prefix` argument (to indent the
stack-trace) and returns FALSE with a NULL backtrace on error.
2020-06-29 14:10:19 +02:00
Zebediah Figura a79bf1902d [cominterop] Support ClassInterfaceType and auto-dual class interfaces (#19768)
* [cominterop] Don't leak the MonoMethodBuilder in cominterop_get_ccw_checked().

* [cominterop] Support ClassInterfaceAttribute.

* [cominterop] Factor out cominterop_get_ccw_method().

* [cominterop] Implement auto-dual class interfaces.

* [tests] Add tests for ClassInterfaceType and auto-dual class interfaces.
2020-06-27 12:19:47 -04:00
monojenkinsandlambdageek 336bbb079c [mono][mini] Do a non-virtual call for bound delegates (#20030)
When we call a delegate that was bound to a specific function, don't do a virtual call.

Fixes mono/mono#19964

Co-authored-by: lambdageek <[email protected]>
2020-06-27 11:34:24 -04:00
Safia Abdalla 380d60dc70 Re-enable verbose and trace logging in debug proxy (#19926)
* Re-enable verbose and trace logging in debug proxy

* Update LogLevel in ProxyDriver files

* Revert to use LogDebug for verbose messages
2020-06-26 20:31:31 -05:00
Alexis Christoforides 80a9ecba2e [merp] Remove dead code (#20015)
Entry to crash reporting is now more properly handled by mono_dump_start()
2020-06-26 16:42:14 -04:00
Tammy Qiu b3110cd291 [wasm] Fix package update scripts for local builds
Fix package update scripts for local builds
2020-06-26 15:13:51 -04:00
monojenkins c511814182 [metadata] Implement PreserveBaseOverridesAttribute and covariant returns support (#19927)
Covariant return implementation for Mono.

---

There are also a couple of general Mono fixes in here, too:

1. Interpreter support for `MONO_TYPE_FNPTR`  in `mint_type()`
2. a "signature assignment" mode for `mono_class_is_assignable_from` that doesn't treat `IntPtr[]` and `long[]` (or `int[]`) as interchangeable
3. support for unmanaged pointer comparisons in `mono_class_is_assignable_from`
4. Factor `mono_byref_type_is_assignable_from` out of `ves_icall_RuntimeTypeHandle_type_is_assignable_from` and make it generally usable.

---

For covariant returns, there are a couple of pieces here:
1. Method overrides come in two flavors: implicit (matching by name and sig) and explicit (using a `.override` directive).
   * for explicit overrides, we have to check that the override has a signature that is subsumed by (its return type is a subtype of the return type of) the previous override, if any, and the declared method.
   * for implicit overrides, we have to check that the override has a signature that is subsumed by the previous most derived override (not just the one that we happened to find with a precisely matching signature).
2. If any override is marked by `[PreserveBaseOverridesAttribute]` then we need to find all the other slots that may have methods from the override chain and update them.  (The attribute is expected to be applied to a `newslot virtual` method that is an explicit `.override` of some other method).

There's an interesting test case where a class has _both_ an implicit and and explicit override for the same slot, arrived via different methods - in this case, the implicit one is supposed to be ignored.  We implement this by doing the implicit slot filling first, then the explicit, and saving the covariant return checking until after both are done.

---

Because the method (`MethodImpl`) is both an override of another virtual method,
and is itself a `newslot`, it will occupy (at least) 2 slots in the vtable -
its own newslot and the `MethodDecl` that it is overriding.

If a third class subclasses the class with the `MethodImpl` or one of its
descendents and itself overrides either the `MethodDecl` or (one of the)
`MethodImpl` (either implicitly or with another explicit .override)  the
`PreserveBaseOverridesAttribute` is a signal to apply the new override that it
should apply to all the slots.

The way this works is when processing the overrides, we walk up the class
hierarchy looking at the contents of the impl slot and if any of them have the
attribute, we make sure to add a mapping to the "`override_map`" to replace any
occurrences of a previous impl with the newest (most derived) impl.

An (existing) later pass goes through the vtable and applies the override_map.

Contributes to dotnet/runtime#37509


* [metadata] Implement support for PreserveBaseOverridesAttribute

The attribute is expected to be applied to a `newslot virtual` method that
is an explicit .override of some other method.

Becuase the method (MethodImpl) is both an override of another virtual method,
and is itself a `newslot`, it will occupy (at least) 2 slots in the vtable -
its own newslot and the MethodDecl that it is overriding.

If a third class subclasses the class with the MethodImpl or one of its
descendents and itself overrides either the MethodDecl or (one of the)
MethodImpl (either implicitly or with another explicit .override)  the
PreserveBaseOverridesAttribute is a signal to apply the new override that it
should apply to all the slots.

The way this works is when processing the overrides, we walk up the class
hierarchy looking at the contents of the impl slot and if any of them have the
attribute, we make sure to add a mapping to the "override_map" to replace any
occurrences of a previous impl with the newest (most derived) impl.

An (existing) later pass goes through the vtable and applies the override_map.

* add FIXME for dynamic images

* scan entire chain of inheritance, don't stop at the class with the attribute

   Makes OverrideMoreDerivedReturn.il pass

* UnitTestDelegates is also passing

* [metadata] Add mono_metadata_signature_equal_no_ret

* inflate signature->ret when doing covariant checking

* [class] Add mono_class_signature_is_assignable_from_checked

   In ECMA I.8.7.1 "assignment compatability for signature types" we need to
   distinguish IntPtr[] from int32[] and int64[].  The ordinary cast_class for an
   array type in Mono implements the "intermediate type" relation from I.8.7.3
   "general assignment compatability" - IntPtr[] gets treated as inter-castable
   with int32[] or int64[], depending on platform pointer size.

   The new mono_class_signature_is_assignable_from_checked function does the finer
   relation for signatures, while the old mono_class_signature_is_assignable_from_checked
   preserves the existing behavior used elsewhere in the runtime.

* Check every method previously in the slot against the new impl

* UnitTest_GVM passes

* [metadata] Don't infinite loop in mono_class_get_flags for a FNPTR

   When a MonoClass is a MONO_TYPE_FNPTR, the element_class is itself.  We should
   probably not do that, but meanwhile, make `mono_class_get_flags` return
   something else for function pointer types.

   Makes mono_class_is_interface not overflow the stack

* [metadata] Set MonoClass:cast_class for pointer types to the intermediate type

   Ignore signedness differences and set cast_class to the storage type, same as
   for arrays.  This is used by mono_class_is_assignable_from when comparing
   IntPtr* vs ulong*, for example.

* [metadata] Make mono_class_is_assignable_from work for unmanaged pointer types

   The issue is that we need to compare intermediate type or the reduced type of
   the element type, depending on whether we're doing compatability or general
   assignment compatability (upshot: ulong* and long* are always inter-assignable,
   but IntPtr* is not in signatures, but is for general storage)

* [metadata] Pull mono_type_byref_is_assignable_from out of ves_icall_RuntimeTypeHandle_type_is_assignable_from

   Make it a separate internal function

* [metadata] mono_type_byref_is_assignable_from for valuetypes and class types should check for identity

   X& and Y& where both are either a reference types or valuetypes are only
   assignable if X and Y are identical.  The old code was checking for identity
   for valuetypes, but for reference types it would allow any two reference types
   at all, which is incorrect.

* [class-init] Check for byref types in covariant return signatures

Lets us pass Loader/classloader/MethodImpl/CovariantReturns/UnitTest/CompatibleWithTest.il from the CoreCLR testsuite

* [interp] handle MONO_TYPE_FNPTR in mint_type

   It's just a pointer-sized integer, as far as the interpreter's type discipline is concerned

* [class-init] Use a bit for covariant return method impls

   Allows us to check implicit overrides against previous impl's sig when the previous impl potentially had a covariant return type.

   Also use the bit to decide if we need to check signatures of the entire impl chain for explicit instantiations

* ReturnTypeValidation unit tests work on Mono now

* [class-init] check covariant vtable slots after overloads are applied

   The check has to be done after both implicit and explicit overrides have been
   applied because some implicit overrides must be ignored.  If the check is done
   as soon as we detect that a covariant return method override is needed, we will
   incorrectly check implicit overrides that are to be ignored because a later
   explicit override applied to the same slot.

* [metadata] Fix byref IsAssignableFrom

   The reflection API has an interesting behavior, whereas the ECMA definition is
   stricter.

   ```
   public interface I {}
   
   public class B {}
   public class D : B, I {}
   
   public struct S : I { }
   
   class Program {
           static void Main(string[] args)
           {
   	    var tb = typeof (B).MakeByRefType ();
   	    var td = typeof (D).MakeByRefType ();
   	    var ti = typeof (I).MakeByRefType ();
   	    var ts = typeof (S).MakeByRefType ();
   
   	    Console.WriteLine ($"{tb.FullName} is assignable from {td.FullName} ? {tb.IsAssignableFrom (td) }");
   	    Console.WriteLine ($"{td.FullName} is assignable from {tb.FullName} ? {td.IsAssignableFrom (tb) }");
   
   	    Console.WriteLine ($"{ti.FullName} is assignable from {td.FullName} ? {ti.IsAssignableFrom (td) }");
   	    Console.WriteLine ($"{td.FullName} is assignable from {ti.FullName} ? {td.IsAssignableFrom (ti) }");
   
   	    Console.WriteLine ($"{ti.FullName} is assignable from {ts.FullName} ? {ti.IsAssignableFrom (ts) }");
   	    Console.WriteLine ($"{ts.FullName} is assignable from {ti.FullName} ? {ts.IsAssignableFrom (ti) }");
   
           }
   }
   
   // Expected Output:
   // B& is assignable from D& ? True
   // D& is assignable from B& ? False
   // I& is assignable from D& ? True
   // D& is assignable from I& ? False
   // I& is assignable from S& ? False
   // S& is assignable from I& ? False
   ```

* rename mono_class_signature_is_assignable

   No need for _checked suffix

* rename mono_byref_type_is_assignable_from

* [class-init] Move vtable setup to a separate file

   The code is getting quite long, move it to a separate file
2020-06-26 14:16:03 -04:00
Zoltan Varga f562eb8869 [wasm] Use -emit-llvm instead of the obsolete -s WASM_OBJECT_FILES=0 option. (#20026) 2020-06-25 17:32:45 -04:00
Zoltan Varga 28ba000f84 [wasm] Disable the checked build for release builds. (#20020) 2020-06-25 03:28:11 -04:00
Zoltan Varga 0d655a5eb6 [wasm] Remove obsolete --llvm-lto 1 argument, lto is already enabled when -s WASM_OBJECT_FILES=0 is used. (#20021) 2020-06-24 23:46:32 -04:00
Zoltan Varga a654692162 [jit] Add a fastpath to fill_runtime_generic_context (). (#19923)
* [jit] Add a fastpath to fill_runtime_generic_context ().

This is needed in llvmonly mode, since that mode doesn't use the
fastpath lazy rgctx fetch trampolines.

* Fix method_rgctx_array_size ().
2020-06-24 18:21:05 -04:00
Steffen Kieß 82d2277a08 [mcs] Fix help text for default value of -sdk: option (#20011)
The `mcs` help text says that it will use the value `4.5` by default for the option `-sdk:`, but it actually uses `4.x`. Fix the help text.
2020-06-24 19:58:37 +02:00
Alexis Christoforides 7a0425e81f [crashing] Improve crash chaining (#19973)
With this change, `mono_post_native_crash_handler` chains the crashing signal directly, instead of that having to happen after `mono_handle_native_crash` returns (which created a fragile repetitive code pattern). Finally, this way `mono_post_native_crash_handler` can also re-raise the signal right after chaining it. Since we remove our crashing signal handlers in `mono_handle_native_crash`, this should allow the OS to handle the signal as the final action.

Fixes https://github.com/mono/mono/issues/19860
2020-06-24 11:01:48 -04:00
Ankit Jain caf00ee3d6 [master] Bump msbuild to track xplat-master (#19972)
Also, bumps roslyn to `3.7.0-1.20262.2`
2020-06-24 16:29:40 +02:00
Jay Krell 872139a3e0 [wasm][interp] Fix warning about unprototyped mono_wasm_interp_to_native_trampoline. (#19183) 2020-06-24 16:19:32 +02:00
Alexander Köplinger a0231c5fc3 [wasm] Missing signatures for Microsoft.Extensions.EventSource (#20017)
Fixes tests in dotnet/runtime that currently fail with `WASM-ERR: CANNOT HANDLE COOKIE VL`.
2020-06-24 15:37:23 +02:00
David Ávila 9c62b13be4 [WASM] Missing signatures for OpenGLES (#20001)
* Added missing signatures for OpenGLES/WebGL

* Remove duplicated signatures

* Update Wasm_m2n_invoke.g.h to include new signatures
2020-06-24 00:20:33 -04:00
monojenkinsandvargaz d9ce741562 [wasm] Make some libc stubs return an error instead of asserting. (#20010)
Co-authored-by: vargaz <[email protected]>
2020-06-23 23:13:57 +02:00
Tammy Qiu 21e1d30efc Remove xml from download-packages.ps1 2020-06-23 10:31:10 -04:00
Zoltan Varga 09c44c9323 [wasm] Use wasm-opt --strip-dwarf instead of wasm-strip which is missing from recent emscripten versions. (#20006)
Fixes https://github.com/mono/mono/issues/20002.
2020-06-22 18:55:44 -04:00
Tammy Qiu cec9dee254 Fix package update scripts for local builds 2020-06-22 17:56:27 -04:00
monojenkinsandvargaz dba7d43c7e Add threadpool support for webassembly. (#19981)
Register a JS callback when a work item is queued, the callback will call into the runtime/bcl to execute the work item.

Co-authored-by: vargaz <[email protected]>
2020-06-22 20:18:16 +02:00
monojenkinsandam11 32c3b17e50 Enable mono cross-build on SunOS-like OS (#19932)
Summary:
* wire `$(Compiler)` in `mono.proj`, that comes from `eng/build.sh`.
* add configurations for illumos cross-compilation.
* set `-Werror=strict-prototypes` for `madvise` and `posix_madvise` introspection, which is used during the compilation.
* implement `mono-threads-sunos.c`.
* add some solaris-specific thread priority levels.

With this set of changes, `dotnet hwapp.dll` works with mono flavored `System.Private.CoreLib.dll` and `libcoreclr.so` on SmartOS 2020.

Contributes to: dotnet/runtime#34944.

Co-authored-by: am11 <[email protected]>
2020-06-22 09:42:30 -04:00
Vlad Brezae 2c2a1718a9 [interp] Rework frame data storage (#19985)
* [interp] Allocate a single continous stack region

Makes things easier, slightly improving call perf, and enables us to statically know the exact offset of any local / instruction result. We allocate localloc sections separately for this reason.

* [interp] Add allocator for localloc sections

It mostly reuses the original stack fragment allocator. When allocating memory for an interp frame, we remember the original state of the allocator before we started allocating for this frame. When we finish executing the frame code and we pop back the stack, we do the same with this allocator, restoring the previous allocator state.

* [interp] Remove unreachable code that makes no sense

Probably, in ancient times, we had a separate InterpFrame that we were executing for pinvoke / icall methods.

* [interp] Add separate opcodes for returning from methods with localloc

Just to avoid the slight overhead of calls for the common scenario.

* [interp] Add separate memory accounting for interp stack
2020-06-21 19:59:45 +03:00
Vlad Brezae ab3cc22dfe [interp] Fix some warnings that show up on wasm (#19991)
Do overflow checks the same way we do it in the jit.
2020-06-20 14:10:31 +03:00
Vlad Brezae d919597d26 [interp] Add unaligned version for ldfld.vt opcodes (#19993)
Regressed recently with the addition of specialized ldfld.vt opcodes
2020-06-20 14:09:40 +03:00
Zoltan Varga a1b885f1fc [jit] Fix the Activator.CreateInstance () intrinsic for primitive types. (#19989)
Fixes https://github.com/xamarin/xamarin-android/issues/4817.
2020-06-19 20:01:02 -04:00
Larry Ewing 9954695c4c assume double numbers (#19714) 2020-06-19 12:14:51 -05:00
monojenkinsandthaystg 99794efa11 [mono] Add QCalls to the Runtime (#19945)
- Implementing QCalls on mono
- Use QCalls on ICU Shim implementation

Fixes https://github.com/dotnet/runtime/issues/36449

Co-authored-by: thaystg <[email protected]>
2020-06-19 11:43:46 -03:00
Thays Grazia ea8f106187 Fix readme and sample.html. (#19988) 2020-06-18 22:38:07 -03:00
monojenkinsandEgorBo 386ae0405d [mono] Don't contribute to inline_const if ctor has AggressiveInlining (#19930)
Mono's inliner is quite conservative (see https://github.com/dotnet/runtime/issues/34286) so we have to workaround some limitations, e.g.
```csharp
static ReadOnlySpan<byte> Arr => new byte[] {1, 2, 3, 4};

// access example:
byte GetByte(int i) => Arr[i];
```
#### Current codegen for `GetByte` (with https://github.com/dotnet/runtime/pull/37458 included)
```asm
0000000000000000 <gram_GetByte__int_>:
<BB>:1
   0:   48 83 ec 18             sub    $0x18,%rsp
   4:   c5 f8 57 c0             vxorps %xmm0,%xmm0,%xmm0
   8:   c5 f8 29 04 24          vmovaps %xmm0,(%rsp)
   d:   48 b8 50 22 73 d2 6e    movabs $0x556ed2732250,%rax
  14:   55 00 00
  17:   48 89 e7                mov    %rsp,%rdi
  1a:   ff 10                   callq  *(%rax)   ;;;; get_Arr() is not inlined!
  1c:   83 7c 24 08 00          cmpl   $0x0,0x8(%rsp)
  21:   74 0b                   je     2e <gram_GetByte__int_+0x2e>
  23:   48 8b 04 24             mov    (%rsp),%rax
  27:   8a 00                   mov    (%rax),%al
  29:   48 83 c4 18             add    $0x18,%rsp
  2d:   c3                      retq
  2e:   48 b8 68 22 73 d2 6e    movabs $0x556ed2732268,%rax
  35:   55 00 00
  38:   bf 02 01 00 00          mov    $0x102,%edi
  3d:   ff 10                   callq  *(%rax)
```

As you can see, `get_Arr()` is not inlined - it happened because the calculated size is 60 and the major contributor is `ReadOnlySpan<>.ctor` which is marked with [AggressiveInlining], so Mono inlined that `.ctor` into `get_Arr` and the total cost for `get_Arr` increased to 60.

#### Codegen with this PR:
```asm
0000000000000000 <gram_GetByte__int_>:
<BB>:1
   0:   48 b8 00 6e 1f 91 11    movabs $0x5611911f6e00,%rax
   7:   56 00 00
   a:   8a 00                   mov    (%rax),%al
   c:   c3                      retq
```
Thus, the fix helped to inline more and even reduced function size.

There are other places where we append method call costs to `inline_costs` but I decided to start with this one for constructors and only for LLVM to minimize possible regressions.

Possible regressions match current CoreCLR behavior, bad case:  [sharplab.io](https://sharplab.io/#v2:EYLgxg9gTgpgtADwGwBYA0AXEBDAzgWwB8ABAJgEYBYAKGIAYACY8gOgCUBXAOwwEt8YLAMIR8AB14AbGFADKMgG68wMXAG4aNYgGYm5JE1IMhNAN4MLNCxYDaAWRgYAFhAAmASXGSAFA+dvPMUkAeTE+CC5cFgBBAHNY2FxcXgUYdy5JXi4s2IBKAF0rax09A2IUBgAhXli/F1dvXKKLU2brC2YATm8AIgAJHtyNanb2rt6YQeHR4vJunskptrG53sWh5dn5iCWRmb1ujb2Z8Z6AdV39g96do6vTqEv90/Xp59We1yeTj4BCb4YAF9NMcmLpmGUKtVao56mcoNgxGIZI02q1Qe0APSYqo1OpuRoMXi4IkZLIwVwMPAMGAIZFgDAUhhwBgQADWmws0PxDTu1mB1DaJQhTAqABVVBhUaD0VdsQx3FT8AwuBAMDS6TAGTlcTD/JSMBAGMAYKTMlwmVlDQwJbgpU0MdZ5cAOOreG6SSzVer2ZzdTz4YjkVBGm8LALAUA===)

Co-authored-by: EgorBo <[email protected]>
2020-06-18 15:24:32 +03:00
Zoltan Varga 4ac081d6df Bump emscripten to 1.39.18. (#19980) 2020-06-17 19:07:44 -04:00
Vlad Brezae 61808b8f27 [interp] Switch locals and execution stack order (#19975)
* [interp] Switch locals and execution stack order

The order before was execution stack, vtstack, locals. The order now is locals, vtstack, execution stack. The reason for this is that in the future we would like to access arguments as locals, so the args pushed by the caller will end up being locals in the new frame. Additionally, this enables us to further compact the stack use in the future since a new frame will be allocated immediately following the current stack top. This also provides a small reduction in call overhead.

* [interp] Add stricter assertions for debug build

* [interp] Don't inline vararg calls

They have some weird call semantics

* [interp] Fix failure to align vt result to the vt alignment

* [interp] Remove pointless check

We already know we have a managed pointer on the stack, since we have the constrained prefix. We were actually losing the STACK_TYPE_MP state when storing/loading from a local, which can only be MINT_TYPE_I, and could underflow the vtstack.

* [interp] Replace warnings with asserts
2020-06-17 21:20:47 +03:00
Alexander Köplinger 74f6d2ce2d [netcore] Disable Interpreter CI runs (#19979)
We have those over in dotnet/runtime now.
2020-06-17 14:19:40 +02:00
monojenkinsandvargaz ac71dd3a3a Move the Buffer.Memmove<T> implementation into the runtime specific files since it requires a runtime specific BulkMoveWithWriteBarrier icall. (#19974)
The mono version has an extra type argument since it uses copy functions which are type specific.
Also add an elementCount > 0 check to avoid icall overhead if possible.

Co-authored-by: vargaz <[email protected]>
2020-06-16 14:07:52 -04:00
monojenkinsandvargaz 3a5d91fee2 [netcore] Implement timers for wasm. (#19967)
Co-authored-by: vargaz <[email protected]>
2020-06-16 02:05:41 +02:00
monojenkinsandvargaz bab1cde432 [wasm] Disable aot support in release builds. (#19959)
Co-authored-by: vargaz <[email protected]>
2020-06-15 14:15:23 +02:00
Vlad Brezae 35153475a2 [interp] Refactor ldfld from vt (#19963)
Add separate faster opcode and remove use of MINT_VTRESULT
2020-06-13 01:07:57 +03:00
Alexis Christoforides 540da38191 [merp] Add API methods for getting hashcode/reason of last crash (#19901)
* [merp] Add API methods for getting hashcode/reason of last crash

* Add test

* Review feedback and cleanup
2020-06-11 22:45:12 -04:00
Zoltan Varga e51b4af9cd [llvm] Emit a descriptive name for MONO_PATCH_INFO_JIT_ICALL_ADDR_NOCALL as well. (#19947) 2020-06-10 15:13:35 -04:00
Zoltan Varga 4966fc22c4 [wasm] Fix marshalling of pointer types. (#19946)
Fixes https://github.com/mono/mono/issues/19943.
2020-06-10 04:00:41 -04:00
Vlad Brezae 07e6f1e605 [interp] Don't save ip twice in InterpFrame (#19909)
We had frame->ip used by EH and debugger and frame->state.ip used to save the ip of the next instruction to be executed when we return from the call. Since both represent more or less the same thing, unify them and avoid duplicate storing inside InterpFrame for each call. Because we use this ip with exception handling, we need to subtract 1 (similar to the jit) so the ip ends up being in the call instruction and not the next.
2020-06-09 22:00:48 +03:00
monojenkinsandakoeplinger c99dcebb15 [mono] Add back sys/types.h include for clockid_t (#19941)
Looks like it was accidentally removed in https://github.com/dotnet/runtime/pull/37457

Co-authored-by: akoeplinger <[email protected]>
2020-06-09 19:06:41 +02:00
monojenkinsandfanyang-mono 363e89b403 Check the existence of clocked_t (#19915)
Fixes https://github.com/mono/mono/issues/19733

Co-authored-by: fanyang-mono <[email protected]>
2020-06-09 11:08:16 -04:00
Tammy Qiu e19ce7b433 Merge pull request #19938 from tqiu8/update-pkg-script
[wasm] Update package update scripts to include debug proxy
2020-06-09 10:31:16 -04:00
Zoltan Varga aa46acadd4 [wasm] Throw PlatformNotSupportedException instead of NotSupportedException when starting threads/waiting on monitors. (#19937)
* [wasm] Throw PlatformNotSupportedException instead of NotSupportedException when starting threads/waiting on monitors.

* Preseve PlatformNotSupportedException.
2020-06-08 19:41:40 -04:00
tqiu8 a0658ed9b4 [wasm] comment out steps updating local mono repo 2020-06-08 16:45:24 -04:00
tqiu8 965b2eb778 [wasm] incorporate pr feedback & fix powershell script 2020-06-08 16:31:58 -04:00
Tammy Qiu f37c1c91dc [wasm] Update package update scripts to include debug proxy 2020-06-08 13:39:59 -04:00
Rickard df2f9b01d2 Avoid setting PTHREAD_PRIO_INHERIT on Alpine, since this causes deadlocks (#19914)
Fixes #7167

The PR 3e8108ea65 introduced a deadlock on Alpine, making it impossible to even build mono. This PR reverts the setting of PTHREAD_PRIO_INHERIT when on Alpine.
Since GCC on Alpine doesn't provide a builtin macro to detect Alpine, I also added a #define in configure.ac.
2020-06-08 18:57:04 +02:00
Mike Gorse faee046f95 Use new ucontext handling for glibc 2.26 (#19935) 2020-06-08 10:36:26 -04:00
Zoltan Varga 5ec4240614 [wasm] Bump emscripten to 1.39.17. (#19929)
* [wasm] Bump emscripten to 1.39.17.

* [interp] Optimize MINT_DIV_I4/DIV_I8/REM_I4/REM_I8 to work around an llvm problem.
2020-06-08 08:24:33 -04:00
monojenkinsandEgorBo 497152e37c [mono] Append -sroa and -instcombine to LLVM-JIT pass manager (#19916)
Partially fixes https://github.com/dotnet/runtime/issues/37449
```csharp
static ReadOnlySpan<byte> Arr
{
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    get => new byte[] {1, 2, 3, 4};
}

[MethodImpl(MethodImplOptions.NoInlining)]
public static byte GetByte(int i) => Arr[0];
```
#### Codegen for GetByte() in LLVM-JIT mode:
```asm
0000000000000000 <gram_GetByte__int_>:
<BB>:1
   0:   48 83 ec 28             sub    $0x28,%rsp
   4:   c5 f8 57 c0             vxorps %xmm0,%xmm0,%xmm0
   8:   c5 f8 29 04 24          vmovaps %xmm0,(%rsp)
   d:   48 b8 b0 bd 55 d2 3f    movabs $0x563fd255bdb0,%rax
  14:   56 00 00
  17:   48 89 04 24             mov    %rax,(%rsp)
  1b:   c7 44 24 08 04 00 00    movl   $0x4,0x8(%rsp)
  22:   00
  23:   48 8b 04 24             mov    (%rsp),%rax
  27:   48 89 44 24 10          mov    %rax,0x10(%rsp)
  2c:   8b 44 24 08             mov    0x8(%rsp),%eax
  30:   89 44 24 18             mov    %eax,0x18(%rsp)
  34:   8b 44 24 0c             mov    0xc(%rsp),%eax
  38:   89 44 24 1c             mov    %eax,0x1c(%rsp)
  3c:   83 7c 24 18 00          cmpl   $0x0,0x18(%rsp)
  41:   74 0c                   je     4f <gram_GetByte__int_+0x4f>
  43:   48 8b 44 24 10          mov    0x10(%rsp),%rax
  48:   8a 00                   mov    (%rax),%al
  4a:   48 83 c4 28             add    $0x28,%rsp
  4e:   c3                      retq
  4f:   48 b8 d0 ae 42 d2 3f    movabs $0x563fd242aed0,%rax
  56:   56 00 00
  59:   bf 02 01 00 00          mov    $0x102,%edi
  5e:   ff 10                   callq  *(%rax)
```

Codegen after I appended `-sroa -instcombine` to the end of LLVM passes list:
```asm
0000000000000000 <gram_GetByte__int_>:
<BB>:1
   0:   48 b8 d0 ef a6 ba 31    movabs $0x5631baa6efd0,%rax
   7:   56 00 00
   a:   8a 00                   mov    (%rax),%al
   c:   c3                      retq
```

This https://godbolt.org/z/YKjzsV link explains motivation (on the left is the "final" LLVM IR our llvm-jit produces after the default optimizations). Zoltan noticed that LLVM-AOT where we use `opt -O2` instead of custom pass order optimized that code perfectly.

The other issue remains: for some reason we don't inline `get_Arr()` without AggressiveInlining, coreclr does inline it:
```
Successfully inlined Program:get_Arr():System.ReadOnlySpan`1[Byte] (12 IL bytes) (depth 1) [below ALWAYS_INLINE size]
```

Co-authored-by: EgorBo <[email protected]>
2020-06-08 09:36:38 +03:00
monojenkinsandCoffeeFlux b4092e2011 [runtime] Add remaining runtime events and fix some existing ones on netcore (#19799)
Fixes https://github.com/mono/mono/issues/16246

Contributes to https://github.com/mono/mono/issues/14788

The commits here should be reasonably chunked up, but a summary of what this accomplishes:

* Wires up OnResourceResolve
* Fixes our corlib satellite assembly check in netcore_load_reference (we were previously comparing "System.Private.Corelib" to "System.Private.Corelib.resources", which does not work)
* Adds some useful classes to mono_defaults
* Removes legacy events from MonoDomain and prevents calling them on netcore
* Fixes UnhandledException to call the correct event
* Wires up FirstChanceException

`AppDomainTests.AssemblyResolve_FirstChanceException` is now failing because of the exception type, so it should work once I sort out https://github.com/dotnet/runtime/issues/34030. Until then, keep it disabled.

Co-authored-by: CoffeeFlux <[email protected]>
2020-06-08 02:17:49 -04:00
Aleksey Kliger (λgeek) ba14e69474 [mono] Move some culture-dependent source files to a separate directory (#19912)
* [mono] Move culture-info-tables.h to a separate directory

We'd like to remove culture-info-tables.h from the dotnet/runtime copy of mono since we use ICU
there for globalization like the rest of .NET 5.

The plan is:
1. We move the file (and some others) to a separate directory (this PR)
2. We tell the sync bot to skip `culture/` in the future
3. We delete the files (or make them empty) in dotnet/runtime
* Also move locale.c and culture-info.h

* Also move mono_w32process_ver_language_name

* [msvc] don't compile locales.c if it doesn't exist

   It exists for now, but won't after we stop syncing culture/ to dotnet/runtime
2020-06-06 14:48:11 -04:00
imhameed ad0b2b8e3d Start unifying unaligned memory access codepaths. (#19913)
The intrinsic expansions for Unsafe.ReadUnaligned and
Unsafe.WriteUnaligned now use mini_emit_memory_load and
mini_emit_memory_store.

stind is now implemented in terms of mini_emit_memory_store; when used
during compilation of the the sgen nursery check wrapper,
mini_emit_memory_store will no longer longer emit a release fence when
storing a reference under the CLR memory model.

mini_emit_memory_load and mini_emit_memory_store also no longer
decompose unaligned loads/stores to explicit byte-wise memcpy move
sequences; the LLVM IR backend already converts
MONO_INST_UNALIGNED-flagged OP_LOAD*/OP_STORE* operations to LLVM memory
movement operations with alignment 1.

Should fix https://github.com/mono/mono/issues/19142.
2020-06-05 13:44:22 -07:00
Zoltan Varga fdb5e61a5b [aot] Fix the binary search in the llvmonly unbox tramp table. (#19922)
Fixes https://github.com/mono/mono/issues/19879.
2020-06-05 12:20:01 -04:00
Zoltan Varga 2321bba344 [wasm] Fix icall linking with netcore. (#19917) 2020-06-05 10:29:52 -04:00
Zoltan Varga 0250810bc9 [interp] Optimize do_jit_call (). (#19904)
* [interp] Optimize do_jit_call ().

* Move the JIT call related fields to a separate JitCallInfo structure.
* Compute calling convention information and store it into JitCallInfo
  to avoid most type processing at call time.

* Address review comments.
2020-06-05 08:38:35 -04:00
Zoltan Varga 5246aaf492 [wasm] Link out the SR resource string code on netcore. (#19919) 2020-06-05 08:21:40 -04:00
Zoltan Varga f27ccd0432 [wasm] Print out the real stack trace when load_runtime () fails. (#19918) 2020-06-05 08:00:46 -04:00
Zoltan Varga dda38c4d17 [wasm] Make aot-profile/runtime.js work with different executables. (#19921) 2020-06-05 07:58:01 -04:00
Zoltan Varga 9dc089f334 [wasm] Fix the print-table.py script. (#19920) 2020-06-05 07:57:46 -04:00
monojenkinsandvargaz 335a5949ad Fix mono_asmctx_get_name () after dotnet/runtime#37264. (#19903)
Co-authored-by: vargaz <[email protected]>
2020-06-03 13:28:17 -04:00
Zoltan Varga eaa32d1365 [runtime] Add a MONO_ASMCTX_INTERNAL assembly context. (#19892)
Use it to avoid triggering managed load events when loading the AOT container image.
2020-06-02 15:53:20 -04:00
Vlad Brezae 3b2e8e1102 [interp] Fix tracing (#19898)
Regressed recently with the change in return value handling.
2020-06-02 21:30:40 +03:00
Alexis Christoforides 51b5fa6421 [runtime] Fix a case where crash chaining was broken (#19891)
We must always have a call to mono_chain_signal() after mono_handle_native_crash(), in case signal chaining and crash chaining are both enabled.
2020-06-02 14:26:37 -04:00
monojenkinsandEgorBo 335750b3ca [mono] Rename libruntime-android.so to libmonodroid.so (#19889)
`libruntime-android.so` was just a random name I used for our test runner but since we need some name for `dlopen` (we can't use dlopen(NULL)) and to be shared between the test runner and Xamarin.Android let's switch to the XA name.

We could add an API for mono embedding to set desired name but 'm not sure if it's worth an effort now.

Co-authored-by: EgorBo <[email protected]>
2020-06-02 13:19:56 +03:00
Bernhard Urban-Forster 3f5ade5246 [github] remove me from codeowners 2020-06-02 10:24:42 +02:00
monojenkinsandlambdageek 5bf43dd0d0 [interp] Switch to GC Unsafe mode before calling get_interp_to_native_trampoline (#19871)
For PInvokes, `ves_pinvoke_method` is called when we're interpreting the
pinvoke wrapper, after it already executed a transition from GC Unsafe to GC
Safe mode.  At that point, calling back into the runtime we have to temporarily
switch back to GC Unsafe mode.

Example stack trace where we don't:

```
     0x10dbdd7d6 - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : mono_dump_native_crash_info
      0x10db7f665 - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : mono_handle_native_crash
      0x10dbdcf3f - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : sigabrt_signal_handler
      0x7fff6886af5a - /usr/lib/system/libsystem_platform.dylib : _sigtramp
      0x0 - Unknown
      0x7fff686081ae - /usr/lib/system/libsystem_c.dylib : abort
      0x10dd9e887 - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : monoeg_assert_abort
      0x10dd75257 - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : mono_log_write_logfile
      0x10dd9ed15 - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : monoeg_g_logv_nofree
      0x10dd9edd2 - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : monoeg_g_log
      0x10dd8b4fc - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : mono_threads_transition_do_blocking
      0x10dd8cc63 - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : mono_threads_enter_gc_safe_region_unbalanced_with_info
      0x10dc40a39 - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : mono_coop_mutex_lock
      0x10dc41e05 - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : mono_domain_alloc0
      0x10dadba6f - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : mono_tramp_info_register_internal
      0x10dbece91 - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : get_interp_to_native_trampoline
      0x10dbebaf9 - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : ves_pinvoke_method
      0x10dbe0e58 - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : interp_exec_method
      0x10dbdf17b - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : interp_runtime_invoke
      0x10dcbae58 - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : mono_runtime_invoke_checked
      0x10dcbacf3 - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : mono_runtime_object_init_handle
      0x10dc6367f - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : mono_exception_new_by_name_domain
      0x10dc63523 - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : mono_exception_from_name_domain
      0x10dbe81c6 - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : interp_exec_method
      0x10dbdf17b - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : interp_runtime_invoke
      0x10dcbae58 - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : mono_runtime_invoke_checked
      0x10dcd6e69 - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : start_wrapper_internal
      0x10dcd6b9e - /private/tmp/helix/working/B38709D8/p/libcoreclr.dylib : start_wrapper
      0x7fff68874661 - /usr/lib/system/libsystem_pthread.dylib : _pthread_body
      0x7fff6887450d - /usr/lib/system/libsystem_pthread.dylib : _pthread_body
      0x7fff68873bf9 - /usr/lib/system/libsystem_pthread.dylib : thread_start
```

Co-authored-by: lambdageek <[email protected]>
2020-06-01 17:28:43 -04:00
monojenkinsandlambdageek 2d187d76ae [mono][metadata] Add a method custom attribute scanning function (#19880)
Our normal custom attribute lookup method may trigger loading.  This is undesirable during class initialization, for example.  For this reason, we have `mono_class_metadata_foreach_custom_attr` that scans a class for custom attributes without triggering loading.

This PR adds `mono_method_metadata_foreach_custom_attr` that does the same thing - looks for custom attributes on methods without causing any loader activity.

This PR also reorganizes the code in `class-init.c` that uses these metadata custom attribute lookups to be a bit easier to use.

Finally we add a convenience method (unused so far) to look for `PreserveBaseOverridesAttribute` which is defined in dotnet/runtime#35315 and which will be necessary to implement covariant returns.

Co-authored-by: lambdageek <[email protected]>
2020-06-01 14:29:20 -04:00
Vlad Brezae d5ed68483c [interp] Remove saving of clause_args from interp state (#19857)
* [interp] Remove saving of clause_args from interp state

clause_args can be set only from EH. This means that clause_args can be set only in the first executed frame, so there is no need to save it in the interp state. Also make sure we never check for it in the main_loop block, for normal calls and returns. Added exec_frame to the clause_args so we can detect whether a frame is the first frame invoked from EH. We can no longer use clause_args for this purpose because we no longer save it in the interp state.

* [interp] Remove error argument to interp_exec_method

We were doing this to avoid having a MonoError local in interp_exec_method, which is no longer relevant. Avoid reiniting the error with each interp call.
2020-06-01 10:58:52 +03:00
Zoltan Varga b7a100c036 [wasm] Fix netcore+aot support. (#19883)
* Add more substitutions for SIMD get_IsSupported () methods.

* [wasm] Fix netcore+aot support.
2020-05-31 11:13:34 -04:00
Zoltan Varga 9c0403bc46 [wasm] Print a warning in the pinvoke generator if multiple incompatible declarations would be emitted, and error (#19873)
out at runtime.

Fixes https://github.com/mono/mono/issues/19869.
2020-05-30 13:00:47 -04:00
Zoltan Varga d35dc0bcf4 [wasm] Fix netcore support in the packager. (#19881) 2020-05-30 06:35:12 -04:00
monojenkinsandlateralusX 233077f452 Fix Mono C++ build. (#19875)
Co-authored-by: lateralusX <[email protected]>
2020-05-30 02:53:10 +02:00
monojenkinsandBrzVlad a42f4fea6b [interp] Remove assertions from release and add more to debug builds (#19878)
Co-authored-by: BrzVlad <[email protected]>
2020-05-30 01:42:45 +03:00
Alexander Köplinger e163c5b6a2 Add back whitespace at end of sre-save.c 2020-05-29 11:12:01 +02:00
monojenkinsandalexischr da0a7f2352 [mono] Implement AssemblyBuilder.GetReferencedAssemblies (#19818)
Some info from https://docs.microsoft.com/en-us/dotnet/api/system.reflection.emit.assemblybuilder.getreferencedassemblies?view=netcore-3.1:

> This method does not return a complete list of referenced assemblies. For example, if you apply a custom attribute to the AssemblyBuilder, the assembly in which the attribute was defined is included in the list returned by this method. However, if you use a Type object to specify the type of a method parameter, that type is not included.

Contributes to https://github.com/mono/mono/issues/14788

Co-authored-by: alexischr <[email protected]>
2020-05-29 10:34:48 +02:00
monojenkinsandalexischr d163874806 [mono] Implement AssemblyBuilder.GetSatelliteAssembly (#19870)
Contributes to https://github.com/mono/mono/issues/14788

Co-authored-by: alexischr <[email protected]>
2020-05-29 10:32:40 +02:00
monojenkinsandCoffeeFlux bea273e99c [runtime] Fix Mono BStr marshaling, cleanup IL generation (#19701)
This PR checks in recent string marshaling work and enables a subset of tests that now run successfully. It's possible that this fixes or changes the failure on other tests, but I've only checked the StringMarshalling ones.

Status of string marshaling of this PR:
* AnsiBStr - tests pass
* BStr - tests pass
* LPStr - failure with StringBuilder
* LPTStr - immediate failure
* UTF8Str - crash with invalid malloc in StringBuilder code (??)
* LPWStr - no tests
* TBStr - no tests

Followup work:
- [ ] Fix UTF8 crash (probably corruption, the crash used to be in a free call)
- [ ] Clean up StringBuilder code (lots of issues, some caught by the tests, in progress)
- [ ] Add TBStr and LPWStr tests (in progress)
- [ ] Fix LPTStr to properly handle both ANSI and UTF16 text (or maybe change the test to align with our historical behavior? currently the test uses LPWStr on all platforms)
- [ ] Add a wall of text on string marshaling behavior for classic and netcore Mono at the start of `conv_to_icall`

Co-authored-by: CoffeeFlux <[email protected]>
2020-05-28 15:01:11 -04:00
monojenkinsandvargaz dcfa0ec293 [runtime] Implement the many argument version of the Vector128.Create () intrinsic. (#19851)
Co-authored-by: vargaz <[email protected]>
2020-05-28 09:17:39 -07:00
Zoltan Varga 5c204cfb10 [wasm] Fix the handling of i8/u8 in get_wrapper_shared_type_full (). (#19859)
Previously, these were returned verbatim, which caused sharing issues when the type had
attributes.

Fixes https://github.com/mono/mono/issues/19841.
2020-05-28 10:44:14 -04:00
Jérôme Laban 5c9b63da2e [wasm] Fix packager not emitting debug symbols when ninja is enabled (#19863)
Fix the packager not emitting debug symbols when ninja is enabled (e.g. when statically linking a bitcode file, still using the interpreter).
2020-05-28 11:55:27 +02:00
monojenkinsandsafern 6489563f28 Add ICU App-Local support on Mono (#19852)
This adds AppLocalIcu switch support on Mono. I also refactored GlobalizationMode to share the sources in between Mono and CoreCLR to avoid duplicating all the AppLocal and UseNls switches logic.

cc: @jkotas @thaystg @akoeplinger @tarekgh @ericstj

Co-authored-by: safern <[email protected]>
2020-05-28 10:37:43 +02:00
Zoltan Varga da59b3acab [wasm] Include the pinvoke table into a separate file, so the generated declarations don't conflict with the ones in the header files included by driver.c. (#19853)
Fixes https://github.com/mono/mono/issues/19837.
2020-05-27 09:53:53 -04:00
monojenkinsandBrzVlad 834bf5ede3 [interp] Remove return value indirection (#19845)
When returning from a method we used to save the return value into frame->retval. We would then have separate opcodes for normal and void call and, depending on the type of call, we would access the retval and push it on the stack. In case of valuetype returns, the value is not returned in the proper space so we have an additional MINT_VTRESULT that copies the return around in the caller frame. In addition to this we had retval, is_void locals, saved as part of the current frame state which just make things confusing and are not needed.

This commit simplifies the call procedure by completely moving the responsability of the return to the called method. Simply put, once a method is ready for the call, it will leave its stack and vtstack to the state after pop-ing the arguments. The called method will then directly push the result to the parent frame's stack/vtstack. This means the calling code doesn't care about the type of the return anymore, the IL instructions after the call will just expect the return on the stack, if any, and use it naturally.

We still make use of frame->retval for interp entry frames (since we don't have a parent frame to push to), for pinvoke and jit_call frames out of convenience, but we should consider removing this variable to further trim down InterpFrame.

Co-authored-by: BrzVlad <[email protected]>
2020-05-27 11:58:16 +03:00
Zoltan Varga 14ff5bd29a [wasm] Add more runtime debugging docs. (#19850) 2020-05-26 22:12:57 -04:00
Johan Lorensson 540e8d1d7b Merge pull request #19472 from monojenkins/sync-pr-34600-from-runtime
Initial work porting native diagnostic event pipe library to C library potentially shared between runtimes.
2020-05-26 15:29:18 +02:00
Marek Habersack 53d0017701 [reflection] Check whether a pointer is valid before dereferencing (#19839)
`Xamarin.Android` native runtime calls `mono_reflection_type_from_name`
and passes `NULL` as the `image` parameter.  The parameter is then
propagated all the way to `_mono_reflection_get_type_from_info` where,
in case the assembly isn't loaded yet, it is used to obtain base
directory of the assembly.  However, since the `image` parameter is
`NULL` in our case, attempt to dereference it causes a segfault:

    libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4c0 in tid 11029 (ompanyname.app3), pid 11029 (ompanyname.app3)
    crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
    /system/bin/tombstoned: received crash request for pid 11029
    crash_dump64: performing dump of process 11029 (target tid = 11029)
    DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    DEBUG   : Build fingerprint: 'google/sdk_gphone_x86_64/generic_x86_64:10/QSR1.190920.001/5891938:user/release-keys'
    DEBUG   : Revision: '0'
    DEBUG   : ABI: 'x86_64'
    DEBUG   : Timestamp: 2020-05-25 14:45:29+0200
    DEBUG   : pid: 11029, tid: 11029, name: ompanyname.app3  >>> com.companyname.app3 <<<
    DEBUG   : uid: 10134
    DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4c0
    DEBUG   : Cause: null pointer dereference
    DEBUG   :     rax 000000000000002f  rbx 0000000000000001  rcx 0000000000000000  rdx 0000000000000030
    DEBUG   :     r8  0000000000000003  r9  000000000013e2e2  r10 0173eed800000000  r11 0000000000000206
    DEBUG   :     r12 0000000000000000  r13 00007478530343c0  r14 00007478075eda33  r15 000074780763efb0
    DEBUG   :     rdi 0000000000000000  rsi 00007478e2cb14d0
    DEBUG   :     rbp 00007ffef3a35680  rsp 00007ffef3a355d0  rip 0000747807a4066a
    DEBUG   :
    DEBUG   : backtrace:
    DEBUG   :       #00 pc 00000000003ba66a  /data/app/com.companyname.app3-aQUF6Ge6_v-WaLb5i8Q7vw==/lib/x86_64/libmonosgen-2.0.so (_mono_reflection_get_type_from_info+474)
    DEBUG   :       #01 pc 00000000003ba3d1  /data/app/com.companyname.app3-aQUF6Ge6_v-WaLb5i8Q7vw==/lib/x86_64/libmonosgen-2.0.so (mono_reflection_type_from_name_checked+321)
    DEBUG   :       #02 pc 00000000003ba26d  /data/app/com.companyname.app3-aQUF6Ge6_v-WaLb5i8Q7vw==/lib/x86_64/libmonosgen-2.0.so (mono_reflection_type_from_name+125)
    DEBUG   :       #03 pc 000000000000ddb5  /data/app/com.companyname.app3-aQUF6Ge6_v-WaLb5i8Q7vw==/lib/x86_64/libmonodroid.so (xamarin::android::internal::EmbeddedAssemblies::typemap_java_to_managed(char const*)+389) (BuildId: 9952f1cfe0d910ae631abc73479f88eef34fd71d)
    DEBUG   :       #04 pc 000000000000def3  /data/app/com.companyname.app3-aQUF6Ge6_v-WaLb5i8Q7vw==/lib/x86_64/libmonodroid.so (xamarin::android::internal::EmbeddedAssemblies::typemap_java_to_managed(_MonoString*)+99) (BuildId: 9952f1cfe0d910ae631abc73479f88eef34fd71d)
    DEBUG   :       #05 pc 0000000000069532  <anonymous:5ad25000>

Even though this happens in `Xamarin.Android`, the error may occur for
any embedding application which passes `NULL` for the `image` parameter
in situation when the assembly isn't in memory yet.
2020-05-26 09:25:33 -04:00
Zoltan Varga 38356be989 [wasm] Remove obsolete emscripten options. (#19844) 2020-05-26 07:33:45 -04:00
Johan Lorensson df8f3c3c3d Create Makefile 2020-05-25 21:08:08 +02:00
lateralusX 6bb89469e8 Initial work porting native diagnostic event pipe library to C library potentially shared between runtimes.
PR handling port of EventPipe C++ library from CoreCLR into a C library that can be shared between Mono as well as CoreCLR runtime.

Due to dependencies and current time line it has been decided to initially target Mono runtime (since it doesn't have event pipe functionality at the moment), but library is still designed to integrate into other runtimes, replacing current C++ library implementation, when time permits.

Until that happens, we will need to make sure changes done in C++ code base gets ported over to C library. The amount of changes going into the native library should however be small and if major changes needs to be done, we should first make sure to move over to use the shared version of event pipe C-library in CoreCLR and then only do changes into shared version of the library.

Port is currently mapping existing C++ code base, no focus on rewrite or change current implementation (unless needed to port code over to C).

Library source files are currently placed into mono/eventpipe folder and build as a separate library, linked into runtime, but will be moved when ready to be shared between runtimes. We might also move all code into a loadable library and p/invokes, depending on size, at least for Mono runtime targeting mobile devices.

There is also a unit test runner under mono/eventpipe/tests using eglib test runner, running through a set of unit tests covering the eventpipe library implementation.

Library is split up over a couple of source files closely mapping corresponding coreclr source files. Most code could be shared between runtimes and artifacts that are runtime specific, like locks/lists/maps/strings/pal layer etc, a shim API is defined in `ep-rt.h` and `ep-rt-types.h` that gets implemented by the targeted runtime consuming the event pipe C library, like `ep-rt-mono.h` and `ep-rt-types-mono.h`. All function in the shim API is small and should be inlinable. For example, locking the configuration lock is declared like this in `ep-rt.h`:

```
bool
ep_rt_config_aquire (void);
```

and in `ep-rt-mono.h` it is implemented like this:

```
static
inline
bool
ep_rt_config_aquire (void)
{
	ep_rt_spin_lock_aquire (ep_rt_mono_config_lock_get ());
	return true;
}
```

and CoreCLR should implement the function using its corresponding locking primitives. NOTE, since we primarily target Mono in initial port there might smaller adjustments needed to the shim API once bringing it over to CoreCLR, but those changes/adjustments can be done when needed.

Since library could be shared, it tries to standardize on common C99 data types when available. If there are runtime specific types needed, they are declared in `ep-rt-types.h` and implemented by each runtime in corresponding file. Most of library is currently following Mono coding guidelines.

For shared types naming is done like this, `EventPipe[Type]`, like `EventPipeProvider`. This naming follow naming of other types in Mono as well as CoreCLR. There is one exception to this rule, types that are runtime specific implementation, naming is following function naming with a _t prefix, like `ep_rt_session_provider_list_t`, that is a list specific type, implemented by each runtime. This is done to make it easier to see difference of types implemented in the runtime specific shim and types implemented in the shared library API surface.

Since library shim implemented by targeted runtime will be called by C code, it can't throw exceptions, the C library should however compile under C++, meaning that CoreCLR's shim should be able to use C++ constructions as long as it don't throw any exceptions.

Library function naming follows the following pattern, for "public" functions included in `ep-*.h` , ep_ + object + action, so for example, `ep_config_create_provider`, corresponds to `EventPipe::Configuration::CreateProvider` in C++ library. For "private/internal" functions not, ep_ prefix is dropped, but object + action is still preserved, for example `config_create_provider` and function is marked as being static when possible. If a function assumes a lock is held when getting called, it is using _lock_held (similar to SAL annotations) postfix to indicate that function doesn't claim lock and if function needs lock to be held by caller, it will assert that condition on enter (similar to `PRECONDITION(EventPipe::IsLockOwnedByCurrentThread())`).

Library uses asserts internally to validate state and conditions. This is a debug/checked build assert that should be excluded in release builds. It is defined in `EP_ASSERT` and should be redefined by targeted runtime. Private/internal functions asserts incorrect input parameters and state, while "public" functions return back error to caller when detecting incorrect input parameters. Incorrect state can still be assert in all kinds of functions.

Getters/Setters are setup for accessing type members. All functions except a type's own alloc/init/fini/free implemented in `ep-*.c` are not allowed to use direct type member access and should go through available inlinable getter/setter functions. There is also a way to build the library that catches incorrect use of members at compile time (not in `ep-*-internals.c` since it include alloc/init/fini/free implementations, but in other source files).

Types that can be stack allocated offers a init/fini function pairs. Types that should only be heap allocated, alloc/free, and types supporting both stack/heap, implements alloc/init/fini/free. Since C can't prevent incorrect usage patterns, the implementation needs to follow correct life time management patterns. Types allocated using alloc should be freed with corresponding free function. For example, `ep_event_alloc` should be freed by `ep_event_free`, the init/fini methods are then called by the alloc/free implementations. For types supporting stack allocation and allocated on stack or aggregated within other types, init must be called before first use and fini before going out of scope.

Ownership of allocated objects is only considered complete on successful function calls. If a function fails, caller still owns resource and need to take actions.

Library uses UTF8 strings internally, mainly since Mono runtime already uses that and it is more portable. Number of strings in the library is limited, and in cases where stream protocol uses UTF16 strings, a prealloc string is stored on the type, reducing need to do multiple UTF8 -> UTF16 conversions over the lifetime of the type.

NOTE, this is first PR setting up most of the direction of the library and (as part of doing that) ported a great deal of eventpipe code and added ~40 native unittests. It is however not complete, or fully working, so there will be several follow up PR's building on top of this work in order to get complete library. Next component to integrate into the library, once this PR is merged, is BufferManager.
2020-05-25 19:06:54 +00:00
w-flo dd9bc98945 configure.ac: check for sockaddr_in6 on Win32 (#19812)
HAVE_STRUCT_SOCKADDR_IN6 needs to be defined to enable IPv6 features in
mono/metadata/w32socket.c.

Fixes TcpListener issues in wine-mono.
2020-05-25 17:08:05 +02:00
Zoltan Varga 02e83f0ddc [wasm] Avoid overwriting the pinvoke table if not changed. (#19833) 2020-05-23 00:25:39 -04:00
Zoltan Varga 8446996cab [jit] Return the compiled method and an unbox trampoline from ldvirtftn when calling ldvirtftn on a valuetype method. (#19809)
* [jit] Return the compiled method and an unbox trampoline from ldvirtftn when calling ldvirtftn on a valuetype method.

Fixes https://github.com/dotnet/runtime/issues/34379.

* [runtime] Add some caching to mono_aot_get_unbox_trampoline (). Register unwind info for trampolines.

* Add a 'method' field to MonoTrampInfo to be used by unbox trampolines.

* Refactor delegate initialization code.

Also handle unbox trampolines during the addr->method lookup.

* Merge mono_delegate_ctor () and mono_delegate_ctor_with_method ().
* Move the actual logic to mini_init_delegate ().
* Remove callbacks.create_jump_trampoline, its not used any more.

* Fix the build.

* Remove an interpreter workaround.

* Avoid leaking the amodule->unbox_tramp_per_method array.
2020-05-23 00:17:50 -04:00
Thays Grazia 8f0fbfcd95 Fixing make dist after implementation of static ICU Shim. (#19819) 2020-05-22 17:23:15 -04:00
monojenkinsandCoffeeFlux 8e071069af Add MONO_LOADER_LIBRARY_NAME define (#19830)
Co-authored-by: CoffeeFlux <[email protected]>
2020-05-22 17:21:12 -04:00
Zoltan Varga d2da900426 [wasm] Preserve UnmanagedFunctionPointerAttribute. (#19829)
Fixes https://github.com/mono/mono/issues/19826.
2020-05-22 03:41:19 -04:00
Ankit Jain a1b68d97c3 [wasm][debugger] Allow invoking property getters for objects (#19726)
* [wasm][debugger][tests] Move the test files to `tests/debugger`

- Also, rename `class Math` to `class SampleMath` in `sample.cs`,
to allow building sample.dll, with all the tests added.

(cherry picked from commit dc265710139d7c3a63f714e4b19bdb60014b5bcb)

* [wasm][debugger][tests] Add back missing dependency

(cherry picked from commit 2bc6482bb3049b34da918e2dc91df459774873c9)

* [wasm][debugger][tests] move *datetime-test.cs to `tests/debugger`

(cherry picked from commit 2b43270a42a599fe2bdb460018460e32571bbc79)

* [wasm][debugger][tests] Move CFO test to debugger-cfo-test.cs

(cherry picked from commit aba95ffddad94a613a9a12eaf0dddcc9dd661b58)

* [wasm][debugger] Allow invoking property getters for objects

- These can be invoked interactively by the user from the IDE/chrome
debugger
- Getters on valuetypes are not supported right now

* [wasm][debugger] Fix warnings

* [wasm][debugger][tests] Fix DateTimeLocale test to await getting

.. properties for a DateTime object. Required after rebasing on master.
2020-05-21 22:38:16 -04:00
Alex Thibodeau 7490cc0e2b Adding check to bypass decoding pdbs that have no sequence points. (#19815)
Unity has a pdb with zero sequence points somehow. If a user added a reference to the library and then attempted to set a managed breakpoint mono would hit an assert and crash when it would attempt to decode this pdb.

Call stack would look like:
```
>	mono-2.0-boehm.dll!mono_ppdb_get_seq_points(_MonoDebugMethodInfo * minfo, char * * source_file, _GPtrArray * * source_file_list, int * * source_files, MonoSymSeqPoint * * seq_points, int * n_seq_points) Line 508	C
 	mono-2.0-boehm.dll!mono_debug_get_seq_points(_MonoDebugMethodInfo * minfo, char * * source_file, _GPtrArray * * source_file_list, int * * source_files, MonoSymSeqPoint * * seq_points, int * n_seq_points) Line 1093	C
 	mono-2.0-boehm.dll!get_source_files_for_type(_MonoClass * klass) Line 6920	C
 	mono-2.0-boehm.dll!get_types_for_source_file(void * key, void * value, void * user_data) Line 7003	C
 	mono-2.0-boehm.dll!monoeg_g_hash_table_foreach(_GHashTable * hash, void(*)(void *, void *, void *) func, void * user_data) Line 364	C
 	mono-2.0-boehm.dll!mono_de_foreach_domain(void(*)(void *, void *, void *) func, void * user_data) Line 95	C
 	mono-2.0-boehm.dll!vm_commands(int command, int id, unsigned char * p, unsigned char * end, Buffer * buf) Line 7341	C
 	mono-2.0-boehm.dll!debugger_thread(void * arg) Line 10323	C
 	mono-2.0-boehm.dll!start_wrapper_internal(StartInfo * start_info, unsigned __int64 * stack_ptr) Line 1241	C
 	mono-2.0-boehm.dll!start_wrapper(void * data) Line 1315	C
 	kernel32.dll!00007ffc12017bd4()	Unknown
 	ntdll.dll!00007ffc121ece51()	Unknown
```

Adding a check to ignore pdbs like this prevents the crash and debugging can continue normally.

Related unity issue: https://issuetracker.unity3d.com/issues/macos-editor-crashes-on-mono-log-write-logfile-when-attaching-a-debugger-and-then-setting-a-breakpoint
2020-05-21 14:24:12 -04:00
monojenkinsandthaystg 2f56fc19dc Fixing tests on android that uses Icu Shim Globalization (#19817)
The linker was removing the icu shim functions even exporting them. The unique solution that we found until now is to force the linking using the -u flag.
This is a temporary fix until we don't implement QCalls.
Fixes https://github.com/dotnet/runtime/issues/36685

Co-authored-by: thaystg <[email protected]>
2020-05-21 15:28:13 +02:00
monojenkinsandalexischr 78dbf5b308 [mono] Implement AsAny marshalling for simple arrays (#19683)
Simple here means of rank 1, and with a blittable value type as element type.

Contributes to https://github.com/dotnet/runtime/issues/35225

Co-authored-by: alexischr <[email protected]>
2020-05-21 10:05:56 +02:00
Vlad Brezae 783b96aa4c [interp] Add separate opcode for pop vt (#19814)
* [interp] Add separate opcode for pop vt

Before this change, pop-ing a vt from the stack was done in 2 opcodes, a MINT_POP (decrementing the stack) and the weird MINT_VTRESULT (decrementing the vtstack). However, optimizations could have removed both the initial loading of the value type on the stack as well as the MINT_POP, leaving MINT_VTRESULT underflowing the vtstack. Fix this and cleanup the code by pop-ing a value type from the stack in a single instruction.

* [interp] Re-enable optimizing away loading of unused value type on the stack
2020-05-21 00:35:51 +03:00
Zoltan Varga cec64d9b7f [interp] Fix interp entry for methods with lots of arguments in llvmonly+interp mode. (#19802)
Fixes https://github.com/mono/mono/issues/19801.
2020-05-20 11:20:19 -04:00
Vlad Brezae 0c87593336 [interp] Small cleanups (#19805)
* [interp] Refactor calli code

Previous code was very confusing.

* [interp] Extract string creation into separate opcode

For speed and simplification of code.
2020-05-20 13:51:43 +03:00
Jo Shields e2b1e065d0 Always include Unicode charinfo, so tar made in csc mode works in mcs mode (#19807)
As-is, a tarball created in Roslyn mode is missing the file charinfo.nlp, which mcs needs to build the classlib.
2020-05-20 11:45:20 +02:00
Andy Savage 2918655063 Added hard limit to sub-make jobs. (#19798)
Fixes #19784
2020-05-20 11:40:35 +02:00
Ankit Jain 98320ecbde [wasm][debugger][tests] Allow overriding which browser to use (#19769)
* [wasm][debugger] Reduce debugger-tests timeout to 40m

- And run that before the system tests since the debugger is more likely
to fail at this point.

Based on @lewing's suggestion

* [wasm][tests] Allow overriding which browser to use

.. via the envvar `WASM_TESTS_ChromePath`.

This can also be set in an `appsettings.json` file next to the test
binaries, like:
```
{ "ChromePath": "</path/to/chrome/binary>" }
```

Also, prefer stable Chrome over Canary.

Co-authored by @lewing
2020-05-18 15:02:38 -04:00
Zoltan Varga 4490662bc0 [wasm] Bump emscripten to 1.39.16. (#19793) 2020-05-18 10:36:30 -04:00
monojenkinsandthaystg 01be43b9cb [mono] Linking statically ICU shim on mono (#19699)
Linking statically ICU shim on mono for windows, linux, macOs and android.

Co-authored-by: thaystg <[email protected]>
2020-05-18 11:02:21 -03:00
w-flo 669ba26333 [corlib] Improve RuntimeThread stub (#19782)
The only call site of RuntimeThread.InitializeThreadPoolThread() is in
ThreadPoolCallbackWrapper, and it needs to return a valid RuntimeThread
reference to prevent a NullReferenceException later on. So return
`new RuntimeThread (null)` instead of a null reference.

This fixes a wine-mono crash I have encountered in "ZUSI 3 - Aerosoft
Edition" (in ZusiDisplay), and it might fix mono bug #17994.
2020-05-18 11:52:53 +02:00
monojenkinsandakoeplinger e35988adc0 Fixes for iOS x86 build (#19795)
Needed for the iOS Simulator for 32bit iOS devices.

Co-authored-by: akoeplinger <[email protected]>
2020-05-18 11:28:11 +02:00
Vlad Brezae b552da81ff [interp] Don't share interp_in signatures for different valuetypes (#19788)
* [interp] Don't share interp_in signatures for different valuetypes

We share interp_in wrappers for different types of signatures if the corresponding params are equivalent. This was added in https://github.com/mono/mono/commit/5cbe93884798684efbb81abd79e0e2a170544b75. This was reusing some sharing mechanism used by gsharedvt. Those wrappers are shared with regard to managed->managed transitions so it takes additional freedoms, converting all valuetypes to ValueTuples instances. These can end up being marshalled differently from the initial struct so we can't use this valuetype sharing infrastructure in the interp_in_wrappers which can operate on native structs.

Fixes test_0_marshal_struct_delegate from pinvoke3.cs

* [interp] Keep sharing interp_in signatures with VT if not pinvoke

As suggested by zoltan
2020-05-16 23:47:28 +03:00
Alexander Köplinger 38584afad0 Bump bockbuild to get https://github.com/mono/bockbuild/pull/159 2020-05-15 14:30:41 +02:00
monojenkinsandlambdageek 8c8497e79f [Mono] Don't set thread name of main thread on Linux (#19742)
Fixes https://github.com/dotnet/runtime/issues/35908

This adds a new function `mono_native_thread_main_thread_known` which returns `TRUE` when the `MonoNativeThreadId` (`pthread_t` on Linux) of the main thread is known.  On Linux the main thread is the one where `gettid () == getpid ()`.  There are two complications:
1. `pthread_t` and `pid_t` are distinct tokens, so knowing the `pid_t` ("os id" in Mono) of the main thread doesn't tell us its `pthread_t` (`MonoNativeThreadId`)
2. In an embedding scenario, the main thread may never interact with Mono (for example all the calls to `mono_jit_init`, etc might be happening on a helper thread).
So the solution is to augment `register_thread` (responsible for initializing a `MonoThreadInfo`) to check for `getpid () == gettid()` and to save `pthread_self()` as the "main thread" when it becomes available.

Co-authored-by: lambdageek <[email protected]>
2020-05-14 15:57:03 -04:00
Ankit Jain 1a022edfcb [wasm][debugger] Clear valuetypes cache on Debugger.resume (#19778)
* [wasm][debugger] Clear valuetypes cache on Debugger.resume

- This fixes:
	1. Check valuetype properties
	2. Debugger.resume, over some code that updates that valuetype
	3. That valuetype's properties show older values

* [wasm][debugger] Send mono_wasm_debugger_resume only if stopped on

.. a managed frame.
2020-05-14 11:48:51 -04:00
Thays Grazia 13c5c4129e [debugger] Removing some asserts (#19758)
* Removing some asserts and returning err_invalid_argument with an error message when it's possible.

* if we don't find method get_ObjectIdForDebugger we try to find the property Task to continue async debug.
2020-05-14 09:16:53 -03:00
monojenkinsandakoeplinger f24a85069b Fix mono runtime build warnings when building iOS config (#19779)
```
  /Users/alexander/dev/runtime/src/mono/mono/mini/aot-runtime.c:5647:13: warning: unused variable 'image' [-Wunused-variable]
```
```
  /Users/alexander/dev/runtime/src/mono/mono/mini/simd-intrinsics-netcore.c:11:1: warning: no previous prototype for function 'mono_simd_intrinsics_init' [-Wmissing-prototypes]
```
```
  /Users/alexander/dev/runtime/src/mono/mono/utils/mono-state.c:1230:1: warning: no previous prototype for function 'mono_crash_save_failfast_msg' [-Wmissing-prototypes]
  /Users/alexander/dev/runtime/src/mono/mono/utils/mono-state.c:1236:1: warning: no previous prototype for function 'mono_crash_get_failfast_msg' [-Wmissing-prototypes]
```

Co-authored-by: akoeplinger <[email protected]>
2020-05-14 12:13:04 +02:00
Ankit Jain bab72f364a [wasm][debugger][tests] Rework SetBreakpointInMethod, to get the (#19771)
* [wasm][debugger][tests] Rework SetBreakpointInMethod, to get the

.. location info from the proxy, and then use `setBreakpointByUrl` to
set the breakpoint.

* [wasm][debugger] Bump timeout for debugger tests, since we are not running

.. tests in parallel now.
2020-05-14 02:15:04 -04:00
Maxim Lipnin b9d0edb407 [wasm] Re-enable some corlib tests (#19642) 2020-05-14 00:16:37 -05:00
monojenkinsandimhameed 3905678ac5 Improve Sse41.Multiply compatibility with LLVM 9. (#19777)
The llvm.x86.sse41.pmuldq intrinsic is no longer available as of
https://github.com/dotnet/llvm-project/commit/254ed028a4bd4fa81d0049d90e6ab23d704dd366.

This also adds a convenience wrapper for creating constant LLVM IR
vectors, up to 16 elements long, of arbitrary integral type.

Finally, fix a latent bug in init_function_pass_manager;
llvm::StringRef::size returns a value of type size_t, but the printf
precision specifier requires a value of type int.

Co-authored-by: imhameed <[email protected]>
2020-05-13 20:17:12 -07:00
mathieubourgeois b66f812449 Emit DWARF debug_abbrev offset for compile units as a label instead of 0 (#19770)
When outputting DWARF code to start a compilation unit in .debug_info, the standard expect a 4-byte offset from the .debug_abbrev code. Mono has always output an offset of 0.

However, this doesn't work in every cases. When we have linux+fullaot, we link two object files (one from Mono, one from LLVM). Both have their .debug_abbrev section. If we use 0 as an offset, it seems possible that the linker will keep thinking that our offset is 0, no matter the circumstances. Since the offset is always 0, it can be using the wrong abbreviation table (i.e. the one from the LLVM assembly instead of the one from the Mono assembly). The consequence of this is that the linked file is not valid DWARF (dwarfdump and objdump will complain about invalid offsets). At best, some tools will be able to work with a part of what we have, but any program requiring entirely valid DWARF will fail.

To fix this, we generate a label for the start of our debug_abbrev section and we instead generate it by generating a long with that label. This matches existing behavior seen in the LLVM generated code, and makes dwarfdump and objdump react properly to the linked product.

Fixes https://github.com/mono/mono/issues/8806
2020-05-13 14:22:51 +02:00
Zoltan Varga f265d9a783 [runtime] Move delegate_bound_static_invoke_cache to MonoWrapperCaches. (#19766) 2020-05-13 08:01:40 -04:00
Alexander Köplinger bcbb4cf5a6 Revert accidental api-snapshot commit 2020-05-13 10:53:46 +02:00
monojenkinsandtqiu8 b7274d8a27 [master] [wasm][debugger][tests] Add locale tests for datetime (#19759)
* [wasm][debugger][tests] Add locale tests for datetime

* incorporate PR feedback & reference issue number for disabled locales

Co-authored-by: tqiu8 <[email protected]>
2020-05-12 13:57:35 -04:00
Thays Graziaandmonojenkins 33b0653c2c [debugger] Merge debugger-libs/Mono.Debugger.Soft (#19725)
Trying to make mono/debugger-libs/Mono.Debugger.Soft be the same as mono/mono/mcs/class/Mono.Debugger.Soft

Relates to https://github.com/mono/debugger-libs/pull/323
* Bump API snapshot submodule

Co-authored-by: monojenkins <[email protected]>
2020-05-12 18:18:49 +02:00
Zoltan Varga 430570e18b [wasm] Bump emscripten to 1.39.15. (#19744) 2020-05-11 13:33:27 -04:00
Calvin Buckley 169a842f4e Fix musl PowerPC build (#19747)
PT_NIP and friends are in this kernel header, but glibc includes it
somewhere in the chain implicitly. musl doesn't. Fix that.
2020-05-11 10:34:16 +02:00
Vlad Brezae 866914eeff [tests] Adjustments to interp disabled tests (#19748)
* [interp] Disable fullaotmixed suite on x86

* [interp] Small cleanup of disabled tests

Enable a bunch of tests on arm (which I thought I enabled 2 years ago). Avoid duplication by moving some arch specific disabled tests to all platforms. Enable a few tests that seem to have been fixed in the meantime.
2020-05-10 22:39:56 +03:00
Vlad Brezae 8e1f242bdb [interp] Fix sdks build (#19745)
* [interp] Fix sdks build

* [interp] Fix build
2020-05-09 11:26:30 +03:00
Vlad Brezae 798f22399e [interp] Add x86 support (#19730)
* [interp] Aling data to 8 bytes

On x86 linux, double doesn't guarantee 8 byte alignment, which we need since all objects on the vt stack need to be 8 byte aligned. Use padding instead to achieve this.

* [interp] Add x86 support

This mainly consists of a trampoline that is used when calling from interp into native code, as well as the call convention logic that initializes the CallContext structure (which is passed to the trampoline). On other platforms we also have a single trampoline used when entering interpreter code. That trampoline works in a similar way and its purpose is to avoid compilation of all possible interp entry signatures, which is problematic on full aot scenarios. Given the interp x86 support is currently provided for android, we can avoid using that trampoline for now and use the per signature jit compiled interp_in_wrappers instead.

The few disabled interp tests are the same as on amd64.

We only support pinvoke into cdecl functions.
2020-05-08 17:44:21 +03:00
Zoltan Varga 049de7513a [interp] Fix memory overwrite during pinvoke r4 parameter passing. (#19709)
* [interp] Fix memory overwrite during pinvoke r4 parameter passing.

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

* [interp] Allocate 1 slot for every pinvoke float arg only.
2020-05-08 05:35:04 -04:00
Larry Ewing 680481793a [wasm][debugger] Only send resolved events on load (#19736)
* [wasm][debugger] Only send resolved events on load

* Add the request to the context after potentially loading the store

* improve the resolution logic
2020-05-07 23:27:59 -05:00
Larry Ewing 8d774f90bf [wasm][debugger] Get loaded files without having a round trip (#19735) 2020-05-07 21:37:38 -05:00
Zoltan Varga ae1ba25fb1 [wasm] Use the official emsdk repo. Use the same version of emsdk as emscripten. (#19737)
* [wasm] Use the official emsdk repo. Use the same version of emsdk as emscripten.

* [wasm] Reclone the wasm repo when the version changes.
2020-05-07 22:30:45 -04:00
monojenkinsandBrzVlad cc7c5855c3 [interp] Remove unnecessary code (#19729)
param_count is always 1 and it doesn't need to be computed at runtime.

Co-authored-by: BrzVlad <[email protected]>
2020-05-07 18:22:29 +03:00
monojenkins 258c9de8d9 [mono] Fix 32bit Android build (#19724)
1) Use `HostArch` for AppBuilder tasks 
2) Remove `tkill` for Android 32bit since it's not available in recent Android NDKs anymore.
2020-05-07 15:37:43 +02:00
Katelyn Gadd 3546709b3f Disable per-collection parallelism in debugger tests (#19722)
* Disable per-collection parallelism in debugger tests because moving tests out into more classes has created more collections, causing test failures

* Fix typo
2020-05-06 21:33:52 -04:00
Ankit Jain c2795c9cb5 [master] Bump msbuild to track xplat-master (#19621)
* [master] Bump msbuild to track xplat-master

* [master] Bump msbuild to track xplat-master

* Update nuget.exe to 5.6.0-preview3

- closest version that I could find, to the one in msbuild (`5.7.0-preview.1.6592`)
2020-05-06 11:40:05 -04:00
Thad House c9e6754eea Fix incorrect arg storage for arm softfp interpreter (#19676)
In get_call_info, IS_HARD_FLOAT is checked to switch between using the FP registers and the GP registers. This was not done in arg_get_storage, which was always using the hard float registers. This would mean parameters to the native trampoline wouldn't get copied correctly, and return values would be incorrect as well.

I can't find a way to add this to tests, since no softfp test systems seem to be built. I'm working on testing the use cases I can think of on my softfp system just to be sure.

Any assignments to type RegTypeHFA were locked behind a IS_HARD_FLOAT check as well, so I think its safe to modify that case too.

Fixes #14591
2020-05-06 11:52:05 +02:00
monojenkinsandtqiu8 e96347b0ef [master] [wasm][debugger][tests] Add tests for multiple breakpoints inline (#19719)
* [wasm][debugger][tests] add tests for multiple breakpoints

* [wasm][debugger][tests] Update CheckBreakpoint with more descriptive name and use CheckLocation

* [wasm][debugger][tests] More descriptive test name

* [wasm][debugger][tests] Combine two tests in one using [Theory]

Co-authored-by: tqiu8 <[email protected]>
2020-05-05 23:18:38 -05:00
Larry Ewing f6e347ed11 [wasm][debugger] Rework setBreakpointByUrl location handling (#19688)
* [wasm][debugger] Only choose the best match when mutiple locations are found
2020-05-05 19:42:28 -05:00
Larry Ewing 5d59d699fc [wasm][debugger] Add tests for floating common types (#19712) 2020-05-05 12:16:47 -05:00
Zoltan Varga cff010202b [wasm] Delete an emscripten patch which is no longer needed. (#19705)
* [wasm] Delete an emscripten patch which is no longer needed.

* [wasm] Disable the dynamic runtime build, it has no usage.
2020-05-05 11:06:38 -04:00
Larry Ewing e911de2a8b [wasm][debugger] Fix type argument (#19704) 2020-05-05 08:53:09 -05:00
Neale Ferguson 5633d5ccef Add soft debugger support to s390x (#19697)
* Add soft debugger support to s390x
  - Implement the sdb trampoline
  - Big-endian fixes for ppdb debugger:
    - Fix utf16 strings
    - Fix decoding of ImageDebugDirectory structures
  - New implementation of OP_SEQ_POINT
  - Enable successful unwind by defining markpoints
  - Implement mono_arch_setup_resume_sighandler_ctx
  - Implement unwind ops in epilog

* Fix delegate-invoke processing
  - Handle up to 10 parameters
  - Use sigparam information to correctly "slide" parameters

* Fix floating point negative zero for s390x
  - Add a new instruction for use in OP_RxCONST -0
  - Check for -0 in constant

* Minor indentation fixes

* Fix atomic add implementation

* Check for additional hardware facilities
2020-05-05 11:04:25 +02:00
Zoltan Varga fdc474bc46 [wasm] Add docs about -fsanitize=address. (#19703) 2020-05-04 16:22:09 -04:00
monojenkinsandCoffeeFlux 6b3eb8aa82 [runtime] Mono ALC embedding: use public types, correct hook signature (#19657)
We can't have GLib types in public headers. Oops.

There is potentially still an issue with `mono_alc_get_default_gchandle` not being exported, but that can wait for later.

cc: @garuma

Co-authored-by: CoffeeFlux <[email protected]>
2020-05-04 10:56:09 -04:00
Jeffrey Stedfast ccadc65005 [Mono.Debugger.Soft] Fixed NRE in MethodMirror.FullName when param_info is not yet cached (#19675)
If param_info has not yet been fetched, then the FullName property
will throw a NRE when accessed.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1112185/
2020-05-04 10:26:09 -04:00
monojenkinsandBrzVlad 5270d49f71 [interp] Move label outside of main loop (#19696)
Wasm has control flow limitations which don't go well with gotos. Move label outside of main loop because it translates to very poor wasm code. Other gotos don't seem to negatively impact instruction dispatch code, so leave them alone, for now ..

Co-authored-by: BrzVlad <[email protected]>
2020-05-04 12:24:15 +03:00
Zoltan Varga ec646ff710 [wasm] Bump emscripten to 1.39.14. (#19690)
* [wasm] Bump emscripten to 1.39.14.

* Set PYTHONUTF8=1 to work around emscripten issue 10551.

* Set LC_ALL as well.
2020-05-04 05:02:20 -04:00
Jérôme Laban 88cae11c6b [Wasm] Additional signatures for SkiaSharp interop (#19671) 2020-05-03 13:14:05 -04:00
Zoltan Vargaandmonojenkins 9e1c7d5aa4 [wasm] Integrate the m2n-gen.cs tool into mcs/tools/wasm-tuner. (#19680)
* [wasm] Integrate the m2n-gen.cs tool into mcs/tools/wasm-tuner.

It should be ran as:
mono wasm-tuner.exe --gen-interp-to-native <output file name> <extra assemblies>.

The <extra assemblies> will be searched for pinvoke methods, and their signatures
will be added to the set of supported signatures.

* [csproj] Update project files

Co-authored-by: monojenkins <[email protected]>
2020-05-01 04:20:53 -04:00
Zoltan Varga 3148398386 Disable a few executables if DISABLE_EXECUTABLES is defined. (#19678) 2020-04-30 14:19:35 +02:00
Thays Grazia e934687575 Cleaning error before return Invalid_argument. (#19660) 2020-04-28 10:56:10 -03:00
Junil Um 6442041b8b Fix if already send error to http client, do not callback. (#19664)
Fixed #10435 

HttpListener already closes the Response object, closes the HTTP Client connection, and then sets the value of Response.StatusCode again. If so, an ObjectDisposedException is thrown.

```
Unhandled Exception:
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.HttpListenerResponse'.
  at System.Net.HttpListenerResponse.set_ContentLength64 (System.Int64 value) [0x00013] in <b4473693dd3c4d45883c574a53529fbe>:0
  at MonoConsoleApp1.Program.Main (System.String[] args) [0x000f8] in <a66f6d7d417445dc9f89c691941ca70b>:0
  at MonoConsoleApp1.Program.<Main> (System.String[] args) [0x0000c] in <a66f6d7d417445dc9f89c691941ca70b>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.HttpListenerResponse'.
  at System.Net.HttpListenerResponse.set_ContentLength64 (System.Int64 value) [0x00013] in <b4473693dd3c4d45883c574a53529fbe>:0
  at MonoConsoleApp1.Program.Main (System.String[] args) [0x000f8] in <a66f6d7d417445dc9f89c691941ca70b>:0
  at MonoConsoleApp1.Program.<Main> (System.String[] args) [0x0000c] in <a66f6d7d417445dc9f89c691941ca70b>:0
```

If an error is sent to the HTTP client while processing a request, it is patched so that the next process is not executed anymore.
2020-04-28 15:37:23 +02:00
Zoltan Varga 41508e493d [wasm] Update netcore build. (#19666) 2020-04-28 05:43:04 -04:00
Ankit Jain c0c18ce34b [wasm][debugger][tests] Split tests into separate files (#19647)
* [wasm][debugger][tests] Move helper methods to base class

* [wasm][debugger][tests] Extract EvaluateOnCallFrame tests to new file

* [wasm][debugger][tests] Extract Array tests to a new file

* [wasm][debugger][tests] Extract CallFunctionOn tests to a new file

* [wasm][debugger][tests] Extract Delegate tests to a new file

* [wasm][debugger] Don't inherit from another test class

.. as that ends up running all the tests of the base class too.

* [wasm][debugger][tests] Improve retries in TestHarnessStartup

Sometimes `/json/list` seems to return an empty array (`[ ]`). Treat
that also as a case for retry.

* [wasm][debugger][tests] Bump timeout from 2s to 5s

* [wasm][debugger][tests] Launch chrome in incognito mode

* debugging

* [wasm][debugger] TestHarnessStartup - don't share `ProcessStartInfo`

.. instances. Instead, create one for every use.
We seem to run into cases where the `get_Environment` is modifying it's
`_environmentVariables` field, concurrently from multiple threads,
causing exceptions like:

```
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at System.Diagnostics.Process.CreateEnvp(ProcessStartInfo psi)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at WebAssembly.Net.Debugging.TestHarnessStartup.LaunchAndServe(ProcessStartInfo psi, HttpContext context, Func`2 extract_conn_url) in /Users/radical/dev/w1/sdks/wasm/ProxyDriver/TestHarnessStartup.cs:line 82
   at WebAssembly.Net.Debugging.TestHarnessStartup.<>c__DisplayClass10_0.<<Configure>b__1>d.MoveNext() in /Users/radical/dev/w1/sdks/wasm/ProxyDriver/TestHarnessStartup.cs:line 167
```

* [wasm][debugger] Fix regression in debug.html

Fixes https://github.com/mono/mono/issues/19653 .
2020-04-27 19:31:46 -04:00
monojenkinsandBrzVlad e76b77a6b2 [interp] Fix tracking of local refcount when adding movloc opcode (#19659)
Consider the following IL code pattern:

```
stloc.np 0
dup
stloc 1
```

When `stloc 1` instruction is processed, we know we have local 0 on the top of the stack so we can replace `dup/stloc` with `movloc 0 -> 1`. However, we need to make sure that the refcount for local 0 is increased so we don't prematurely kill instructions that store into this local (the `stloc.np` from above). This is needed because we remove a dependency from the stack but add one from the locals. If the local 0 would have been explicitly pushed with a ldloc, the refcount is updated when we handle the ldloc, and no other updates are necessary.

Co-authored-by: BrzVlad <[email protected]>
2020-04-28 00:03:58 +03:00
Filip Navara f627ac6c16 Bump corefx (#19646)
Bump CoreFX submodule to get https://github.com/mono/corefx/pull/399.
2020-04-27 11:57:58 +02:00
Neale Ferguson aff8690a9b Major fixes to s390x ABI and add TAILCALL trace support (#19611)
* Fixes to s390x ABI to support roslyn
- Add new instructions
- Fix outarg_vt processing
- Add new hardware capabilities check
- Add mono_trace_tail_method() to properly support traceing of tail events

* Further s390x enhancements:
- Support altstack
- Rework localloc
- Fix tail processing
-- Restoration of registers dependent on paramater use and RGCTX
-- Restoration of FP registers

* Reset the debug flag to FALSE

* Fix tabbing etc. to conform with standard
2020-04-25 18:43:45 +02:00
monojenkinsandvargaz fcb8bd80fe Add some missing linker exclusions. (#19652)
Co-authored-by: vargaz <[email protected]>
2020-04-25 17:08:39 +02:00
monojenkinsandfanyang-mono 429d269d0f Refactor get_time_stamp_ns (#19438)
fixes dotnet/runtime#34074

Co-authored-by: fanyang-mono <[email protected]>
2020-04-24 11:35:41 -04:00
Bernhard Urban-Forster b2ec7fbfd9 [jit] use helper to obtain method signature (#19643)
`mini_method_get ()` doesn't guarantee that `method->signature` is set.
2020-04-24 17:15:59 +02:00
Joshua Peterson d4cb7ce150 Prevent a possible assert in the debugger when a thread detaches (#19541)
When a new thread is attached to the VM, the debugger will add it to the
`thread_to_tls` hash table. When that thread detaches, it will be
removed. Once the thread is attached, if a client is debugging, the
client can use the `CMD_THREAD_GET_FRAME_INFO` command to ask for
details about that thread.

This is a possibility that the thread detaches before the
`CMD_THREAD_GET_FRAME_INFO` command is processed, so the thread may not
exist the the `thread_to_tls` hash table any more.

This is a race condition, but is a valid state, so instead of asserting,
the debugger agent should indicate to the client that the thread no
longer exists, using `ERR_UNLOADED`.
2020-04-24 12:52:09 +02:00
vidir-svanberg 7e64403cfa Prevent NullReferenceException in SurrogateProviderAdapter (#19362)
Prevents NullReferenceException in SurrogateProviderAdapter which occurred when SurrogateProviderAdapter is constructed with a null ISerializationSurrogateProvider instance, which results in NullReferenceException in GetDataContractType, GetDeserializedObject and GetObjectToSerialize.
2020-04-24 10:43:29 +02:00
Ankit Jain 0568261f20 [wasm][debugger] Fix evaluateOnCallFrame for valuetype locals (#19638)
* [wasm][debugger] Fix `evaluateOnCallFrame` for valuetype locals

.. including generic, and async methods.

* [wasm][debugger] Remove some debug spew
2020-04-24 00:22:01 -04:00
monojenkinsandCoffeeFlux 98e3eb8345 [meta] Add embedding API function to get the default ALC (#19598)
Also formatting fixes to the unstable header.

We can just return the stored GCHandle for the default ALC because it's both strong and should never change.

cc: @garuma

Co-authored-by: CoffeeFlux <[email protected]>
2020-04-23 11:49:32 -04:00
Александр Хухлаев 82c4f32882 [WinForms] Fix ListView GetItemAt high load (#19639)
When ListView.VirtualMode = true GetItemAt should not access items collection directly to
get bounds of ListViewItem. Otherwise, method OnRetrieveVirtualItem will be called.
Which costs a lot of time.
2020-04-23 16:58:46 +02:00
Mitchell Hwang 946a479729 [System.Runtime.Serialization] Work around specified cast is not valid error (#19620)
During json serialization, if the key was an enum type, then it would fail trying to cast into an XmlDictionaryString.  

The fix is to treat the enum value like a string.
2020-04-23 09:00:35 -04:00
monojenkinsandCoffeeFlux 72b3c27759 [meta] Add GCHandle embedding API v2 with pointer-sized handles (#19599)
I've adopted the v2 convention instead of attempting a more descriptive name, with the hope that it makes iteration easier in the future and simplifies opt-in obsoletion.

cc: @vargaz @garuma

Co-authored-by: CoffeeFlux <[email protected]>
2020-04-23 08:36:24 -04:00
Alexander Köplinger 1763f53a4f freebsd.sh: Fix check for python3
"env python3" would actually run the python repl which would hang in CI provisioning.
2020-04-23 11:47:30 +02:00
Maxim Lipnin 3a04bff395 [wasm] Enable System.Data tests (#19614) 2020-04-22 09:28:12 -05:00
Maxim Lipnin 2c9ccaa46f [wasm] Add throwing PNSE to where currently disabled tests throw something different (#19538)
* Add throwing PNSE to where currently disabled tests throw something different

* Add try-catch + PNSE to public SslStream ctor in case of WASM
2020-04-22 09:27:33 -05:00
Zoltan Varga 1289c36895 [wasm] Preserve MonoPInvokeCallback using a linker xml descriptor. (#19631)
Fixes https://github.com/mono/mono/issues/19594.
2020-04-22 09:46:24 -04:00
Zoltan Varga bc8f971803 Fix a warning. (#19629) 2020-04-22 12:08:56 +02:00
monojenkinsandBrzVlad 7f41366684 [amd64] Fix tailcall with arguments passed on stack (#19502)
On all platforms, OP_TAILCALL copies the arguments (that are passed on the stack) from the param area in the current frame, to the param area in the caller frame, meaning that it expects the arguments to be passed normally on the stack. However, on amd64, mono_arch_emit_call was storing these arguments directly in the param area of the caller (EMIT_NEW_ARGSTORE), instead of the param area of the current frame. OP_TAILCALL would then override the already set stack parameters with random data from the uninitialized param area of the current frame.

Fixes https://github.com/dotnet/runtime/issues/34376

Co-authored-by: BrzVlad <[email protected]>
2020-04-22 11:49:29 +03:00
Ankit Jain e5937caf97 [wasm][debugger] Fix enumerating for this on valuetypes (#19626)
* [wasm][debugger] `mono_wasm_call_function_on` - remove unncessary

.. parameter, since it is already present in the `args` object.

* [wasm] MonoProxy - convert cfo calls to MonoCommands

* [wasm][debugger] Fix enumerating `this` properties for a valuetype

* [wasm][debugger] `evaluateOnCallFrame` - fix `this` for valuetypes

* [wasm][debugger] Remove MonoCommands no longer used

* [wasm][debugger] Fix showing the name for generic methods

- We were using `method.Name` from Cecil, but that we want to the name
with the type arguments for the generic instance.
2020-04-22 01:33:34 -05:00
Larry Ewing 2c5eb1993f [wasm][debugger] Fix command response handling (#19590)
* [wasm][debugger] send failed evaluations to the browser

Make sure that we allways either send a single result or return
false from Accept Command to ensure that we don't leave
messages spinning.
2020-04-20 17:07:50 -05:00
Zoltan Vargaandmonojenkins 0a37eeadec [wasm] Reenable the managed collation code, link it out by default, add a packager option to enable it. (#19570)
* [wasm] Reenable the managed collation code, link it out by default, add a packager option to enable it.

* Disable some xunit tests which fail because the test runner can't handle the [SkipOnTargetFramework(TargetFrameworkMonikers.Mono)] attribute.

* [csproj] Update project files

Co-authored-by: monojenkins <[email protected]>
2020-04-20 12:53:16 -05:00
Alexander Köplinger 068b41946d [tests] Disable sgen-bridge.exe on Windows x64 FullAOT+LLVM (#19604)
See https://github.com/mono/mono/issues/19603
2020-04-20 19:44:41 +02:00
Ankit Jain 17c4a60cd2 [wasm][debugger] Support array expansion in VS via callFunctionOn (#19588)
- This was prompted by vscode/vs requiring this for array expansion.
- It runs a given js function string, on a given object id.
- We handle the case for dotnet object ids.

Implementation:

- We build a proxy object that reflects the details of the real dotnet object/array
- And run the js function on that proxy object

- Then if `returnByValue` was requested, the result is returned as-is
- Else we cache that object, with a new special object id (`dotnet:cfo_res:..`),
  and return that id in the response.

- Subsequently, we would get `Runtime.getProperties` request on this new object id
- And a `Runtime.releaseObject` request, to free that function result.

- All this is handled currently

Tests:

- A few tests were added which invoke `callFunctionOn`, on JS objects, and checks the result
  - And the same checks are performed on equivalent dotnet objects, with the same js function
  - This should help stay in sync with what we think `callFunctionOn` should work as

  - These tests have an additional parameter - `roundtrip`, which calls a simple function
	`function () { return this; }`
    .. on a dotnet object, and gets the result object id. If `roundtrip == true`, then it
    runs that same function on the result object, and gets a new result object id. And the
    tests run their checks on that.

    - this helps to check that outside of the proxy, the result object behaves same as any
      other dotnet object.

- Also, most of the tests were modified to support an additional mode (`use_cfo`).
  - With this, whenever a test wants to run `Runtime.getProperties on an object, we pass that
    object through the earlier "identity" function, and then run `getProperties` on that
    resultant object.

  - This helps to take advantage most of the existing tests, and use them for `callFunctionOn`
    testing too, by ensuring that the results of CFO returns results same as any other object.

Fixes #19229 
Fixes #19531
2020-04-20 18:55:26 +02:00
Alex Thibodeau 4821038587 Add ability to turn on just the portable executable verifier. (#19575)
Helps fix issue: https://issuetracker.unity3d.com/issues/unity-crashes-when-opening-the-project

We were hitting a crash were a corrupted dll would get loaded and then hit an assert later on when something tried to use it. The verifier suite would correctly identify the dll as corrupt but it was impossible to turn on just the PE verification. I've added a new PE only mode above "off" to allow for just the PE verifier to be used instead of the larger verification suite.
2020-04-20 16:39:05 +02:00
Alexander Köplinger 12dd904025 Fix name of MIT license in LICENSE file (#19601)
It should be MIT, not MIT X11.
Fixes https://github.com/mono/mono/issues/18133
2020-04-20 16:33:50 +02:00
imhameed b2f760ddb3 [mono] Fix multidimensional array construction when using programmer-specified lower bounds. (#19572)
* [mono] Fix multidimensional array construction when using programmer-specified lower bounds.

mono_array_full_new_checked and mono_array_full_new (which is marked as
a MONO_API function) both take two pointers to buffers containing
lengths and lower bounds. mono_array_new_n_icall can split the incoming
parameter list in two before forwarding the results to
mono_array_full_new_checked, so mono_array_full_new_checked was
receiving two buffers containing interleaved lower bounds and lengths.

ECMA-335 states that array constructors that specify both lower bounds
and lengths interleave these values. Deinterleave these
in method_to_ir.

Add some tests to iltests.il that verify that multidimensional arrays
with custom lower bounds work.

Fixes https://github.com/dotnet/runtime/issues/34377.
Fixes https://github.com/dotnet/runtime/issues/34378.
Fixes https://github.com/dotnet/runtime/issues/34381.

* Deinterleave lower bounds and array lengths in the interpreter.

Also make the condition in which the deinterleaving code path is taken
more precise. Perhaps this branch should be marked as unlikely.

* Fix a typo.
2020-04-19 16:33:10 -07:00
monojenkinsandCoffeeFlux 90560d3518 [meta] Mono ALC embedding primer (#19458)
After talking with @lambdageek , we decided we wanted the public API for ALCs to just use gchandles instead of a native struct and to handle conversion within the runtime.

This PR takes that approach, exposing the managed ALC fields to the runtime for cheap conversion and adding `mono_assembly_load_full_alc` and preload hook V3 to the unstable headers.

I considered trying to do something fancier with conversion for the preload hook but decided against it in the end; making a V3 that's intended for embedder usage is straightforward and should work fine. When invoking it, we create a new strong gchandle to keep the managed ALC pinned and then free it after the call is done.

I went with `MonoManagedAssemblyLoadContext` instead of `MonoReflectionAssemblyLoadContext` since ALCs aren't really part of reflection, but I have no strong attachment to the name and can change it if preferred to maintain consistency.

cc: @vargaz @mdh1418 @garuma

Co-authored-by: CoffeeFlux <[email protected]>
2020-04-19 04:14:05 -04:00
Larry Ewing 4eb9787f1b [wasm][debugger] Add an option to clear navigator.webdriver on attach (#19584)
* [wasm][debugger] Add an option to clear navigator.webdriver on attach

* Pass the flag when it is useful
2020-04-19 01:19:56 -05:00
Zoltan Varga e400e13324 Bump linker to the tip of mono-2020-02. (#19583) 2020-04-18 03:57:55 -04:00
Larry Ewing 5c5be77f00 [wasm][debugger] Always send the remove breakpoint command to the browser too (#19576) 2020-04-17 17:26:24 -05:00
Ankit Jain 7f0b1b1037 [wasm][debugger] Show pointer type+address (#19537)
* [wasm][debugger] Simplify the interface between debugger.c and

.. library_mono.js .

* [wasm][debugger] Show pointer type+address

* [wasm][debugger] Address review feedback

* [wasm][debugger] Small cleanups, from review feedback

* [wasm][debugger] declare mono_wasm_add_typed_value as extern
2020-04-17 22:16:23 +02:00
monojenkinsandSamMonoRT 3aa1bbb55f Minor changes - Update specific words in mono code base to be PoliCheck/TSA compliant (#19560)
Based on a recent PoliCheck tool run on the code base, there were some words in the code which weren't compliant. List of Mono bugs here :
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdevdiv.visualstudio.com%2Fweb%2Fqr.aspx%3Fpguid%3D0bdbc590-a062-4c3f-b0f6-9383f67865ee%26qid%3Da5547394-def7-4a3d-ae81-fe8480583539&data=04%7C01%7Csampatel%40microsoft.com%7C0f0f005f4bf4422e7d5f08d7e1717a81%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637225749822378839%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C-1&sdata=QmWt%2BP%2FzZ2PRyxwHuSJu%2FvE3dnGkahfIdjA%2FH06XoSs%3D&reserved=0

This change fixes some of those. There will be another PR for region/language/locale specific GeoPolitical issues identified by the scan too.

Co-authored-by: SamMonoRT <[email protected]>
2020-04-17 12:39:58 -04:00
Zoltan Varga 80f7953477 [aot] Fix the support for separate aot data files. Reorder the MONO_AOT_TABLE constants so they match the ordering in MonoAotFileInfo. (#19565) 2020-04-17 11:41:07 +02:00
Martin Baulig dfd748b695 Bump CoreFX to pickup https://github.com/mono/corefx/pull/398. (#19564)
Fixes https://github.com/mono/mono/issues/19451.
2020-04-17 11:07:06 +02:00
Zoltan Varga bb019312d3 [wasm] Update netcore support. (#19574) 2020-04-17 03:12:20 -04:00
Ankit Jain 354c9e68b6 [wasm][debugger] Show signature for delegate, or target, if available… (#19535)
* [wasm][debugger] Show signature for delegate, or target, if available (#19505)

* [wasm][debugger] Show signature for delegate, or target, if available

- As object properties, we return a `Target` which has the signature of
the delegate target.

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

* [wasm][debugger] Some tidying up

* [wasm][debugger] Remove unused `sig_desc`

* [wasm][debugger] Simplify code, avoid extra allocations

.. as suggested by @lewing

(cherry picked from commit 4eca12e794)

* [wasm][debugger] Fix tests broken because unused vars are not null

.. anymore, which is because we disabled optimizations in the
interpreter when debugging.

* [wasm][debugger][tests] Add tests to also check delegates in previous

.. frames.

* [wasm][debugger] Disable a test that tried to look at previous async

.. frames. This just happened to work. Currently, the trace has details
of the async machinery, instead of one reflecting what it might have
looked like for a non-async case. So, we can't reliably find the
previous method to inspect it's locals.

* [wasm][debugger] Fix test
2020-04-16 22:38:39 -05:00
monojenkinsandBrzVlad 7ae1d80f03 [jit] Add support for fconv.ovf.*.un opcodes (#19539)
These opcodes have the same effect as their non-_un_ counterpart, since floats are always signed. This means that applying a fconv.ovf.i8.un to a negative float, will result in a negative integer, despite the unsigned suffix (tested against coreclr).

Fixes https://github.com/dotnet/runtime/issues/34084

Co-authored-by: BrzVlad <[email protected]>
2020-04-17 01:38:40 +03:00
Larry Ewing a65055dbdf Change OSPlatform for wasm to "BROWSER" rather than "WEBASSEMBLY"
Following the guidance in https://github.com/dotnet/runtime/issues/33328
Change OSPlatform to BROWSER for wasm runtimeArchitecture.
2020-04-16 22:57:33 +02:00
Larry Ewing eb68dbc2b0 [wasm][debugger] Add comment about embedded pdbs and fix old regression (#19563)
With embedded pdbs we have to try to load symbols even when the
pdb is missing then handle ArgumentException if there is no embedded
pdb.  This restores the intended error path and added an explanation
while still logging unexpected errors
2020-04-16 15:49:17 -05:00
Larry Ewing 42f5d32e12 [wasm][debugger] Handle multi-doc methods and multiple results for breakpoints (#19449)
* [wasm][debugger] Rework source loading

Add logic to support embedded sources and
add all the documents from multi-doc methods

Add logic to check source hashes against
pdb hash.

* [wasm][debugger] Fix breakpoints on delegates

Only add methods to a source once by RID

When column is != 0 specified the fronted only wants results
that match that column exactly.

* Allow checking pdb hash and remove source cache

* Fixup typesByName merge
2020-04-16 11:58:55 -05:00
monojenkinsandvargaz 9545c24a15 Make the -Wsometimes-uninitialized into an error. (#19543)
Co-authored-by: vargaz <[email protected]>
2020-04-16 18:32:41 +02:00
Larry Ewing b1e4d125c7 [wasm][debugger] Fix typo and silence output (#19556) 2020-04-16 09:32:12 -05:00
Thays Grazia 039a6890f4 [debugger] Remove assert when the DebuggerTypeProxy cannot be instantiated
Remove the assert because we don't need to stop the debug if we cannot create the object when calling the constructor using invoke_method, if it's a DebuggerTypeProxy, we are not able to show the value of the DebuggerTypeProxy, but we still can show the Raw View, if it's not the case of DebuggerTypeProxy, we just cannot evaluate this expression, but we can continue the debug session.

Fix #19492
2020-04-16 10:17:09 -03:00
Zoltan Varga be24f101bd [wasm] Debugger test improvements. (#19499)
* Disable the Loaded: messages, they are not very useful.

* Add a Dotnet-test.setBreakpointByMethod protocol extensions to the proxy to set breakpoints in specific methods during testing.

* Add a new sample debugger test using the setBreakpointByMethod API.

* Remove some unrelated changes.

* Restore logging.

* Disable a log message which is printed when a pdb file is missing.
2020-04-15 16:37:50 -04:00
Larry Ewing 123bee9620 [wasm] Use browser style lang (#19544) 2020-04-15 12:12:47 -05:00
Thays Grazia aaf7a193cc [metadata] Identify when a field is overlapped by a non-object field (#19485)
Fix class loader to identify when the class has a field overlapped by a non-object field.
Fix method-to-ir to forward the TypeLoad error.
Fix transform to forward the TypeLoad error.
Fix unit test that has a class with a field that is overlapped by a non-object field.

Fixes dotnet/runtime#34388
2020-04-15 13:09:01 -03:00
Larry Ewing a73d0c028f [wasm] force set a local when running debugger tests (#19546) 2020-04-15 08:23:42 -05:00
Johan Lorensson 5a71ba15f3 Fix missing array ctor(int32,int32) test failures. (#19494)
According to ECMA, VES should add the following methods to arrays:

* A constructor that takes a sequence of int32 arguments, one for
each dimension of the array, that specify the number of elements
in each dimension beginning with the first dimension. A lower bound
of zero is assumed.

* A constructor that takes twice as many int32 arguments as there are dimensions
of the array. These arguments occur in pairs—one pair per dimension—with
the first argument of each pair specifying the lower bound for that
dimension, and the second argument specifying the total number of elements
in that dimension.

* Get.

* Set.

* Address.

In Mono's case we only added the ctor (int32, int32) for rank 1 arrays
if they were "jagged" array. Array with rank 1-4 executed an optimized
code path always using the one int32 per rank constructor.

This doesn't work in cases where the array is constructed using both
a length and a lower bound pattern, like:

newobj instance void int32[10000...10005]::.ctor(int32, int32)

this would trigger a method not found exception, since its not a jagged
array, Mono wouldn't add the ctor(int32, int32) constructor for this type.

Fix will make sure we follow ECMA's definition of this and fix code
to use right instance methods of arrays. Code also adds an assert
to trap if a jagged array is created through this code path
(shouldn't happen) since current implementation would have handled it as
a 2 ranked array.

Fix also adds several tests into iltests.il allocating different
variations of arrays using lower/upper bounds and validating length, rank,
upper/lower bounds of allocated arrays.
2020-04-15 10:44:26 +02:00
monojenkinsandvargaz e71879085d Fix an uninitialized variable error introduced by dotnet/runtime#34877. (#19540)
Co-authored-by: vargaz <[email protected]>
2020-04-14 23:18:55 +02:00
Zoltan Varga a5fd1cd86f [wasm] Fix netcore support. (#19521)
* [wasm] Remove netcore build support from builds/wasm.mk, its not used anymore.

* [wasm] Fix netcore support.

Currently, only local development with a separate dotnet/runtime repo works. The mono runtime, corelib, and the bcl will be taken from that repo.
AOT doesn't work.

* Fix running xunit tests.

* Fix some tests.

* Revert some unrelated changes.
2020-04-14 11:00:56 -04:00
Johan Lorensson a87a90463e Fix infrequent/random crashes on Windows x64 due to use of GC forwarded objects. (#19475)
* Fix infrequent/random crashes on Windows x64 due to use of GC forwarded objects.

Hard to repro and very infrequent crash. Have been analyzing a couple
of crash dumps from retail devices getting different crashes related to
vtable "corruption" on Windows x64. After some deeper analysis it turns
out the object instance has been forwarded by GC
(object vtable pointers lowest bit set to 1), but object still holds
tagged vtable. This will then cause misaligned reads, getting back random
values and pointers from vtable on next object access.

After some further analyzing it turns out that LLVM codegen and some
specific generic vt arrays lowering can cause optimized mem copies
using XMM registers. I have also identified scenarios where vt copies
gets lowered into a c-runtime memcpy that in turn uses XMM registers
as an optimization. Since Windows x64 currently don't include XMM
registers in context, any references in XMM registers will not be
visible and pinned by GC, meaning that they will point to potentially
forwarded objects after completing GC, restarting threads, leading
to these infrequent random crashes.

Fix includes xmm0-xmm15 into MonoContext on Windows x64, making sure
GC will see all references that could be held in those registers,
regardless if getting into those registers due to LLVM optimization
or other native code, like memcpy.
2020-04-14 13:46:08 +02:00
Martin Baulig 6e6f67669d Bump CoreFX to pickup https://github.com/mono/corefx/pull/397. (#19525) 2020-04-14 12:33:10 +02:00
monojenkinsandvargaz a448a33fd7 [wasm] Disable the AOT cache check on wasm as well. (#19522)
Co-authored-by: vargaz <[email protected]>
2020-04-14 00:54:56 -04:00
monojenkinsandvargaz e4eb2f0efc [runtime] Try to load assemblies from bundles on netcore before trying other methods, the ALC might not be initialized yet. (#19520)
Co-authored-by: vargaz <[email protected]>
2020-04-13 22:23:53 -04:00
Tammy Qiu bc3f47fdf5 [wasm] Add readme to package update scripts (#19507)
* add powershell and bash scripts for replacing default webassembly nuget packages from link or path

* [wasm] Add readme to package update scripts
2020-04-13 19:56:26 -05:00
Ankit Jain d5daeeab9a [wasm][debugger] Improve some valuetype visualization (#19490)
* [wasm][debugger] Fix up `value.description` for local vars too

- Local vars, when being enumerated in `mono_wasm_get_variables` don't
have an associated `name`, and so `_fixup_name_value_objects`
*incorrectly* ends up not fixing up the `value.description` field for
them.

* [wasm][debugger] For some types, use `ToString()` for their ..

.. `description`.

- `System.DateTime`
- `System.DateTimeOffset`
- `System.Decimal`
- `System.TimeSpan`
- `System.Guid`

* [wasm][debugger] Invoke all property getters, for some types

- `System.DateTime`
- `System.DateTimeOffset`
- `System.TimeSpan`

* [wasm][debugger] Show char symbol along with the code

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

* [wasm][debugger] Fix DateTime tests, don't use hardcoded strings for

.. description. Instead, use a `DateTime` object in the test to create
the expected string for the test. This should ensure that the expected
and actual were created in the same environment.

* [wasm][debugger] Special case `System.Guid` to use

.. `mono_guid_to_string`, instead of calling `ToString()` on it.

* [wasm][debugger] Don't box valuetypes for calling `ToString()`

Co-authored by @vargaz .

* [wasm][debugger] `System.Guid` is special-cased, so remove it from the

.. allowed list.

* [wasm][debugger] simple cleanup
2020-04-13 19:50:56 -05:00
Larry Ewing fdb3893c09 [wasm][debugger] explicitly pass --lang=en_US for debugger tests (#19529) 2020-04-13 17:37:40 -05:00
monojenkinsandEgorBo 585d92f375 [mono] Implement Sse41, Pclmulqdq, Aes and enable Sse41 intrinsics (#19518)
This PR implements `Sse41`, `Pclmulqdq`, `Aes`  and enables `Sse42` (was implemented but disabled). Thus, Mono-LLVM now fully supports the following intrinsics:
- [ ]  System.Runtime.Intrinsics.X86.*
  - [x] **Sse**
  - [x] **Sse2**
  - [x] **Sse3**
  - [x] **Ssse3**
  - [x] **Sse41**
  - [x] **Sse42**
  - [x] **Aes**
  - [x] **Bm1**
  - [x] **Bm2**
  - [x] **Lzcnt**
  - [x] **Pclmulqdq**
  - [x] **Popcnt**
  - [ ] **Avx**
  - [ ] **Avx2**
  - [ ] **Fma**

- [ ] System.Runtime.Intrinsics.Arm.*
  - [x] **ArmBase**
  - [x] **Crc32**
  - [ ] **AdvSimd**
  - [ ] **Aes**
  - [ ] **Sha1**
  - [ ] **Sha256**

- [ ] System.Runtime.Intrinsics.*
  - [ ] **Vector64** (needed for Arm)
  - [x] **Vector128**
  - [ ] **Vector256** (needed for Avx, Avx2 and Fma)

The changes should be LLVM-9 friendly.

Co-authored-by: EgorBo <[email protected]>
2020-04-14 00:37:11 +03:00
Kenneth Pouncey b653274418 [wasm][sdk][nuget] Bump version. (#19483) 2020-04-13 11:50:16 -05:00
Kenneth Pouncey acddc9c5c9 [wasm][browser][tests] Generate sdk version in global.json file automatically. (#19484) 2020-04-13 11:49:30 -05:00
Zoltan Varga 6e5c15cea5 [wasm] Remove .stamp-build-debugger-test-app, the app can always be built. (#19517) 2020-04-12 03:36:59 -04:00
Larry Ewing 5a45ab6630 [wasm][ci] Always build and package wasm (#19508) 2020-04-11 11:23:10 +02:00
Zoltan Varga f9faa296b8 [wasm] Disable interpreter optimizations when debugging. (#19504)
* [wasm] Disable interpreter optimizations when debugging.

* Fix tests.
2020-04-11 03:08:25 -05:00
Kenneth Pouncey 5a3e168af2 [wasm][bcl] Handle correctly backslash in file name (#19488)
* [wasm][bcl] Handle correctly backslash in file name

- Modify IO file to assign backslash to alternate directory separator by default
- Add tests for issue https://github.com/mono/mono/issues/18933

* [wasm][tests] Skip two tests for wasm

- After internal discussions decided to skip these two tests on wasm

   1. GetDirectories_Backslash
   1. GetFiles_Backslash

* [wasm][tests] PathIsRooted tests failing

- skip subtest #9 if WASM
- To fix issue https://github.com/mono/mono/issues/18933 we set the AltDirectorySeparatorChar as well.  This causes the `Assert.IsTrue (!Path.IsPathRooted ("\\"), "IsPathRooted #09");` to fail. Path.IsPathFullyQualified Method handles paths that use both the DirectorySeparatorChar and the AltDirectorySeparatorChar characters.

* [wasm][tests] PathIsRooted tests failing

- skip if WASM
2020-04-11 09:31:39 +02:00
Immo Landwerth fc7ea0aa0e Fix links to Code of Conduct (#19510) 2020-04-10 23:31:46 +02:00
Tammy Qiu e4fbccac0a add powershell and bash scripts for replacing default webassembly nuget packages from link or path (#19498) 2020-04-10 08:54:59 +02:00
Kenneth Pouncey 9bfe456516 [wasm][bcl][zoneinfo] Fix local zone info marshaling (#19493)
- Correctly marshal Intl.DateTimeFormat().resolvedOptions().timeZone information
2020-04-09 23:41:31 -04:00
Zoltan Varga f821cf4f80 [llvm] Fix a crash in JIT mode. (#19496)
* [llvm] Fix a crash in JIT mode.

* [runtime] Change some g_return_if_fails's to asserts.
2020-04-09 17:07:46 -04:00
dotnet-maestro[bot]anddotnet-maestro[bot] ced27c7de3 Update dependencies from https://github.com/dotnet/arcade build 20200401.2 (#19455)
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20201.2
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20201.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2020-04-09 16:45:30 +02:00
Larry Ewing 34cccfa2fd [wasm][debugger] Wasm debug log level (#19479)
* [wasm][debugging] pass enable_debugging as debug engine log level

enable_debugging was already an int, with this change log_level
will remain at 1 by default but passing -1 will disable the log
spew

* Change the default debug level of 'Failed to lookup sequence point'
2020-04-08 23:31:52 -05:00
Jeff Smith 1167f95932 [metadata] Handle MONO_TYPE_FNPTR case in collect_type_images (#19434)
Fixes abort when PTR-FNPTR field signature is encountered.

Fixes https://github.com/mono/mono/issues/12098
Fixes https://github.com/mono/mono/issues/17113
Fixes https://github.com/mono/mono/issues/19433
2020-04-09 01:22:04 +02:00
Alexis Christoforides fda7280cea [merp] Synchronize (serialize) calls to MERP API (#19429)
Fixes https://github.com/mono/mono/issues/19406
2020-04-08 16:06:37 -04:00
Filip Navaraandmonojenkins 1fa5c1e0eb Add BeginRead/BeginWrite/EndRead/EndWrite overloads back to SslStream (#19442)
* Add BeginRead/BeginWrite/EndRead/EndWrite overloads back to SslStream and underlying implementation. Unlike the default implementation in Stream it allows parallel read along with parallel write using the standard TaskToApm pattern (https://github.com/dotnet/runtime/issues/33447). This reverts part of https://github.com/mono/mono/pull/17393 which could lead to deadlocks as reported in https://github.com/mono/mono/issues/18865.

* Move the TaskToApm pattern from MobileAuthenticatedStream to SslStream

* Bump API snapshot submodule

Co-authored-by: monojenkins <[email protected]>
2020-04-08 20:03:54 +02:00
Karl 29214fcbf1 Fix WinForms LinkLabel drawing (#19386)
MeasureCharacterRanges handles the alignment correctly by itself.

This may have been to handle poor behaviour in libgdiplus, particularly
when Pango text layout was not default.
2020-04-08 19:44:41 +02:00
Karl ed23e5e41a Three small RichTextBox / TextControl fixes (#19401)
1. Fix the height calculated by Line.RecalculatePasswordLine(). Would
   have been roughly double what it should have been - line spacing
   includes the height of the line.

2. In RichTextBox, insert a character for the Quote special character
   tags rather than just printing a message on the console.

3. In TextControl Document.Draw(), fix the criteria for skipping the
   last line. Could probably be improve further, but the previous had a
   problem because it could check with a point well off the bottom of
   the second to last line instead of its bottom. This probably arose
   because I had used line.Height for just the height of the text in the
   line, and later decided that it should be the entire height including
   all spacing, and added line.TextHeight. The earlier behaviour would
   have been wrong too, because it would have pointed to the bottom of
   the text, not the bottom of the line.
2020-04-08 19:44:03 +02:00
Александр Хухлаев a26d2f0c3e [Winforms] fix #18606 PropertyGrid didn`t edit value with CustomTypeDescriptor (#19452)
When using implemeted ICustomTypeDescriptor with overrided SetValue(object component, object value) and there value reference will be changed even if new object`s fields will be equals then in line
current_changed = Object.Equals (properties[i].GetValue (propertyOwners[i]), value);
will not detected change cause of references of object in operands are not equal.
In usual ways references will be equal. So we compare old value ref with new value ref earlier.
In .net winforms do same. And also original winforms did not check CanConvertFrom whith type of editable object. So we do not need block with
converter.CanConvertFrom ((ITypeDescriptorContext)this, valueType))

Fixes #18606
2020-04-08 19:43:10 +02:00
Александр Хухлаев e3f31b2bdc [Winforms] PropertyGrid fix disappearing of items (#19453)
When Category Name match with Item name this GridItem will disappear
2020-04-08 19:41:54 +02:00
Александр Хухлаев 198e323fc2 [WinForms] Fix ToolStripTextBox Width (#19457)
When set non-Empty Size to ToolStripTextBox it will appear with zero with, but must use width from size.
2020-04-08 19:40:21 +02:00
Александр Хухлаев 4f7cc4db7e [WinForms] PropertyGrid must show value text even if CanConvertTo return false (#19463)
If we use PropertyDescriptor with Converter like this

public class MyConverter : TypeConverter
{
    public override bool CanConvertTo(ITypeDescriptorContext context, Type destType)
    {
         return false;
    }
}

GridEntry will not show text of Value which uses MyConverter.
In .net they do not check CanConvertTo, they call ConvertToString directly.
2020-04-08 19:37:55 +02:00
Alexander Köplinger a4a19c3cb4 freebsd.h: Print commands as they're executed 2020-04-08 18:39:16 +02:00
Zoltan Varga b33943df2b [runtime] Fix Type.GetTypeCode () for generic enums. (#19470)
Fixes https://github.com/mono/mono/issues/17735.
2020-04-08 12:05:22 -04:00
Alexander Köplinger c6fa6f773a freebsd.sh: Use yes instead of 1 for ASSUME_ALWAYS_YES 2020-04-08 12:04:30 +02:00
Phil Jaenke cd024dc80f Fix for missing IGNORE_OSVERSION (#19467)
Quarterly is using 1201000, Azure is 1200086, causing forced bootstrap to fail.
2020-04-08 12:01:45 +02:00
Pranav K a0d69a4e87 Produce System.Net.Http.WebAssemblyHttpHandler (#19260)
* Produce System.Net.Http.WebAssemblyMessageHandler

* Branding changes for WebAssembly.Net.Http -> System.Net.Http.WebAssemblyMessageHandler

* Change how fetch options are configured

* Fixup tests

* More fixup

* Update submodule
2020-04-08 11:42:03 +02:00
monojenkinsandCoffeeFlux 1386af6071 [meta] Fix loader printf mistake and outdated info in Makefile (#19459)
Co-authored-by: CoffeeFlux <[email protected]>
2020-04-08 01:10:40 -04:00
Kenneth Pouncey 42c76a9728 [wasm][http] Throw HttpRequestException instead of internal WebAssembly.JSException. (#19454) 2020-04-07 17:50:07 -05:00
Phil Jaenke 8fbdc3ea44 Fix for 2020Q1 FreeBSD pkg upstream, some cleanup. (#19465)
pkg has been updated to 1.12+ which has an incompatible metadata format.
Fix this by force bootstrapping pkg when necessary. Also perform some
general cleanup and go back to the python3 metaport as 2020Q1 uses a
sufficiently current Python for the metaport.
2020-04-07 19:50:16 +02:00
monojenkinsandBrzVlad a562759d6e [sgen] Fix coverity issue (#19462)
Co-authored-by: BrzVlad <[email protected]>
2020-04-07 11:56:08 +02:00
Karl 54256b61e9 When double buffering, flush the buffered graphics (#19460)
Otherwise some stuff doesn't always get drawn.

Fixes https://github.com/mono/libgdiplus/issues/640, and probably other similar things.
2020-04-07 10:28:01 +02:00
monojenkinsandEgorBo c683499ad3 [mono] Implement Arm intrinsics: ArmBase, Crc32 (#19353)
Implement `System.Runtime.Intrinsics.Arm.ArmBase` and `*.Crc32` intrinsics for Arm64 with LLVM-backend. `ArmBase` is enabled by default, `Crc32` for LLVM-AOT can be enabled either via `mcpu=native` or `mattr=+crc` (e.g. when we crosscompile for iOS).

Asm: (`--aot=llvm,mcpu=native System.Private.CoreLib.dll` on Cortex-A57):
```asm
;; ArmBase

; int LeadingZeroCount(int value)
0000000000292c84 <System_Runtime_Intrinsics_Arm_ArmBase_LeadingZeroCount_int>:
  292c84:	clz	w0, w0
  292c88:	ret

; int LeadingZeroCount(uint value)
0000000000292c8c <System_Runtime_Intrinsics_Arm_ArmBase_LeadingZeroCount_uint>:
  292c8c:	clz	w0, w0
  292c90:	ret

; int ReverseElementBits(int value)
0000000000292c94 <System_Runtime_Intrinsics_Arm_ArmBase_ReverseElementBits_int>:
  292c94:	rbit	w0, w0
  292c98:	ret

; uint ReverseElementBits(uint value)
0000000000292c9c <System_Runtime_Intrinsics_Arm_ArmBase_ReverseElementBits_uint>:
  292c9c:	rbit	w0, w0
  292ca0:	ret

;; ArmBase.Arm64

; int LeadingSignCount(int value)
0000000000292cac <System_Runtime_Intrinsics_Arm_ArmBase_Arm64_LeadingSignCount_int>:
  292cac:	cls	w0, w0
  292cb0:	ret

; int LeadingSignCount(long value)
0000000000292cb4 <System_Runtime_Intrinsics_Arm_ArmBase_Arm64_LeadingSignCount_long>:
  292cb4:	cls	x0, x0
  292cb8:	ret

; int LeadingZeroCount(long value)
0000000000292cbc <System_Runtime_Intrinsics_Arm_ArmBase_Arm64_LeadingZeroCount_long>:
  292cbc:	clz	x0, x0
  292cc0:	ret

; int LeadingZeroCount(ulong value)
0000000000292cc4 <System_Runtime_Intrinsics_Arm_ArmBase_Arm64_LeadingZeroCount_ulong>:
  292cc4:	clz	x0, x0
  292cc8:	ret

; long ReverseElementBits(long value)
0000000000292ccc <System_Runtime_Intrinsics_Arm_ArmBase_Arm64_ReverseElementBits_long>:
  292ccc:	rbit	x0, x0
  292cd0:	ret

; ulong ReverseElementBits(ulong value)
0000000000292cd4 <System_Runtime_Intrinsics_Arm_ArmBase_Arm64_ReverseElementBits_ulong>:
  292cd4:	rbit	x0, x0
  292cd8:	ret

;; Crc32

; uint ComputeCrc32(uint crc, byte data)
0000000000292ce4 <System_Runtime_Intrinsics_Arm_Crc32_ComputeCrc32_uint_byte>:
  292ce4:	crc32b	w0, w0, w1
  292ce8:	ret

; uint ComputeCrc32(uint crc, ushort data)
0000000000292cec <System_Runtime_Intrinsics_Arm_Crc32_ComputeCrc32_uint_uint16>:
  292cec:	crc32h	w0, w0, w1
  292cf0:	ret

; uint ComputeCrc32(uint crc, uint data)
0000000000292cf4 <System_Runtime_Intrinsics_Arm_Crc32_ComputeCrc32_uint_uint>:
  292cf4:	crc32w	w0, w0, w1
  292cf8:	ret

; uint ComputeCrc32C(uint crc, byte data)
0000000000292cfc <System_Runtime_Intrinsics_Arm_Crc32_ComputeCrc32C_uint_byte>:
  292cfc:	crc32cb	w0, w0, w1
  292d00:	ret

; uint ComputeCrc32C(uint crc, ushort data)
0000000000292d04 <System_Runtime_Intrinsics_Arm_Crc32_ComputeCrc32C_uint_uint16>:
  292d04:	crc32ch	w0, w0, w1
  292d08:	ret

; uint ComputeCrc32C(uint crc, uint data)
0000000000292d0c <System_Runtime_Intrinsics_Arm_Crc32_ComputeCrc32C_uint_uint>:
  292d0c:	crc32cw	w0, w0, w1
  292d10:	ret

;; Crc32.Arm64

; uint ComputeCrc32(uint crc, ulong data)
0000000000292d1c <System_Runtime_Intrinsics_Arm_Crc32_Arm64_ComputeCrc32_uint_ulong>:
  292d1c:	crc32x	w0, w0, x1
  292d20:	ret

; uint ComputeCrc32C(uint crc, ulong data)
0000000000292d24 <System_Runtime_Intrinsics_Arm_Crc32_Arm64_ComputeCrc32C_uint_ulong>:
  292d24:	crc32cx	w0, w0, x1
  292d28:	ret
```
@tannergooding @echesakovMSFT Could you please take a quick look at asm ^ if it's ok or not.

`Vector64<T>`, `Vector128<T>`, `Vector<T>` are not enabled yet.

Co-authored-by: EgorBo <[email protected]>
2020-04-07 04:25:53 +03:00
Zoltan Varga 36c1034f4b [llvm] Define a separate symbol for the aot method info for every method. Pass this symbol to the init functions instead of the method index. (#19298)
* [llvm] Define a separate symbol for the aot method info for every method. Pass this symbol to the init functions instead of the
method index.

This removes a dependency the generated code has on the method index, hopefully allowing separate compilation etc. in the future.

* Put the method flags into a separate AOT table so they can be accessed without decoding the method info structure, which is not available to the runtime for LLVM methods.

* Make the LLVM methods set the init flag themselves. This will allow the init flag to be changed to a per-method scalar later to remove
a dependency on the method index.

Also rename init_icall_wrapper to init_func, it does much more than just calling the icall.
2020-04-06 18:14:27 -04:00
Thays Grazia c5149e31b4 [wasm][debugger] Improving evaluate expression implementation (#19444)
* - Adding tests to evaluate expression
- Adding a cache to local vars and object properties
- Fixing evaluate expressions like "this.a"
- Fixing evaluate expressions like "d + d"
2020-04-05 22:57:02 -05:00
imhameed c991c1d4c4 [llvm] Enable optimizations for LLVM 9 JIT. (#19445)
Share more code between LLVM 6 and LLVM 9.

Mangler::getNameWithPrefix takes a Twine, not a std::string, so use a
StringRef to avoid an unnecessary allocation.

InstructionCombiningPass grew a dependency on
ProfileSummaryInfoWrapperPass in
https://github.com/dotnet/llvm-project/commit/09e539fcaebb6362795d352cdcf4a818cf4d0d6a,
which depends on the enclosing FunctionPassManager having a valid
reference to a module. This commit adds a dummy module to satisfy this,
instead of recreating a new FunctionPassManager on every compilation.
(See also
http://lists.llvm.org/pipermail/llvm-dev/2019-March/130690.html.)
2020-04-05 12:08:57 -07:00
514 changed files with 34158 additions and 17070 deletions

No files matched your search

+23 -23
View File
@@ -18,11 +18,11 @@
/acceptance-tests/profiler-stress* @BrzVlad @akoeplinger
/data @directhex @akoeplinger
/data/gdb @lewurm @vargaz
/data/lldb @lewurm @vargaz
/data/gdb @vargaz
/data/lldb @vargaz
/docs @marek-safar @akoeplinger
/docs/riscv.md @alexrp @lewurm
/docs/riscv.md @alexrp
/docs/sources/mono-api-profiler.html @BrzVlad
/external @akoeplinger @marek-safar
@@ -65,24 +65,24 @@
/mcs/class/System/System.Security.Cryptography.X509Certificates @baulig @steveisok
/mcs/class/System.Data* @egorbo @steveisok
/mcs/errors @marek-safar @lewurm
/mcs/ilasm @marek-safar @lewurm
/mcs/jay @marek-safar @lewurm
/mcs/mcs @marek-safar @lewurm
/mcs/tests @marek-safar @lewurm
/mcs/errors @marek-safar
/mcs/ilasm @marek-safar
/mcs/jay @marek-safar
/mcs/mcs @marek-safar
/mcs/tests @marek-safar
/mcs/tools @marek-safar @akoeplinger @steveisok
/mcs/tools/gensources @kg @akoeplinger
/mcs/tools/resx2sr @baulig
/mcs/tools/upload-to-sentry @directhex @akoeplinger
/mono/arch @vargaz @lewurm
/mono/arch @vargaz
/mono/btls @baulig @marek-safar
/mono/dis @lambdageek @vargaz
/mono/eglib @vargaz @lambdageek
/mono/benchmark @SamMonoRT @lewurm
/mono/benchmark @SamMonoRT
/mono/metadata @vargaz @lambdageek @thaystg
/mono/metadata/*profiler* @lambdageek
@@ -99,14 +99,14 @@
/mono/metadata/native-library* @vargaz @lambdageek @CoffeeFlux
/mono/metadata/*-unix* @lambdageek @CoffeeFlux
/mono/mini @vargaz @lewurm @lambdageek @SamMonoRT
/mono/mini/*cfgdump* @lewurm @vargaz
/mono/mini/*exceptions* @lewurm @vargaz @BrzVlad
/mono/mini @vargaz @lambdageek @SamMonoRT
/mono/mini/*cfgdump* @vargaz
/mono/mini/*exceptions* @vargaz @BrzVlad
/mono/mini/*ppc* @lewurm @vargaz
/mono/mini/*riscv* @alexrp @lewurm
/mono/mini/*type-check* @lewurm @lambdageek
/mono/mini/*type-check* @lambdageek
/mono/mini/*llvm* @vargaz @imhameed
/mono/mini/interp/* @lewurm @BrzVlad
/mono/mini/interp/* @BrzVlad
/mono/mini/*profiler* @BrzVlad @lambdageek
/mono/mini/debugger-agent.c @vargaz @thaystg @DavidKarlas @lambdageek
@@ -116,12 +116,12 @@
/mono/sgen @BrzVlad @lambdageek
/mono/tools/offsets-tool @lewurm @rolfbjarne
/mono/tools/offsets-tool @rolfbjarne
/mono/utils @vargaz @lewurm @lambdageek
/mono/utils/atomic* @lewurm @vargaz
/mono/utils/mono-hwcap* @lewurm @vargaz
/mono/utils/mono-mem* @lewurm @vargaz
/mono/utils @vargaz @lambdageek
/mono/utils/atomic* @vargaz
/mono/utils/mono-hwcap* @vargaz
/mono/utils/mono-mem* @vargaz
/mono/utils/mono-merp* @alexischr @lambdageek
/mono/utils/mono-state* @alexischr @lambdageek
/mono/utils/mono-threads* @lambdageek @vargaz
@@ -137,14 +137,14 @@
/runtime @akoeplinger @marek-safar
/samples @lambdageek @lewurm
/samples @lambdageek
/samples/profiler @BrzVlad @lambdageek
/samples/size @alexrp @lambdageek
/scripts @akoeplinger @directhex
/scripts/ci @akoeplinger @directhex
/sdks @marek-safar @lewurm @vargaz @lambdageek
/sdks @marek-safar @vargaz @lambdageek
/sdks/builds/android* @alexischr @jonpryor
/sdks/builds/mxe* @alexischr @jonpryor
/sdks/builds/ios* @vargaz @rolfbjarne
@@ -158,5 +158,5 @@
/tools @lambdageek @vargaz
/tools/locale-builder @marek-safar @egorbo
/tools/nuget-hash-extractor @marek-safar @radical @akoeplinger
/tools/pedump @lambdageek @lewurm
/tools/pedump @lambdageek
/tools/sgen @brzvlad @vargaz @naricc
+1 -1
View File
@@ -43,5 +43,5 @@ Please paste the stack trace here if available.
```
<!--
You can join us at https://gitter.im/mono/mono to discuss your reported issue
You can join us on Discord (https://aka.ms/dotnet-discord) in the #monovm channel to discuss your reported issue
-->
+1
View File
@@ -18,6 +18,7 @@
*.vssscc
*_i.c
*_p.c
*.mdb
*.ncb
*.suo
*.tlb
+1 -1
View File
@@ -76,7 +76,7 @@ The Licenses
These are the licenses used in Mono, the files are located:
### MIT X11 License
### MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
+7 -1
View File
@@ -5,7 +5,13 @@ standards for C# and the Common Language Runtime.
The Mono project is part of the [.NET Foundation](https://www.dotnetfoundation.org/)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mono/mono?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Join us on [Discord](https://aka.ms/dotnet-discord) in the `#monovm` channel:
<a href="https://aka.ms/dotnet-discord">
<img src="https://img.shields.io/discord/732297728826277939?style=flat-square&label=Discord&logo=discord&logoColor=white&color=7289DA">
</a>
### Contents
1. [Compilation and Installation](#compilation-and-installation)
2. [Using Mono](#using-mono)
+4 -48
View File
@@ -1,50 +1,6 @@
# Contributor Code of Conduct
# Code of Conduct
As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating
documentation, submitting pull requests or patches, and other activities.
This project has adopted the code of conduct defined by the Contributor Covenant
to clarify expected behavior in our community.
We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, religion, or nationality.
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information, such as physical or electronic
addresses, without explicit permission
* Other unethical or unprofessional conduct
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
By adopting this Code of Conduct, project maintainers commit themselves to
fairly and consistently applying these principles to every aspect of managing
this project. Project maintainers who do not follow or enforce the Code of
Conduct may be permanently removed from the project team.
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting a project maintainer at miguel@xamarin.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. Maintainers are
obligated to maintain confidentiality with regard to the reporter of an
incident.
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.3.0, available at
[http://contributor-covenant.org/version/1/3/0/][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/3/0/
For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
+169 -20
View File
@@ -139,13 +139,14 @@ platform_ios=no
host_darwin=no
host_linux=no
build_darwin=no
host_sunos=no
case "$host" in
wasm32*)
CFLAGS="$CFLAGS -D_REENTRANT -D_GNU_SOURCE -s WASM=1"
CPPFLAGS="$CPPFLAGS -D_REENTRANT -DUSE_MMAP -s WASM=1"
libgc_threads=pthreads
platform_wasm=yes
host_wasm=yes
# FIXME:
RID="osx-x64"
COREARCH="wasm32"
@@ -320,6 +321,11 @@ case "$host" in
# available during cross-compilation
mono_cv_uscore=no
fi
case "$host" in
*-musl)
AC_DEFINE(MUSL, 1, [musl libc])
;;
esac
case "$host" in
*-tizen-linux-*)
platform_tizen=yes
@@ -392,15 +398,23 @@ case "$host" in
use_sigposix=yes
;;
*-*-solaris*)
CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_MMAP -DUSE_MUNMAP -DHOST_SOLARIS"
CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_MMAP -DUSE_MUNMAP -DHOST_SOLARIS -D__EXTENSIONS__ -D_XPG4_2"
need_link_unlink=yes
libmono_cflags="-D_REENTRANT"
libgc_threads=pthreads
has_dtrace=yes
use_sigposix=yes
enable_solaris_tar_check=yes
host_sunos=yes
;;
*-*-darwin*)
# Temporary workaround for Apple Silicon
# config.guess returns arm-apple-darwin20.0.0
if test $ac_cv_host = arm-apple-darwin20.0.0 -o $ac_cv_target = arm-apple-darwin20.0.0; then
echo "You are running on Apple Silicon, but using an old config.guess, invoke configure like this:"
echo "Run configure using ./configure --host=aarch64-apple-darwin20.0.0 --target=aarch64-apple-darwin20.0.0"
exit 1
fi
parallel_mark="Disabled_Currently_Hangs_On_MacOSX"
host_darwin=yes
target_mach=yes
@@ -442,6 +456,10 @@ case "$host" in
platform_ios=yes
has_dtrace=no
;;
aarch64*-darwin20*)
# OSX/arm64
support_boehm=no
;;
aarch64*-darwin*)
platform_ios=yes
;;
@@ -577,7 +595,7 @@ AM_CONDITIONAL(HOST_SIGPOSIX, test x$use_sigposix = xyes)
AM_CONDITIONAL(HOST_ANDROID, test x$platform_android = xyes)
AM_CONDITIONAL(HOST_TIZEN, test x$platform_tizen = xyes)
AM_CONDITIONAL(HOST_IOS, test x$platform_ios = xyes)
AM_CONDITIONAL(HOST_WASM, test x$platform_wasm = xyes)
AM_CONDITIONAL(HOST_WASM, test x$host_wasm = xyes)
AM_CONDITIONAL(HOST_AIX, test x$host_aix = xyes)
if test -z "$HOST_DARWIN_TRUE"; then :
@@ -758,7 +776,7 @@ AC_CHECK_HEADERS(elf.h)
# for perf jit dump support
AC_CHECK_HEADERS(sys/mman.h)
if test "x$host_linux" = "xyes" -a x$ac_cv_header_sys_mman_h = xyes -a x$ac_cv_header_elf_h = xyes -a x$ac_cv_header_sys_syscall_h = xyes; then
AC_DEFINE(ENABLE_JIT_DUMP, 1, [Enable jit dump support on Linux])
AC_DEFINE(ENABLE_JIT_DUMP, 1, [Enable jit dump support on Linux])
fi
# for support
@@ -870,7 +888,7 @@ AC_ARG_ENABLE(visibility-hidden,
WARN=''
if test x"$GCC" = xyes; then
WARN='-Wall -Wunused -Wmissing-declarations -Wpointer-arith -Wno-cast-qual -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value -Wno-attributes'
CFLAGS="$CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs -Wno-format-zero-length"
CFLAGS="$CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs -Wno-format-zero-length -Wc++-compat"
# We require C99 with some GNU extensions, e.g. `linux` macro
CFLAGS="$CFLAGS -std=gnu99"
@@ -1107,7 +1125,10 @@ AC_ARG_WITH(csc, [ --with-csc=mcs,roslyn,default Configures the CSharp com
if test $csc_compiler = default; then
if test $endian = big; then
csc_compiler=mcs
case "$host" in
s390x*) csc_compiler=roslyn ;;
*) csc_compiler=mcs
esac
elif test $endian = little; then
case "$host" in
powerpc*) csc_compiler=mcs ;;
@@ -1198,6 +1219,7 @@ if test "x$crash_reporting" != "xyes"; then
CFLAGS="$CFLAGS -DDISABLE_CRASH_REPORTING=1"
CXXFLAGS="$CXXFLAGS -DDISABLE_CRASH_REPORTING=1"
fi
AM_CONDITIONAL(DISABLE_CRASH_REPORTING, test x$crash_reporting != xyes)
AC_ARG_ENABLE(monodroid, [ --enable-monodroid Enable runtime support for Monodroid (Xamarin.Android)], enable_monodroid=$enableval, enable_monodroid=no)
AM_CONDITIONAL(ENABLE_MONODROID, test x$enable_monodroid = xyes)
@@ -1292,6 +1314,12 @@ AC_ARG_WITH(spectre-mitigation, [ --with-spectre-mitigation=yes,no
AC_ARG_WITH(spectre-indirect-branch-choice, [ --with-spectre-indirect-branch-choice=keep,thunk,inline,extern Convert indirect branches to the specified kind of thunk (defaults to inline)], [], [with_spectre_indirect_branch_choice=inline])
AC_ARG_WITH(spectre-function-return-choice, [ --with-spectre-function-return-choice=keep,thunk,inline,extern Convert function return instructions to the specified kind of thunk (defaults to inline)], [], [with_spectre_function_return_choice=inline])
AC_ARG_WITH(static_icu, [ --with-static-icu=yes|no Integrate ICU statically into the runtime (defaults to no)],[
if test x$with_static_icu = xyes ; then
AC_DEFINE(STATIC_ICU,1,[Integrate ICU statically into the runtime.])
fi
], [with_static_icu=no])
dnl
dnl Spectre compiler mitigation flag checks
dnl
@@ -1389,7 +1417,8 @@ if test x$with_runtime_preset = xnetcore; then
mono_feature_disable_gac='yes'
mono_feature_disable_perfcounters='yes'
mono_feature_disable_attach='yes'
if test "x$enable_monodroid" = "x" -a "x$enable_monotouch" = "x"; then
mono_feature_disable_cfgdir_config='yes'
if test "x$enable_monodroid" = "xno" -a "x$enable_monotouch" = "xno"; then
mono_feature_disable_dllmap='yes' # FIXME: the mobile products use this
fi
disable_mono_native=yes
@@ -1679,6 +1708,7 @@ AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" != "xno"])
AM_CONDITIONAL(INSTALL_MONOTOUCH_WATCH, [test "x$with_monotouch_watch" != "xno"])
AM_CONDITIONAL(INSTALL_MONOTOUCH_TV, [test "x$with_monotouch_tv" != "xno"])
AM_CONDITIONAL(BITCODE, test "x$with_bitcode" = "xyes")
AM_CONDITIONAL(STATIC_ICU, test "x$with_static_icu" = "xyes")
AM_CONDITIONAL(INSTALL_XAMMAC, [test "x$with_xammac" != "xno"])
AM_CONDITIONAL(INSTALL_TESTING_AOT_FULL_INTERP, [test "x$with_testing_aot_full_interp" != "xno"])
AM_CONDITIONAL(INSTALL_TESTING_AOT_HYBRID, [test "x$with_testing_aot_hybrid" != "xno"])
@@ -1765,9 +1795,7 @@ fi
AM_CONDITIONAL(ENABLE_STATIC_GCC_LIBS, test "x$enable_static_gcc_libs" = "xyes")
AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsystems.
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug, appdomains, verifier, dllmap,
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, interpreter, simd, soft_debug, perfcounters, normalization, desktop_loader, shared_perfcounters, remoting,
security, lldb, mdb, assert_messages, config, cfgdir_config, cleanup, sgen_marksweep_conc, sgen_split_nursery, sgen_gc_bridge, sgen_debug_helpers, sockets, gac, threads, processes.],
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug, appdomains, verifier, dllmap, reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, interpreter, simd, soft_debug, perfcounters, normalization, desktop_loader, shared_perfcounters, remoting, security, lldb, mdb, assert_messages, config, cfgdir_config, cleanup, sgen_marksweep_conc, sgen_split_nursery, sgen_gc_bridge, sgen_toggleref, sgen_debug_helpers, sgen_binary_protocol, sockets, gac, threads, processes, eventpipe.],
[
for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
eval "mono_feature_disable_$feature='yes'"
@@ -1963,7 +1991,6 @@ if test "x$mono_feature_disable_sgen_marksweep_conc" = "xyes"; then
AC_MSG_NOTICE([Disabled concurrent gc support in SGEN.])
fi
if test "x$mono_feature_disable_sgen_split_nursery" = "xyes"; then
AC_DEFINE(DISABLE_SGEN_SPLIT_NURSERY, 1, [Disable minor=split support in SGEN.])
AC_MSG_NOTICE([Disabled minor=split support in SGEN.])
@@ -1974,11 +2001,21 @@ if test "x$mono_feature_disable_sgen_gc_bridge" = "xyes"; then
AC_MSG_NOTICE([Disabled gc bridge support in SGEN.])
fi
if test "x$mono_feature_disable_sgen_toggleref" = "xyes"; then
AC_DEFINE(DISABLE_SGEN_TOGGLEREF, 1, [Disable toggleref support in SGEN.])
AC_MSG_NOTICE([Disabled toggleref support in SGEN.])
fi
if test "x$mono_feature_disable_sgen_debug_helpers" = "xyes"; then
AC_DEFINE(DISABLE_SGEN_DEBUG_HELPERS, 1, [Disable debug helpers in SGEN.])
AC_MSG_NOTICE([Disabled debug helpers in SGEN.])
fi
if test "x$mono_feature_disable_sgen_binary_protocol" = "xyes"; then
AC_DEFINE(DISABLE_SGEN_BINARY_PROTOCOL, 1, [Disable binary protocol logging in SGEN.])
AC_MSG_NOTICE([Disabled binary protocol logging in SGEN.])
fi
if test "x$mono_feature_disable_sockets" = "xyes"; then
AC_DEFINE(DISABLE_SOCKETS, 1, [Disable sockets])
AC_MSG_NOTICE([Disabled sockets])
@@ -2004,6 +2041,22 @@ if test "x$mono_feature_disable_processes" = "xyes"; then
AC_MSG_NOTICE([Disabled process support])
fi
if test "x$mono_feature_disable_eventpipe" = "xyes"; then
AC_DEFINE(DISABLE_EVENTPIPE, 1, [Disable EventPipe support])
AC_MSG_NOTICE([Disabled EventPipe support])
enable_perftracing=no
fi
if test x$enable_perftracing = x -a x$with_core = xonly; then
if test -f $srcdir/mono/eventpipe/ep.h; then
enable_perftracing=yes
fi
fi
if test x$enable_perftracing = xyes; then
AC_DEFINE(ENABLE_PERFTRACING,1,[Enables support for eventpipe library])
fi
AM_CONDITIONAL(ENABLE_PERFTRACING, test x$enable_perftracing = xyes)
AC_ARG_ENABLE(executables, [ --disable-executables disable the build of the runtime executables], enable_executables=$enableval, enable_executables=yes)
AM_CONDITIONAL(DISABLE_EXECUTABLES, test x$enable_executables = xno)
@@ -2198,6 +2251,9 @@ if test x$host_win32 = xno; then
AC_CHECK_FUNC(futimes, [AC_DEFINE(HAVE_FUTIMES, 1, [futimes])])
AC_CHECK_FUNC(futimens, [AC_DEFINE(HAVE_FUTIMENS, 1, [futimens])])
AC_CHECK_TYPES([clockid_t], [AC_DEFINE(HAVE_CLOCKID_T)], [],
[#include <sys/types.h>])
dnl hires monotonic clock support
AC_SEARCH_LIBS(clock_gettime, rt)
AC_CHECK_FUNCS(clock_nanosleep)
@@ -2256,14 +2312,13 @@ if test x$host_win32 = xno; then
AC_CHECK_FUNCS(getresuid)
AC_CHECK_FUNCS(setresuid)
AC_CHECK_FUNCS(kqueue)
# IBM provides a compatibility library for i offering this function.
# IBM provides a compatibility library for offering this function.
# BSDs and others, have execinfo in base or packages.
AC_SEARCH_LIBS(backtrace_symbols, execinfo util)
# Two-step so it sets it in config.h
AC_CHECK_FUNCS(backtrace_symbols)
AC_CHECK_FUNCS(mkstemp)
AC_CHECK_FUNCS(mmap)
AC_CHECK_FUNCS(madvise)
AC_CHECK_FUNCS(getrusage)
AC_CHECK_FUNCS(getpriority)
AC_CHECK_FUNCS(setpriority)
@@ -2729,7 +2784,7 @@ if test x$host_win32 = xno; then
dnl *** Checks for libxnet ***
dnl *****************************
case "${host}" in
*solaris* )
*solaris*)
AC_MSG_CHECKING(for Solaris XPG4 support)
if test -f /usr/lib/libxnet.so; then
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
@@ -2772,7 +2827,7 @@ if test x$host_win32 = xno; then
AC_CHECK_HEADERS(pthread_np.h)
AC_CHECK_FUNCS(pthread_mutex_timedlock)
AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np pthread_getname_np pthread_setname_np pthread_cond_timedwait_relative_np)
AC_CHECK_FUNCS(pthread_kill)
AC_CHECK_FUNCS(pthread_kill pthread_jit_write_protect_np)
AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE)
AC_TRY_COMPILE([ #include <pthread.h>], [
pthread_mutexattr_t attr;
@@ -3197,7 +3252,6 @@ if test x$host_win32 = xno; then
AC_CHECK_FUNCS(remap_file_pages)
AC_CHECK_FUNCS(posix_fadvise)
AC_CHECK_FUNCS(posix_fallocate)
AC_CHECK_FUNCS(posix_madvise)
AC_CHECK_FUNCS(vsnprintf)
AC_CHECK_FUNCS(sendfile)
AC_CHECK_FUNCS(gethostid sethostid)
@@ -3903,6 +3957,19 @@ if test x$host_win32 = xno; then
AC_CHECK_DECL(IN_EXCL_UNLINK, [AC_DEFINE(HAVE_IN_EXCL_UNLINK, 1, [IN_EXCL_UNLINK])], [], [[#include <sys/inotify.h>]])
if test x$host_sunos = xyes; then
# set -Werror=strict-prototypes, to match the flags used during the compilation.
ORIG_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror=strict-prototypes"
fi
AC_CHECK_FUNCS(madvise)
AC_CHECK_FUNCS(posix_madvise)
if test x$host_sunos = xyes; then
CFLAGS="$ORIG_CFLAGS"
fi
# *** End of Mono.Native checks ***
else
AM_CONDITIONAL(ENABLE_GSS, false)
@@ -3921,6 +3988,8 @@ else
AC_CHECK_LIB(advapi32, main, LIBS="$LIBS -ladvapi32", AC_ERROR(bad mingw install?))
AC_CHECK_LIB(version, main, LIBS="$LIBS -lversion", AC_ERROR(bad mingw install?))
AC_CHECK_TYPES([struct sockaddr_in6], [AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6)], , [#include <ws2tcpip.h>])
dnl *********************************
dnl *** Check for struct ip_mreqn ***
dnl *********************************
@@ -4616,7 +4685,7 @@ case "$host" in
ACCESS_UNALIGNED="yes"
BTLS_SUPPORTED=yes
BTLS_PLATFORM=s390x
CFLAGS="$CFLAGS -mbackchain -D__USE_STRING_INLINES"
CFLAGS="$CFLAGS -mbackchain"
;;
riscv32-*)
TARGET=RISCV32
@@ -4715,6 +4784,12 @@ if test "x$host" != "x$target"; then
sizeof_register=8
AC_DEFINE(TARGET_WATCHOS, 1, [...])
;;
aarch64*darwin*)
TARGET=ARM64
# Both ios and osx/arm64 have the same aarc64-darwin triple,
# assume ios for now when cross compiling
TARGET_SYS=IOS
;;
aarch64-*)
TARGET=ARM64
;;
@@ -4927,7 +5002,7 @@ if test "x$target_mach" = "xyes"; then
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_WATCHOS"
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_WATCHOS"
BTLS_SUPPORTED=no
elif test "x$TARGET" = "xARM" -o "x$TARGET" = "xARM64" -o "x$TARGET" = "xARM6432"; then
elif test "x$TARGET_SYS" = "xIOS" -o "x$TARGET" = "xARM" -o "x$TARGET" = "xARM6432"; then
AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS])
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_IOS"
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_IOS"
@@ -4943,6 +5018,9 @@ if test "x$target_mach" = "xyes"; then
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_OSX"
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_OSX"
target_osx=yes
if test "x$TARGET" = "xARM64"; then
BTLS_SUPPORTED=no
fi
], [
AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS])
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_IOS"
@@ -6133,8 +6211,8 @@ fi
AC_SUBST(mono_runtime)
AC_SUBST(mono_runtime_wrapper)
CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csc.exe
VBCS_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/VBCSCompiler.exe
CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.7.0/csc.exe
VBCS_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.7.0/VBCSCompiler.exe
if test $csc_compiler = mcs; then
CSC=$mcs_topdir/class/lib/build/mcs.exe
@@ -6731,8 +6809,10 @@ AC_SUBST(MONO_NATIVE_PLATFORM_TYPE_UNIFIED)
#
if test "x$enable_llvm_runtime" = "xyes"; then
AC_SUBST(MONO_CXXLD, [$CXX])
AC_SUBST(MONO_LIBTOOL_TAG, '--tag=CXX')
else
AC_SUBST(MONO_CXXLD, [$CC])
AC_SUBST(MONO_LIBTOOL_TAG, '')
fi
### Set -Werror options
@@ -6765,6 +6845,18 @@ if test x"$GCC" = xyes; then
CFLAGS="$CFLAGS -Werror-implicit-function-declaration"
# jay has a lot of implicit declarations
JAY_CFLAGS="-Wno-implicit-function-declaration"
ORIG_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -Wsometimes-uninitialized -Werror"
AC_MSG_CHECKING(for -Wsometimes-uninitialized option to gcc)
AC_TRY_COMPILE([],[
], [
AC_MSG_RESULT(yes)
CFLAGS="$ORIG_CFLAGS -Werror=sometimes-uninitialized"
], [
AC_MSG_RESULT(no)
CFLAGS=$ORIG_CFLAGS
])
fi
# zlib/configure checks if this program compiles and if so
@@ -6783,6 +6875,63 @@ AC_COMPILE_IFELSE(
AC_MSG_RESULT(no)
])
# for icu shim
ICU_SHIM_PATH=.
if test x$with_core = xonly; then
if test x$cross_compiling = xno; then
AC_CHECK_FILE($srcdir/../libraries/Native/Unix/System.Globalization.Native/pal_icushim.h, [have_shim_globalization=yes], [have_shim_globalization=no])
fi
if test x$have_shim_globalization = xyes || test x$cross_compiling = xyes; then
ICU_SHIM_PATH=../../../libraries/Native/Unix/System.Globalization.Native
if test x$target_wasm = xyes && test x$with_static_icu = xyes; then
ICU_CFLAGS="-DTARGET_UNIX -DU_DISABLE_RENAMING -DHAVE_UDAT_STANDALONE_SHORTER_WEEKDAYS -DHAVE_SET_MAX_VARIABLE"
have_sys_icu=yes
elif test x$target_osx = xyes; then
ORIG_CPPFLAGS=$CPPFLAGS
# adding icu path to pkg_config_path
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig
export PKG_CONFIG_PATH
CPPFLAGS="`pkg-config --cflags-only-I icu-uc`"
AC_CHECK_LIB(icucore, ucol_open, LIBS=$LIBS,
[AC_MSG_ERROR([Cannot find libicucore, skipping build for System.Globalization.Native. .NET globalization is not expected to function.])])
AC_CHECK_HEADER(unicode/utypes.h, [have_sys_icu=yes], [have_sys_icu=no])
if test x$have_sys_icu = xyes; then
ICU_CFLAGS="$CPPFLAGS -DPALEXPORT="" -DOSX_ICU_LIBRARY_PATH=AS_ESCAPE(\"/usr/lib/libicucore.dylib\", '\"') -DTARGET_UNIX -DU_DISABLE_RENAMING -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option -Wno-deprecated-declarations"
fi
CPPFLAGS=$ORIG_CPPFLAGS
elif test x$platform_android = xyes; then
ICU_CFLAGS="-DPALEXPORT="" -DHAVE_UDAT_STANDALONE_SHORTER_WEEKDAYS -DHAVE_SET_MAX_VARIABLE -DTARGET_UNIX -DTARGET_ANDROID -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option"
have_sys_icu=yes
elif test x$host_linux = xyes; then
AC_CHECK_LIB(icuuc, main, LIBS=$LIBS,
[AC_MSG_ERROR([Cannot find libicuuc, try installing libicu-dev (or the appropriate package for your platform).])])
AC_CHECK_LIB(icui18n, main, LIBS=$LIBS,
[AC_MSG_ERROR([Cannot find libicui18n, try installing libicu-dev (or the appropriate package for your platform).])])
AC_CHECK_HEADER(unicode/utypes.h, [have_sys_icu=yes], [have_sys_icu=no])
if test x$have_sys_icu = xyes; then
ICU_CFLAGS="-DPALEXPORT="" -DTARGET_UNIX -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option"
fi
elif test x$host_sunos = xyes; then
ICU_CFLAGS="-DPALEXPORT="" -DTARGET_UNIX -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option"
have_sys_icu=yes
elif test x$host_wasm = xyes; then
ICU_CFLAGS="-DPALEXPORT="" -DTARGET_UNIX -Wno-reserved-id-macro -Wno-documentation -Wno-documentation-unknown-command -Wno-switch-enum -Wno-covered-switch-default -Wno-covered-switch-default -Wno-extra-semi-stmt -Wno-unknown-warning-option"
have_sys_icu=yes
else
GLOBALIZATION_SHIM_DEFINES="-DNO_GLOBALIZATION_SHIM"
fi
AC_SUBST(ICU_CFLAGS)
else
GLOBALIZATION_SHIM_DEFINES="-DNO_GLOBALIZATION_SHIM"
fi
else
GLOBALIZATION_SHIM_DEFINES="-DNO_GLOBALIZATION_SHIM"
fi
AC_SUBST(GLOBALIZATION_SHIM_DEFINES)
AC_SUBST(ICU_SHIM_PATH)
AM_CONDITIONAL(HAVE_SYS_ICU, test x$have_sys_icu = xyes)
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
+1 -1
View File
@@ -22,7 +22,7 @@ Layout
as well as the upcoming Monodoc tools and index creation
tools).
The files can contain any ammount of extra information.
The files can contain any amount of extra information.
The documentation from the source code is then merged with
these files and the header/footer information to produce
+4 -4
View File
@@ -15,13 +15,13 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20171.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20201.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7dbc907fa03eacf4c57f827cb4235d77b7ed4fcd</Sha>
<Sha>bce0a98620c1c5a110b2bba9912f3d5929069c6b</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.20171.1">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.20201.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>7dbc907fa03eacf4c57f827cb4235d77b7ed4fcd</Sha>
<Sha>bce0a98620c1c5a110b2bba9912f3d5929069c6b</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
+56 -23
View File
@@ -2,15 +2,16 @@
usage()
{
echo "Usage: $0 [BuildArch] [LinuxCodeName] [lldbx.y] [--skipunmount] --rootfsdir <directory>]"
echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [--skipunmount] --rootfsdir <directory>]"
echo "BuildArch can be: arm(default), armel, arm64, x86"
echo "LinuxCodeName - optional, Code name for Linux, can be: trusty, xenial(default), zesty, bionic, alpine. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine"
echo "CodeName - optional, Code name for Linux, can be: trusty, xenial(default), zesty, bionic, alpine. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
echo " for FreeBSD can be: freebsd11 or freebsd12."
echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FReeBSD"
echo "--skipunmount - optional, will skip the unmount of rootfs folder."
exit 1
}
__LinuxCodeName=xenial
__CodeName=xenial
__CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
__InitialDir=$PWD
__BuildArch=arm
@@ -53,6 +54,15 @@ __AlpinePackages+=" krb5-dev"
__AlpinePackages+=" openssl-dev"
__AlpinePackages+=" zlib-dev"
__FreeBSDBase="12.1-RELEASE"
__FreeBSDPkg="1.10.5"
__FreeBSDPackages="libunwind"
__FreeBSDPackages+=" icu"
__FreeBSDPackages+=" libinotify"
__FreeBSDPackages+=" lttng-ust"
__FreeBSDPackages+=" llvm-90"
__FreeBSDPackages+=" krb5"
__UnprocessedBuildArgs=
while :; do
if [ $# -le 0 ]; then
@@ -81,7 +91,7 @@ while :; do
__BuildArch=armel
__UbuntuArch=armel
__UbuntuRepo="http://ftp.debian.org/debian/"
__LinuxCodeName=jessie
__CodeName=jessie
;;
x86)
__BuildArch=x86
@@ -110,36 +120,36 @@ while :; do
unset __LLDB_Package
;;
trusty) # Ubuntu 14.04
if [ "$__LinuxCodeName" != "jessie" ]; then
__LinuxCodeName=trusty
if [ "$__CodeName" != "jessie" ]; then
__CodeName=trusty
fi
;;
xenial) # Ubuntu 16.04
if [ "$__LinuxCodeName" != "jessie" ]; then
__LinuxCodeName=xenial
if [ "$__CodeName" != "jessie" ]; then
__CodeName=xenial
fi
;;
zesty) # Ubuntu 17.04
if [ "$__LinuxCodeName" != "jessie" ]; then
__LinuxCodeName=zesty
if [ "$__CodeName" != "jessie" ]; then
__CodeName=zesty
fi
;;
bionic) # Ubuntu 18.04
if [ "$__LinuxCodeName" != "jessie" ]; then
__LinuxCodeName=bionic
if [ "$__CodeName" != "jessie" ]; then
__CodeName=bionic
fi
;;
jessie) # Debian 8
__LinuxCodeName=jessie
__CodeName=jessie
__UbuntuRepo="http://ftp.debian.org/debian/"
;;
stretch) # Debian 9
__LinuxCodeName=stretch
__CodeName=stretch
__UbuntuRepo="http://ftp.debian.org/debian/"
__LLDB_Package="liblldb-6.0-dev"
;;
buster) # Debian 10
__LinuxCodeName=buster
__CodeName=buster
__UbuntuRepo="http://ftp.debian.org/debian/"
__LLDB_Package="liblldb-6.0-dev"
;;
@@ -149,14 +159,22 @@ while :; do
usage;
exit 1;
fi
__LinuxCodeName=
__CodeName=
__UbuntuRepo=
__Tizen=tizen
;;
alpine)
__LinuxCodeName=alpine
__CodeName=alpine
__UbuntuRepo=
;;
freebsd11)
__FreeBSDBase="11.3-RELEASE"
;&
freebsd12)
__CodeName=freebsd
__BuildArch=x64
__SkipUnmount=1
;;
--skipunmount)
__SkipUnmount=1
;;
@@ -192,7 +210,7 @@ if [ -d "$__RootfsDir" ]; then
rm -rf $__RootfsDir
fi
if [[ "$__LinuxCodeName" == "alpine" ]]; then
if [[ "$__CodeName" == "alpine" ]]; then
__ApkToolsVersion=2.9.1
__AlpineVersion=3.9
__ApkToolsDir=$(mktemp -d)
@@ -218,9 +236,24 @@ if [[ "$__LinuxCodeName" == "alpine" ]]; then
add $__AlpinePackagesEdgeTesting
rm -r $__ApkToolsDir
elif [[ -n $__LinuxCodeName ]]; then
qemu-debootstrap --arch $__UbuntuArch $__LinuxCodeName $__RootfsDir $__UbuntuRepo
cp $__CrossDir/$__BuildArch/sources.list.$__LinuxCodeName $__RootfsDir/etc/apt/sources.list
elif [[ "$__CodeName" == "freebsd" ]]; then
mkdir -p $__RootfsDir/usr/local/etc
wget -O - https://download.freebsd.org/ftp/releases/amd64/${__FreeBSDBase}/base.txz | tar -C $__RootfsDir -Jxf - ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc ./bin/freebsd-version
# For now, ask for 11 ABI even on 12. This can be revisited later.
echo "ABI = \"FreeBSD:11:amd64\"; FINGERPRINTS = \"${__RootfsDir}/usr/share/keys\"; REPOS_DIR = [\"${__RootfsDir}/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > ${__RootfsDir}/usr/local/etc/pkg.conf
echo "FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly", mirror_type: \"srv\", signature_type: \"fingerprints\", fingerprints: \"${__RootfsDir}/usr/share/keys/pkg\", enabled: yes }" > ${__RootfsDir}/etc/pkg/FreeBSD.conf
mkdir -p $__RootfsDir/tmp
# get and build package manager
wget -O - https://github.com/freebsd/pkg/archive/${__FreeBSDPkg}.tar.gz | tar -C $__RootfsDir/tmp -zxf -
cd $__RootfsDir/tmp/pkg-${__FreeBSDPkg}
./autogen.sh && ./configure --prefix=$__RootfsDir/host && make install
rm -rf $__RootfsDir/tmp/pkg-${__FreeBSDPkg}
# install packages we need.
$__RootfsDir/host/sbin/pkg -r $__RootfsDir -C $__RootfsDir/usr/local/etc/pkg.conf update
$__RootfsDir/host/sbin/pkg -r $__RootfsDir -C $__RootfsDir/usr/local/etc/pkg.conf install --yes $__FreeBSDPackages
elif [[ -n $__CodeName ]]; then
qemu-debootstrap --arch $__UbuntuArch $__CodeName $__RootfsDir $__UbuntuRepo
cp $__CrossDir/$__BuildArch/sources.list.$__CodeName $__RootfsDir/etc/apt/sources.list
chroot $__RootfsDir apt-get update
chroot $__RootfsDir apt-get -f -y install
chroot $__RootfsDir apt-get -y install $__UbuntuPackages
@@ -230,7 +263,7 @@ elif [[ -n $__LinuxCodeName ]]; then
umount $__RootfsDir/*
fi
if [[ "$__BuildArch" == "arm" && "$__LinuxCodeName" == "trusty" ]]; then
if [[ "$__BuildArch" == "arm" && "$__CodeName" == "trusty" ]]; then
pushd $__RootfsDir
patch -p1 < $__CrossDir/$__BuildArch/trusty.patch
patch -p1 < $__CrossDir/$__BuildArch/trusty-lttng-2.4.patch
+14 -1
View File
@@ -1,7 +1,11 @@
set(CROSS_ROOTFS $ENV{ROOTFS_DIR})
set(TARGET_ARCH_NAME $ENV{TARGET_BUILD_ARCH})
set(CMAKE_SYSTEM_NAME Linux)
if(EXISTS ${CROSS_ROOTFS}/bin/freebsd-version)
set(CMAKE_SYSTEM_NAME FreeBSD)
else()
set(CMAKE_SYSTEM_NAME Linux)
endif()
set(CMAKE_SYSTEM_VERSION 1)
if(TARGET_ARCH_NAME STREQUAL "armel")
@@ -27,6 +31,9 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64")
elseif(TARGET_ARCH_NAME STREQUAL "x86")
set(CMAKE_SYSTEM_PROCESSOR i686)
set(TOOLCHAIN "i686-linux-gnu")
elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
set(triple "x86_64-unknown-freebsd11")
else()
message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only armel, arm, arm64 and x86 are supported!")
endif()
@@ -60,6 +67,12 @@ if("$ENV{__DistroRid}" MATCHES "android.*")
# include official NDK toolchain script
include(${CROSS_ROOTFS}/../build/cmake/android.toolchain.cmake)
elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
# we cross-compile by instructing clang
set(CMAKE_C_COMPILER_TARGET ${triple})
set(CMAKE_CXX_COMPILER_TARGET ${triple})
set(CMAKE_ASM_COMPILER_TARGET ${triple})
set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
else()
set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
@@ -53,6 +53,13 @@ if ($Internal) {
$CommonSetupArguments="--channel master --queue $Queue --build-number $BuildNumber --build-configs $Configurations --architecture $Architecture"
$SetupArguments = "--repository https://github.com/$Repository --branch $Branch --get-perf-hash --commit-sha $CommitSha $CommonSetupArguments"
#This grabs the LKG version number of dotnet and passes it to our scripts
$VersionJSON = Get-Content global.json | ConvertFrom-Json
$DotNetVersion = $VersionJSON.tools.dotnet
$SetupArguments = "--dotnet-versions $DotNetVersion $SetupArguments"
if ($RunFromPerformanceRepo) {
$SetupArguments = "--perf-hash $CommitSha $CommonSetupArguments"
@@ -167,6 +167,13 @@ fi
common_setup_arguments="--channel master --queue $queue --build-number $build_number --build-configs $configurations --architecture $architecture"
setup_arguments="--repository https://github.com/$repository --branch $branch --get-perf-hash --commit-sha $commit_sha $common_setup_arguments"
# Get the tools section from the global.json.
# This grabs the LKG version number of dotnet and passes it to our scripts
dotnet_version=`cat global.json | python3 -c 'import json,sys;obj=json.load(sys.stdin);print(obj["tools"]["dotnet"])'`
setup_arguments="--dotnet-versions $dotnet_version $setup_arguments"
if [[ "$run_from_perf_repo" = true ]]; then
payload_directory=
workitem_directory=$source_directory
+3 -3
View File
@@ -67,12 +67,12 @@ function Write-PipelineTaskError {
}
if(($Type -ne 'error') -and ($Type -ne 'warning')) {
Write-Host $Message
return
Write-Host $Message
return
}
$PSBoundParameters.Remove('Force') | Out-Null
if(-not $PSBoundParameters.ContainsKey('Type')) {
$PSBoundParameters.Add('Type', 'error')
$PSBoundParameters.Add('Type', 'error')
}
Write-LogIssue @PSBoundParameters
}
+4
View File
@@ -33,6 +33,10 @@ try {
$disableConfigureToolsetImport = $true
$LASTEXITCODE = 0
# `tools.ps1` checks $ci to perform some actions. Since the SDL
# scripts don't necessarily execute in the same agent that run the
# build.ps1/sh script this variable isn't automatically set.
$ci = $true
. $PSScriptRoot\..\tools.ps1
#Replace repo names to the format of org/repo
+4 -4
View File
@@ -6,10 +6,6 @@ param(
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version 2.0
# `tools.ps1` checks $ci to perform some actions. Since the post-build
# scripts don't necessarily execute in the same agent that run the
# build.ps1/sh script this variable isn't automatically set.
$ci = $true
$disableConfigureToolsetImport = $true
function ExtractArtifacts {
@@ -29,6 +25,10 @@ function ExtractArtifacts {
}
try {
# `tools.ps1` checks $ci to perform some actions. Since the SDL
# scripts don't necessarily execute in the same agent that run the
# build.ps1/sh script this variable isn't automatically set.
$ci = $true
. $PSScriptRoot\..\tools.ps1
$ExtractPackage = {
+5 -1
View File
@@ -12,6 +12,10 @@ Set-StrictMode -Version 2.0
$disableConfigureToolsetImport = $true
$LASTEXITCODE = 0
# `tools.ps1` checks $ci to perform some actions. Since the SDL
# scripts don't necessarily execute in the same agent that run the
# build.ps1/sh script this variable isn't automatically set.
$ci = $true
. $PSScriptRoot\..\tools.ps1
# Don't display the console progress UI - it's a huge perf hit
@@ -58,6 +62,6 @@ try {
}
catch {
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'Sdl' -Message $_
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
ExitWithExitCode 1
}
+5 -1
View File
@@ -12,6 +12,10 @@ $disableConfigureToolsetImport = $true
$LASTEXITCODE = 0
try {
# `tools.ps1` checks $ci to perform some actions. Since the SDL
# scripts don't necessarily execute in the same agent that run the
# build.ps1/sh script this variable isn't automatically set.
$ci = $true
. $PSScriptRoot\..\tools.ps1
# We create the temp directory where we'll store the sdl-config repository
@@ -62,4 +66,4 @@ catch {
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'Sdl' -Message $_
ExitWithExitCode 1
}
}
+6 -2
View File
@@ -16,6 +16,10 @@ $disableConfigureToolsetImport = $true
$LASTEXITCODE = 0
try {
# `tools.ps1` checks $ci to perform some actions. Since the SDL
# scripts don't necessarily execute in the same agent that run the
# build.ps1/sh script this variable isn't automatically set.
$ci = $true
. $PSScriptRoot\..\tools.ps1
# We store config files in the r directory of .gdn
@@ -64,6 +68,6 @@ try {
}
catch {
Write-Host $_.ScriptStackTrace
Write-PipelineTelemetryError -Category 'Sdl' -Message $_
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
ExitWithExitCode 1
}
}
+4
View File
@@ -24,6 +24,8 @@ parameters:
enablePublishBuildAssets: false
enablePublishTestResults: false
enablePublishUsingPipelines: false
mergeTestResults: false
testRunTitle: $(AgentOsName)-$(BuildConfiguration)-xunit
name: ''
preSteps: []
runAsPublic: false
@@ -194,6 +196,8 @@ jobs:
testResultsFormat: 'xUnit'
testResultsFiles: '*.xml'
searchFolder: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
testRunTitle: ${{ parameters.testRunTitle }}
mergeTestResults: ${{ parameters.mergeTestResults }}
continueOnError: true
condition: always()
@@ -9,8 +9,8 @@ variables:
- name: PublicDevRelease_31_Channel_Id
value: 128
# .NET Core 5 Dev
- name: NetCore_5_Dev_Channel_Id
# .NET 5 Dev
- name: Net_5_Dev_Channel_Id
value: 131
# .NET Eng - Validation
@@ -96,4 +96,4 @@ variables:
- name: skipComponentGovernanceDetection
value: true
- name: runCodesignValidationInjection
value: false
value: false
+47 -19
View File
@@ -27,7 +27,7 @@ parameters:
# needs to be updated with the new channel ID
NetEngLatestChannelId: 2
NetEngValidationChannelId: 9
NetCoreDev5ChannelId: 131
NetDev5ChannelId: 131
GeneralTestingChannelId: 529
NETCoreToolingDevChannelId: 548
NETCoreToolingReleaseChannelId: 549
@@ -35,8 +35,10 @@ parameters:
NETCoreExperimentalChannelId: 562
NetEngServicesIntChannelId: 678
NetEngServicesProdChannelId: 679
Net5Preview1ChannelId: 737
Net5Preview2ChannelId: 738
Net5Preview3ChannelId: 739
NetCoreSDK313xxChannelId: 759
NetCoreSDK313xxInternalChannelId: 760
stages:
- stage: Validate
@@ -63,7 +65,7 @@ stages:
inputs:
filePath: $(Build.SourcesDirectory)/eng/common/post-build/check-channel-consistency.ps1
arguments: -PromoteToChannels "$(InitialChannels)[$(PromoteToMaestroChannelId)]"
-AvailableChannelIds ${{parameters.NetEngLatestChannelId}},${{parameters.NetEngValidationChannelId}},${{parameters.NetCoreDev5ChannelId}},${{parameters.GeneralTestingChannelId}},${{parameters.NETCoreToolingDevChannelId}},${{parameters.NETCoreToolingReleaseChannelId}},${{parameters.NETInternalToolingChannelId}},${{parameters.NETCoreExperimentalChannelId}},${{parameters.NetEngServicesIntChannelId}},${{parameters.NetEngServicesProdChannelId}},${{parameters.Net5Preview1ChannelId}},${{parameters.Net5Preview2ChannelId}}
-AvailableChannelIds ${{parameters.NetEngLatestChannelId}},${{parameters.NetEngValidationChannelId}},${{parameters.NetDev5ChannelId}},${{parameters.GeneralTestingChannelId}},${{parameters.NETCoreToolingDevChannelId}},${{parameters.NETCoreToolingReleaseChannelId}},${{parameters.NETInternalToolingChannelId}},${{parameters.NETCoreExperimentalChannelId}},${{parameters.NetEngServicesIntChannelId}},${{parameters.NetEngServicesProdChannelId}},${{parameters.Net5Preview2ChannelId}},${{parameters.Net5Preview3ChannelId}},${{parameters.NetCoreSDK313xxChannelId}},${{parameters.NetCoreSDK313xxInternalChannelId}}
- job:
displayName: NuGet Validation
@@ -198,23 +200,9 @@ stages:
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'NetCore_Dev5_Publish'
channelName: '.NET Core 5 Dev'
channelName: '.NET 5 Dev'
akaMSChannelName: 'net5/dev'
channelId: ${{ parameters.NetCoreDev5ChannelId }}
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'Net5_Preview1_Publish'
channelName: '.NET 5 Preview 1'
akaMSChannelName: 'net5/preview1'
channelId: ${{ parameters.Net5Preview1ChannelId }}
channelId: ${{ parameters.NetDev5ChannelId }}
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json'
@@ -233,6 +221,20 @@ stages:
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'Net5_Preview3_Publish'
channelName: '.NET 5 Preview 3'
akaMSChannelName: 'net5/preview3'
channelId: ${{ parameters.Net5Preview3ChannelId }}
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
@@ -352,3 +354,29 @@ stages:
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'NETCore_SDK_313xx_Publishing'
channelName: '.NET Core SDK 3.1.3xx'
channelId: ${{ parameters.NetCoreSDK313xxChannelId }}
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
parameters:
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
dependsOn: ${{ parameters.publishDependsOn }}
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
stageName: 'NETCore_SDK_313xx_Internal_Publishing'
channelName: '.NET Core SDK 3.1.3xx Internal'
channelId: ${{ parameters.NetCoreSDK313xxInternalChannelId }}
transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json'
+2 -2
View File
@@ -77,7 +77,7 @@ function ResolvePath {
function ReadGlobalVersion {
local key=$1
local line=`grep -m 1 "$key" "$global_json_file"`
local line=$(awk "/$key/ {print; exit}" "$global_json_file")
local pattern="\"$key\" *: *\"(.*)\""
if [[ ! $line =~ $pattern ]]; then
@@ -438,7 +438,7 @@ temp_dir="$artifacts_dir/tmp/$configuration"
global_json_file="$repo_root/global.json"
# determine if global.json contains a "runtimes" entry
global_json_has_runtimes=false
dotnetlocal_key=`grep -m 1 "runtimes" "$global_json_file"` || true
dotnetlocal_key=$(awk "/runtimes/ {print; exit}" "$global_json_file") || true
if [[ -n "$dotnetlocal_key" ]]; then
global_json_has_runtimes=true
fi
+1 -1
+1 -1
+1 -1
+2 -2
View File
@@ -3,7 +3,7 @@
"dotnet": "5.0.100-alpha1-015772"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20171.1",
"Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20171.1"
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20201.2",
"Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20201.2"
}
}
+3 -1
View File
@@ -9,6 +9,8 @@ LLVM_VERSION := $(shell git -C "$(abs_top_srcdir)/external/llvm-project/llvm" re
# FIXME: URL should be http://xamjenkinsartifact.blob.core.windows.net/build-package-osx-llvm-$(LLVM_BRANCH)/llvm-osx64-$(LLVM_VERSION).tar.gz
LLVM_DOWNLOAD_LOCATION = "http://xamjenkinsartifact.blob.core.windows.net/build-package-osx-llvm-release60/llvm-osx64-$(LLVM_VERSION).tar.gz"
CPU_COUNT := $(shell getconf _NPROCESSORS_ONLN || echo 8)
CMAKE := $(or $(CMAKE),$(shell which cmake))
NINJA := $(shell which ninja)
@@ -43,7 +45,7 @@ configure-llvm: $(LLVM_BUILD)/$(if $(NINJA),build.ninja,Makefile)
.PHONY: build-llvm
build-llvm: configure-llvm
DESTDIR="" $(if $(NINJA),$(NINJA),$(MAKE) -j) -C $(LLVM_BUILD)
DESTDIR="" $(if $(NINJA),$(NINJA),$(MAKE) -j$(CPU_COUNT)) -C $(LLVM_BUILD)
.PHONY: install-llvm
install-llvm: build-llvm
+1
View File
@@ -16,6 +16,7 @@ AC_DEFUN([AC_MONO_OUTPUT], [
llvm/Makefile
mono/Makefile
mono/btls/Makefile
mono/culture/Makefile
mono/native/Makefile
mono/utils/Makefile
mono/metadata/Makefile
+2 -3
View File
@@ -430,10 +430,9 @@ namespace I18N.CJK
}
#else
public override int GetByteCount(char[] chars, int index, int count, bool refresh)
public override int GetByteCount(char[] chars, int start, int count, bool refresh)
{
int start = 0;
int end = count;
int end = start + count;
int ret = 0;
while (start < end)
{
@@ -92,6 +92,14 @@ namespace Mono.Debugger.Soft
vm.conn.Array_SetValues (id, index, vm.EncodeValues (values));
}
public void SetByteValues (byte [] bytes)
{
if (bytes != null && bytes.Length != Length) {
throw new IndexOutOfRangeException ();
}
vm.conn.ByteArray_SetValues (id, bytes);
}
IEnumerator IEnumerable.GetEnumerator ()
{
return new SimpleEnumerator (this);
@@ -216,7 +216,7 @@ namespace Mono.Debugger.Soft
public bool IsEnum; // For ElementType.ValueType
public long Id; /* For VALUE_TYPE_ID_TYPE */
public int Index; /* For VALUE_TYPE_PARENT_VTYPE */
public int FixedSize;
public int FixedSize;
}
class ModuleInfo {
@@ -315,7 +315,6 @@ namespace Mono.Debugger.Soft
}
}
class AssemblyModifier : Modifier {
public long[] Assemblies {
get; set;
@@ -409,6 +408,7 @@ namespace Mono.Debugger.Soft
public ErrorCode ErrorCode {
get; set;
}
public string ErrorMessage {
get; set;
}
@@ -807,6 +807,10 @@ namespace Mono.Debugger.Soft
get; set;
}
public string ErrorMsg {
get; internal set;
}
public int Command {
get; set;
}
@@ -815,10 +819,6 @@ namespace Mono.Debugger.Soft
get; set;
}
public string ErrorMsg {
get; internal set;
}
public int Offset {
get {
return offset;
@@ -873,6 +873,7 @@ namespace Mono.Debugger.Soft
public ValueImpl ReadValue () {
ElementType etype = (ElementType)ReadByte ();
switch (etype) {
case ElementType.Void:
return new ValueImpl { Type = etype };
@@ -1322,7 +1323,7 @@ namespace Mono.Debugger.Soft
}
}
}
protected abstract int TransportReceive (byte[] buf, int buf_offset, int len);
protected abstract int TransportSend (byte[] buf, int buf_offset, int len);
protected abstract void TransportSetTimeouts (int send_timeout, int receive_timeout);
@@ -2753,6 +2754,21 @@ namespace Mono.Debugger.Soft
SendReceive (CommandSet.ARRAY_REF, (int)CmdArrayRef.SET_VALUES, new PacketWriter ().WriteId (id).WriteInt (index).WriteInt (values.Length).WriteValues (values));
}
// This is a special case when setting values of an array that
// consists of a large number of bytes. This saves much time and
// cost than we create ValueImpl object for each byte.
internal void ByteArray_SetValues (long id, byte [] bytes)
{
int index = 0;
var typ = (byte)ElementType.U1;
var w = new PacketWriter ().WriteId (id).WriteInt (index).WriteInt (bytes.Length);
for (int i = 0; i < bytes.Length; i++) {
w.WriteByte (typ);
w.WriteInt (bytes [i]);
}
SendReceive (CommandSet.ARRAY_REF, (int)CmdArrayRef.SET_VALUES, w);
}
/*
* STRINGS
*/
@@ -70,9 +70,10 @@ namespace Mono.Debugger.Soft
sb.Append(Name);
sb.Append(" ");
sb.Append("(");
for (var i = 0; i < param_info.Length; i++) {
sb.Append(param_info[i].ParameterType.Name);
if (i != param_info.Length - 1)
var parameters = GetParameters ();
for (var i = 0; i < parameters.Length; i++) {
sb.Append(parameters[i].ParameterType.Name);
if (i != parameters.Length - 1)
sb.Append(", ");
}
sb.Append(")");
@@ -70,5 +70,5 @@ namespace Mono.Debugger.Soft
return info.SourceLink;
}
}
}
}
}
@@ -39,6 +39,8 @@ namespace Mono.Debugger.Soft
if (vm.Version.AtLeast (2, 38)) {
try {
domain = vm.GetDomain (vm.conn.StackFrame_GetDomain (thread.Id, Id));
} catch (InvalidStackFrameException) {
domain = Thread.Domain;
} catch (AbsentInformationException) {
domain = Thread.Domain;
}
@@ -471,6 +471,14 @@ public class Tests : TestsBase, ITest2
#pragma warning restore 0414
public string BreakInField
{
get {
Debugger.Break ();
return "Foo";
}
}
public class NestedClass {
}
+18 -1
View File
@@ -1806,7 +1806,7 @@ public class DebuggerTests
t = frame.Method.GetParameters ()[7].ParameterType;
var props = t.GetProperties ();
Assert.AreEqual (3, props.Length);
Assert.AreEqual (4, props.Length);
foreach (PropertyInfoMirror prop in props) {
ParameterInfoMirror[] indexes = prop.GetIndexParameters ();
@@ -4953,6 +4953,23 @@ public class DebuggerTests
Assert.IsTrue ((e as StepEvent).Method.Name == "op_Equality" || (e as StepEvent).Method.Name == "if_property_stepping");
}
[Test]
public void DebuggerBreakInFieldDoesNotHang () {
vm.EnableEvents (EventType.UserBreak);
Event e = run_until ("o1");
StackFrame frame = e.Thread.GetFrames () [0];
object val = frame.GetThis ();
Assert.IsTrue (val is ObjectMirror);
Assert.AreEqual ("Tests", (val as ObjectMirror).Type.Name);
ObjectMirror o = (val as ObjectMirror);
TypeMirror t = o.Type;
MethodMirror m = t.GetProperty ("BreakInField").GetGetMethod();
Value v = o.InvokeMethod (e.Thread, m, null, InvokeOptions.DisableBreakpoints);
AssertValue ("Foo", v);
}
#if !MONODROID_TOOLS
void HandleEvents () {
@@ -184,9 +184,7 @@
</When>
<When Condition="'$(Platform)' == 'wasm'">
<ItemGroup>
<Compile Include="..\..\..\external\corefx\src\System.IO.Compression.Brotli\src\Interop\Interop.Brotli.Decoder.cs" />
<Compile Include="..\..\..\external\corefx\src\System.IO.Compression.Brotli\src\Interop\Interop.Brotli.Encoder.cs" />
<Compile Include="corefx\Interop.Libraries.cs" />
<Compile Include="corefx\BrotliStubs.cs" />
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'unreal'">
@@ -0,0 +1,3 @@
corefx/Interop.Libraries.cs
../../../external/corefx/src/System.IO.Compression.Brotli/src/Interop/Interop.Brotli.Decoder.cs
../../../external/corefx/src/System.IO.Compression.Brotli/src/Interop/Interop.Brotli.Encoder.cs
@@ -0,0 +1,5 @@
#include System.IO.Compression.dll.sources
corefx/BrotliStubs.cs
# for clrcompression.dll (instead of BrotliStubs for Windows)
#../../../external/corefx/src/Common/src/Interop/Windows/Interop.Libraries.cs
+1 -1
View File
@@ -38,7 +38,7 @@ LIB_MCS_FLAGS += -d:XAMARIN_MODERN
endif
ifeq (wasm,$(PROFILE))
API_BIN_REFS := WebAssembly.Net.Http
API_BIN_REFS := System.Net.Http.WebAssemblyHttpHandler
endif
TEST_LIB_REFS = System System.Core
@@ -1407,9 +1407,9 @@
</Reference>
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'wasm' ">
<Reference Include="./../../../external/binary-reference-assemblies/build/monowasm/WebAssembly.Net.Http.dll">
<Reference Include="./../../../external/binary-reference-assemblies/build/monowasm/System.Net.Http.WebAssemblyHttpHandler.dll">
<SpecificVersion>False</SpecificVersion>
<HintPath>./../../../external/binary-reference-assemblies/build/monowasm/WebAssembly.Net.Http.dll</HintPath>
<HintPath>./../../../external/binary-reference-assemblies/build/monowasm/System.Net.Http.WebAssemblyHttpHandler.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
@@ -2,6 +2,6 @@ namespace System.Net.Http
{
public partial class HttpClient
{
static HttpMessageHandler CreateDefaultHandler () => new WebAssembly.Net.Http.HttpClient.WasmHttpMessageHandler ();
static HttpMessageHandler CreateDefaultHandler () => new System.Net.Http.WebAssemblyHttpHandler ();
}
}
@@ -13,11 +13,11 @@ namespace System.Net.Http
{
public class HttpClientHandler : HttpMessageHandler
{
WebAssembly.Net.Http.HttpClient.WasmHttpMessageHandler wasmHandler;
System.Net.Http.WebAssemblyHttpHandler wasmHandler;
public HttpClientHandler ()
{
wasmHandler = new WebAssembly.Net.Http.HttpClient.WasmHttpMessageHandler ();
wasmHandler = new System.Net.Http.WebAssemblyHttpHandler ();
}
protected override void Dispose (bool disposing)
@@ -21,7 +21,7 @@ namespace System.Runtime.Serialization
public static void SetSerializationSurrogateProvider(this DataContractSerializer serializer, ISerializationSurrogateProvider provider)
{
// allocate every time, expectation is that this won't happen enough to warrant maintaining a CondtionalWeakTable.
IDataContractSurrogate adapter = new SurrogateProviderAdapter(provider);
IDataContractSurrogate adapter = (provider != null) ? new SurrogateProviderAdapter(provider) : null;
// DCS doesn't expose a setter, access the field directly as a workaround
typeof(DataContractSerializer)
@@ -423,8 +423,10 @@ namespace System.Runtime.Serialization.Json
XmlDictionaryString namespaceLocal = null;
if (nameLocal != null && nameLocal is string)
writer.WriteStartElement ((string) name, null);
else
else if (name is XmlDictionaryString)
writer.WriteStartElement ((XmlDictionaryString) name, null);
else
writer.WriteStartElement (name.ToString(), null);
}
void WriteEndElement ()
@@ -23,6 +23,8 @@ namespace System.Transactions
[ThreadStatic]
static Transaction ambient;
Transaction internalTransaction;
IsolationLevel level;
TransactionInformation info;
@@ -83,6 +85,8 @@ namespace System.Transactions
volatiles = other.Volatiles;
durables = other.Durables;
pspe = other.Pspe;
TransactionCompletedInternal = other.TransactionCompletedInternal;
internalTransaction = other;
}
[MonoTODO]
@@ -92,7 +96,29 @@ namespace System.Transactions
throw new NotImplementedException ();
}
public event TransactionCompletedEventHandler TransactionCompleted;
internal event TransactionCompletedEventHandler TransactionCompletedInternal;
// Transaction B was cloned from transaction A. Add event handlers to A
// when they are added to B. This will not work when new handlers are added to A
// as A has no reference to B.
public event TransactionCompletedEventHandler TransactionCompleted
{
add
{
if (this.internalTransaction != null)
this.internalTransaction.TransactionCompleted += value;
TransactionCompletedInternal += value;
}
remove
{
if (this.internalTransaction != null)
this.internalTransaction.TransactionCompleted -= value;
TransactionCompletedInternal -= value;
}
}
public static Transaction Current {
get {
@@ -378,7 +404,7 @@ namespace System.Transactions
private void DoCommit ()
{
/* Scope becomes null in TransactionScope.Dispose */
if (Scope != null) {
if (Scope != null && (!Scope.IsComplete || !Scope.IsDisposed)) {
/* See test ExplicitTransaction8 */
Rollback (null, null);
CheckAborted ();
@@ -529,14 +555,14 @@ namespace System.Transactions
void CheckAborted ()
{
if (aborted)
if (aborted || (Scope != null && Scope.IsAborted))
throw new TransactionAbortedException ("Transaction has aborted", innerException);
}
void FireCompleted ()
{
if (TransactionCompleted != null)
TransactionCompleted (this, new TransactionEventArgs(this));
if (TransactionCompletedInternal != null)
TransactionCompletedInternal (this, new TransactionEventArgs(this));
}
static void EnsureIncompleteCurrentScope ()
@@ -548,4 +574,3 @@ namespace System.Transactions
}
}
}
@@ -9,6 +9,7 @@
// (C)2006 Novell Inc,
//
using System.Threading;
using DTCOption = System.Transactions.EnterpriseServicesInteropOption;
@@ -19,6 +20,7 @@ namespace System.Transactions
static TransactionOptions defaultOptions =
new TransactionOptions (0, TransactionManager.DefaultTimeout);
Timer scopeTimer;
Transaction transaction;
Transaction oldTransaction;
TransactionScope parentScope;
@@ -29,6 +31,7 @@ namespace System.Transactions
bool disposed;
bool completed;
bool aborted;
bool isRoot;
bool asyncFlowEnabled;
@@ -99,7 +102,7 @@ namespace System.Transactions
DTCOption interopOption)
{
Initialize (scopeOption, null, transactionOptions, interopOption,
TransactionManager.DefaultTimeout, TransactionScopeAsyncFlowOption.Suppress);
transactionOptions.Timeout, TransactionScopeAsyncFlowOption.Suppress);
}
public TransactionScope (Transaction transactionToUse,
@@ -143,8 +146,35 @@ namespace System.Transactions
transaction.InitScope (this);
if (parentScope != null)
parentScope.nested ++;
if (timeout != TimeSpan.Zero)
scopeTimer = new Timer (TransactionScope.TimerCallback, this, scopeTimeout, TimeSpan.Zero);
}
private static void TimerCallback (object state)
{
TransactionScope scope = state as TransactionScope;
if (null == scope)
{
throw new TransactionException ("TransactionScopeTimerObjectInvalid", null);
}
scope.TimeoutScope ();
}
private void TimeoutScope()
{
if (!completed && transaction != null)
{
try
{
this.transaction.Rollback ();
this.aborted = true;
}
catch (ObjectDisposedException ex) { }
catch (TransactionException txEx) { }
}
}
Transaction InitTransaction (Transaction tx, TransactionScopeOption scopeOption, TransactionOptions options)
{
if (tx != null)
@@ -181,6 +211,14 @@ namespace System.Transactions
completed = true;
}
internal bool IsAborted {
get { return aborted; }
}
internal bool IsDisposed {
get { return disposed; }
}
internal bool IsComplete {
get { return completed; }
}
@@ -214,6 +252,9 @@ namespace System.Transactions
throw new InvalidOperationException ("Transaction.Current has changed inside of the TransactionScope");
}
if (scopeTimer != null)
scopeTimer.Dispose();
if (asyncFlowEnabled) {
if (oldTransaction != null)
oldTransaction.Scope = parentScope;
@@ -229,7 +270,10 @@ namespace System.Transactions
transaction.Scope = null;
if (!IsComplete) {
if (IsAborted) {
throw new TransactionAbortedException("Transaction has aborted");
}
else if (!IsComplete) {
transaction.Rollback ();
variedTransaction.Rollback();
return;
@@ -251,9 +295,11 @@ namespace System.Transactions
/* scope was not in a transaction, (Suppress) */
return;
transaction.Scope = null;
if (!IsComplete)
if (IsAborted) {
transaction.Scope = null;
throw new TransactionAbortedException("Transaction has aborted");
}
else if (!IsComplete)
{
transaction.Rollback();
return;
@@ -265,10 +311,10 @@ namespace System.Transactions
transaction.CommitInternal();
transaction.Scope = null;
}
}
}
}
@@ -11,6 +11,7 @@
using System;
using NUnit.Framework;
using System.Transactions;
using System.Threading;
namespace MonoTests.System.Transactions
{
@@ -1114,6 +1115,18 @@ namespace MonoTests.System.Transactions
Assert.AreEqual(IsolationLevel.ReadCommitted, Transaction.Current.IsolationLevel);
}
}
[Test]
[ExpectedException(typeof(TransactionAbortedException))]
public void TransactionScopeTimeout()
{
Assert.IsNull(Transaction.Current, "Ambient transaction exists (before)");
using (var ts = new TransactionScope(TransactionScopeOption.Required, TimeSpan.FromMilliseconds(1)))
{
Thread.Sleep(100);
ts.Complete();
}
}
}
}
@@ -375,6 +375,7 @@ namespace System.Windows.Forms
public void End (PaintEventArgs pe) {
Graphics buffered_graphics;
buffered_graphics = pe.SetGraphics ((Graphics) real_graphics.Pop ());
buffered_graphics.Flush();
if (pending_disposal)
Dispose ();
@@ -334,8 +334,7 @@ namespace System.Windows.Forms.PropertyGridInternal
if (value is string)
return (string)value;
if (PropertyDescriptor != null && PropertyDescriptor.Converter != null &&
PropertyDescriptor.Converter.CanConvertTo ((ITypeDescriptorContext)this, typeof (string))) {
if (PropertyDescriptor != null && PropertyDescriptor.Converter != null) {
try {
return PropertyDescriptor.Converter.ConvertToString ((ITypeDescriptorContext)this, value);
} catch {
@@ -467,7 +466,8 @@ namespace System.Windows.Forms.PropertyGridInternal
if (this.IsReadOnly)
return false;
if (SetValueCore (value, out error)) {
if (value != Value) {
SetValueCore(value, out error);
InvalidateChildGridItemsCache ();
property_grid.OnPropertyValueChangedInternal (this, this.Value);
return true;
@@ -478,42 +478,6 @@ namespace System.Windows.Forms.PropertyGridInternal
protected virtual bool SetValueCore (object value, out string error)
{
error = null;
TypeConverter converter = GetConverter ();
Type valueType = value != null ? value.GetType () : null;
// if the new value is not of the same type try to convert it
if (valueType != null && this.PropertyDescriptor.PropertyType != null &&
!this.PropertyDescriptor.PropertyType.IsAssignableFrom (valueType)) {
bool conversionError = false;
try {
if (converter != null &&
converter.CanConvertFrom ((ITypeDescriptorContext)this, valueType))
value = converter.ConvertFrom ((ITypeDescriptorContext)this,
CultureInfo.CurrentCulture, value);
else
conversionError = true;
} catch (Exception e) {
error = e.Message;
conversionError = true;
}
if (conversionError) {
string valueText = ConvertToString (value);
string errorShortDescription = null;
if (valueText != null) {
errorShortDescription = "Property value '" + valueText + "' of '" +
PropertyDescriptor.Name + "' is not convertible to type '" +
this.PropertyDescriptor.PropertyType.Name + "'";
} else {
errorShortDescription = "Property value of '" +
PropertyDescriptor.Name + "' is not convertible to type '" +
this.PropertyDescriptor.PropertyType.Name + "'";
}
error = errorShortDescription + Environment.NewLine + Environment.NewLine + error;
return false;
}
}
bool changed = false;
bool current_changed = false;
object[] propertyOwners = this.PropertyOwners;
@@ -719,7 +719,7 @@ namespace System.Windows.Forms
if (doc.Wrap) {
// FIXME: Technically there are multiple no-break spaces, not just the main one.
if ((Char.IsWhiteSpace (c) && c != '\u00A0') || c == '-' || c == '\u2013' || c == '\u2014') {
if (wrap_pos <= pos && ((Char.IsWhiteSpace (c) && c != '\u00A0') || c == '-' || c == '\u2013' || c == '\u2014')) {
// Primarily break on dashes or whitespace other than a no-break space.
prev_wrap_pos = wrap_pos;
if (c == '\t') {
@@ -738,11 +738,15 @@ namespace System.Windows.Forms
if (Char.IsWhiteSpace (c)) {
if (wrap_pos > pos) {
while (wrap_pos < text.Length && Char.IsWhiteSpace (text [wrap_pos]) && text [wrap_pos] != '\t') {
// Leave whitespace other than tabs on the end of this line.
wrap_pos++;
}
pos++;
wrapped = true;
// don't try pulling more into this line, but keep looping to deal with the rest of the widths and tags
// don't try pulling more into this line, but keep looping to deal with the rest of the widths and tags that will be left on the line
} else {
// At the wrap position, so split the line. c is a tab.
split_tag = tag;
}
} else {
if (wrap_pos > pos && pos > 0) {
@@ -953,7 +957,7 @@ namespace System.Windows.Forms
this.textHeight = (int)tag.Font.Height;
tag.Height = this.textHeight;
this.height = (int)(this.textHeight + this.LineSpacing + this.TotalParagraphSpacing);
this.height = (int)(this.LineSpacing + this.TotalParagraphSpacing);
this.ascent = tag.Ascent;
@@ -668,73 +668,9 @@ namespace System.Windows.Forms
PaddingClientRectangle,
string_format);
// Get offset for different text alignments
float align_offset_x = 0F;
float align_offset_y = 0F;
if (TextAlign != ContentAlignment.TopLeft) {
Region all_regions = new Region (new Rectangle ());
foreach (Region region in regions) {
all_regions.Union (region);
}
Graphics graphics = CreateGraphics ();
if (TextAlign == ContentAlignment.TopCenter) {
float text_width = all_regions.GetBounds(graphics).Width;
align_offset_x = (ClientRectangle.Width / 2 - text_width / 2);
}
if (TextAlign == ContentAlignment.TopRight) {
float text_width = all_regions.GetBounds(graphics).Width;
align_offset_x = (ClientRectangle.Width - text_width);
}
if (TextAlign == ContentAlignment.MiddleLeft) {
float text_height = all_regions.GetBounds(graphics).Height;
align_offset_y = (ClientRectangle.Height / 2 - text_height / 2);
}
if (TextAlign == ContentAlignment.MiddleCenter) {
float text_width = all_regions.GetBounds(graphics).Width;
float text_height = all_regions.GetBounds(graphics).Height;
align_offset_x = (ClientRectangle.Width / 2 - text_width / 2);
align_offset_y = (ClientRectangle.Height / 2 - text_height / 2);
}
if (TextAlign == ContentAlignment.MiddleRight) {
float text_width = all_regions.GetBounds(graphics).Width;
float text_height = all_regions.GetBounds(graphics).Height;
align_offset_x = (ClientRectangle.Width - text_width);
align_offset_y = (ClientRectangle.Height / 2 - text_height / 2);
}
if (TextAlign == ContentAlignment.BottomLeft) {
float text_height = all_regions.GetBounds(graphics).Height;
align_offset_y = (ClientRectangle.Height - text_height);
}
if (TextAlign == ContentAlignment.BottomCenter) {
float text_width = all_regions.GetBounds(graphics).Width;
float text_height = all_regions.GetBounds(graphics).Height;
align_offset_x = (ClientRectangle.Width / 2 - text_width / 2);
align_offset_y = (ClientRectangle.Height - text_height);
}
if (TextAlign == ContentAlignment.BottomRight) {
float text_width = all_regions.GetBounds(graphics).Width;
float text_height = all_regions.GetBounds(graphics).Height;
align_offset_x = (ClientRectangle.Width - text_width);
align_offset_y = (ClientRectangle.Height - text_height);
}
}
for (int i = 0; i < pieces.Length; i ++) {
pieces[i].region = regions[i];
pieces[i].region.Translate (Padding.Left + align_offset_x, Padding.Top + align_offset_y);
pieces[i].region.Translate (Padding.Left, Padding.Top);
}
Invalidate ();
@@ -3852,7 +3852,7 @@ namespace System.Windows.Forms
{
Size item_size = ItemSize;
for (int i = 0; i < items.Count; i++) {
Rectangle item_rect = items [i].Bounds;
Rectangle item_rect = new Rectangle(GetItemLocation(i), item_size);
if (item_rect.Contains (x, y))
return items [i];
}
@@ -1576,7 +1576,7 @@ namespace System.Windows.Forms
if (categoryName == null)
categoryName = UNCATEGORIZED_CATEGORY_LABEL;
GridItem category_item = rootItem.GridItems [categoryName];
if (category_item == null)
if (category_item == null || !(category_item is CategoryGridEntry))
category_item = categories [categoryName];
if (category_item == null) {
@@ -2006,22 +2006,22 @@ namespace System.Windows.Forms {
}
case RTF.Minor.LQuote: {
Console.Write("\u2018");
rtf_line.Append ("\u2018");
break;
}
case RTF.Minor.RQuote: {
Console.Write("\u2019");
rtf_line.Append ("\u2019");
break;
}
case RTF.Minor.LDblQuote: {
Console.Write("\u201C");
rtf_line.Append ("\u201C");
break;
}
case RTF.Minor.RDblQuote: {
Console.Write("\u201D");
rtf_line.Append ("\u201D");
break;
}
@@ -1732,8 +1732,8 @@ namespace System.Windows.Forms {
lines, document_x, document_y, owner.Width, owner.Height);
for (int i = 1; i <= lines ; i++) {
Line line = GetLine (i);
Console.WriteLine ("<line no='{0}' ending='{1}' x='{2}' y='{3}' width='{4}' height='{5}' indent='{6}' hanging-indent='{7}' right-indent='{8}'>",
line.line_no, line.ending, line.X, line.Y, line.Width, line.Height, line.Indent, line.HangingIndent, line.RightIndent);
Console.WriteLine ("<line no='{0}' ending='{1}' x='{2}' y='{3}' width='{4}' height='{5}' indent='{6}' hanging-indent='{7}' right-indent='{8}' spacing-before='{9}' spacing-after='{10}'>",
line.line_no, line.ending, line.X, line.Y, line.Width, line.Height, line.Indent, line.HangingIndent, line.RightIndent, line.SpacingBefore, line.SpacingAfter);
LineTag tag = line.tags;
while (tag != null) {
@@ -1794,7 +1794,7 @@ namespace System.Windows.Forms {
/// Make sure that we aren't drawing one more line then we need to
line = GetLine (end - 1);
if (line != null && clip.Bottom == offset_y + line.Y + (int)line.SpacingBefore + line.height - viewport_y)
if (line != null && clip.Bottom == offset_y + line.Y + line.height - viewport_y)
end--;
line_no = start;
@@ -311,7 +311,7 @@ namespace System.Windows.Forms
public override Size GetPreferredSize (Size constrainingSize)
{
return base.GetPreferredSize (constrainingSize);
return new Size(TextBox.Bounds.Width, TextBox.PreferredHeight);
}
public void Paste ()
@@ -270,8 +270,11 @@ namespace Mono.Btls
Flush = 1
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int BioReadFunc (IntPtr bio, IntPtr data, int dataLength, out int wantMore);
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int BioWriteFunc (IntPtr bio, IntPtr data, int dataLength);
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate long BioControlFunc (IntPtr bio, ControlCommand command, long arg);
[DllImport (BTLS_DYLIB)]
@@ -32,8 +32,11 @@ using System.Runtime.CompilerServices;
namespace Mono.Btls
{
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int MonoBtlsVerifyCallback (MonoBtlsX509StoreCtx ctx);
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int MonoBtlsSelectCallback (string[] acceptableIssuers);
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int MonoBtlsServerNameCallback ();
class MonoBtlsSsl : MonoBtlsObject
@@ -259,6 +262,7 @@ namespace Mono.Btls
return error;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int PrintErrorsCallbackFunc (IntPtr str, IntPtr len, IntPtr ctx);
[Mono.Util.MonoPInvokeCallback (typeof (PrintErrorsCallbackFunc))]
@@ -93,8 +93,11 @@ namespace Mono.Btls
[DllImport (BTLS_DYLIB)]
extern static void mono_btls_ssl_ctx_set_server_name_callback (IntPtr handle, IntPtr func);
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int NativeVerifyFunc (IntPtr instance, int preverify_ok, IntPtr ctx);
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int NativeSelectFunc (IntPtr instance, int count, IntPtr sizes, IntPtr data);
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int NativeServerNameFunc (IntPtr instance);
NativeVerifyFunc verifyFunc;
@@ -61,6 +61,7 @@ namespace Mono.Btls
[DllImport (BTLS_DYLIB)]
extern static int mono_btls_x509_lookup_mono_free (IntPtr handle);
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int BySubjectFunc (IntPtr instance, IntPtr name, out IntPtr x509_ptr);
GCHandle gch;
@@ -120,7 +120,15 @@ namespace System.Net.Security
public SslStream (Stream innerStream, bool leaveInnerStreamOpen)
: base (innerStream, leaveInnerStreamOpen)
{
#if WASM
try {
provider = GetProvider ();
} catch (Exception ex) {
throw new PlatformNotSupportedException ("System.Net.Security.SslStream is not supported on the current platform.", ex);
}
#else
provider = GetProvider ();
#endif
settings = MonoTlsSettings.CopyDefaultSettings ();
impl = provider.CreateSslStream (this, innerStream, leaveInnerStreamOpen, settings);
}
@@ -133,7 +141,15 @@ namespace System.Net.Security
public SslStream (Stream innerStream, bool leaveInnerStreamOpen, RemoteCertificateValidationCallback userCertificateValidationCallback, LocalCertificateSelectionCallback userCertificateSelectionCallback)
: base (innerStream, leaveInnerStreamOpen)
{
#if WASM
try {
provider = GetProvider ();
} catch (Exception ex) {
throw new PlatformNotSupportedException ("System.Net.Security.SslStream is not supported on the current platform.", ex);
}
#else
provider = GetProvider ();
#endif
settings = MonoTlsSettings.CopyDefaultSettings ();
SetAndVerifyValidationCallback (userCertificateValidationCallback);
SetAndVerifySelectionCallback (userCertificateSelectionCallback);
@@ -488,6 +504,26 @@ namespace System.Net.Security
return Impl.WriteAsync (buffer, offset, count, cancellationToken);
}
public override IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
return TaskToApm.Begin (Impl.ReadAsync (buffer, offset, count), callback, state);
}
public override int EndRead (IAsyncResult asyncResult)
{
return TaskToApm.End<int> (asyncResult);
}
public override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback callback, object state)
{
return TaskToApm.Begin (Impl.WriteAsync (buffer, offset, count), callback, state);
}
public override void EndWrite (IAsyncResult asyncResult)
{
TaskToApm.End (asyncResult);
}
#else // !SECURITY_DEP
const string EXCEPTION_MESSAGE = "System.Net.Security.SslStream is not supported on the current platform.";
@@ -237,8 +237,12 @@ namespace System.Net {
}
if (ProcessInput (ms)) {
if (!context.HaveError)
context.Request.FinishInitialization ();
if (!context.HaveError) {
if (!context.Request.FinishInitialization()) {
Close (true);
return;
}
}
if (context.HaveError) {
SendError ();
@@ -192,12 +192,12 @@ namespace System.Net {
return false;
}
internal void FinishInitialization ()
internal bool FinishInitialization ()
{
string host = UserHostName;
if (version > HttpVersion.Version10 && (host == null || host.Length == 0)) {
context.ErrorMessage = "Invalid host name";
return;
return true;
}
string path;
@@ -223,7 +223,7 @@ namespace System.Net {
if (!Uri.TryCreate (base_uri + path, UriKind.Absolute, out url)){
context.ErrorMessage = WebUtility.HtmlEncode ("Invalid url: " + base_uri + path);
return;
return true;
}
CreateQueryString (url.Query);
@@ -239,7 +239,7 @@ namespace System.Net {
// 'identity' is not valid!
if (t_encoding != null && !is_chunked) {
context.Connection.SendError (null, 501);
return;
return false;
}
}
@@ -247,7 +247,7 @@ namespace System.Net {
if (String.Compare (method, "POST", StringComparison.OrdinalIgnoreCase) == 0 ||
String.Compare (method, "PUT", StringComparison.OrdinalIgnoreCase) == 0) {
context.Connection.SendError (null, 411);
return;
return false;
}
}
@@ -255,6 +255,8 @@ namespace System.Net {
ResponseStream output = context.Connection.GetResponseStream ();
output.InternalWrite (_100continue, 0, _100continue.Length);
}
return true;
}
internal static string Unquote (String str) {
@@ -302,6 +302,11 @@
<method signature="System.Void .ctor(System.String)" />
</type>
<type fullname="System.PlatformNotSupportedException">
<!-- mono_error_set_platform_not_supported -->
<method signature="System.Void .ctor(System.String)" />
</type>
<!-- mono-error.c (mono_error_set_ambiguous_implementation) -->
<type fullname="System.Runtime.AmbiguousImplementationException">
<!-- mono_error_set_ambiguous_implementation -->
+2 -7
View File
@@ -6,7 +6,7 @@ export __SECURITY_BOOTSTRAP_DB=$(topdir)/class/corlib
LIBRARY = corlib.dll
LIBRARY_NAME = mscorlib.dll
LIB_MCS_FLAGS = $(REFERENCE_SOURCES_FLAGS) $(RESOURCE_FILES:%=-resource:%)
LIB_MCS_FLAGS = $(REFERENCE_SOURCES_FLAGS) $(RESOURCE_FILES:%=-resource:%) $(UNICODECHARINFO:%=-resource:%)
USE_XTEST_REMOTE_EXECUTOR = YES
LIBRARY_WARN_AS_ERROR = yes
@@ -74,10 +74,6 @@ RESOURCE_STRINGS_FILES = --mscorlib-debug
RESOURCE_STRINGS = ../referencesource/mscorlib/mscorlib.txt
MODULE_DEPS = $(IL_REPLACE) LinkerDescriptor/mscorlib.xml
ifdef WASM
MANAGED_COLLATOR_RESOURCES_FILES =
else
MANAGED_COLLATOR_RESOURCES_FILES = \
resources/collation.core.bin \
resources/collation.tailoring.bin \
@@ -86,7 +82,6 @@ MANAGED_COLLATOR_RESOURCES_FILES = \
resources/collation.cjkJA.bin \
resources/collation.cjkKO.bin \
resources/collation.cjkKOlv2.bin
endif
ifdef MCS_MODE
UNICODECHARINFO = resources/charinfo.nlp
@@ -95,7 +90,6 @@ else
endif
RESOURCE_FILES = \
$(UNICODECHARINFO) \
$(MANAGED_COLLATOR_RESOURCES_FILES) \
LinkerDescriptor/mscorlib.xml
@@ -207,6 +201,7 @@ EXTRA_DISTFILES = \
$(RESOURCE_FILES) \
$(TEST_RESOURCE_FILES) \
$(TEST_RESOURCES:.resources=.resx) \
resources/charinfo.nlp \
LinkerDescriptor/mscorlib_test.xml
TEST_RESOURCE_FILES = \
+54 -5
View File
@@ -27,6 +27,7 @@
//
using System;
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -81,7 +82,7 @@ namespace Mono {
return true;
}
static object exception_capture = new object ();
static object dump = new object ();
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern string ExceptionToState_internal (Exception exc, out ulong portable_hash, out ulong unportable_hash);
@@ -145,7 +146,7 @@ namespace Mono {
{
ulong portable_hash;
ulong unportable_hash;
lock (exception_capture)
lock (dump)
{
string payload_str = ExceptionToState_internal (exc, out portable_hash, out unportable_hash);
SendMicrosoftTelemetry (payload_str, portable_hash, unportable_hash);
@@ -182,7 +183,11 @@ namespace Mono {
{
ulong portable_hash;
ulong unportable_hash;
string payload_str = DumpStateSingle_internal (out portable_hash, out unportable_hash);
string payload_str;
lock (dump)
{
payload_str = DumpStateSingle_internal (out portable_hash, out unportable_hash);
}
return new Tuple<String, ulong, ulong> (payload_str, portable_hash, unportable_hash);
}
@@ -192,7 +197,11 @@ namespace Mono {
{
ulong portable_hash;
ulong unportable_hash;
string payload_str = DumpStateTotal_internal (out portable_hash, out unportable_hash);
string payload_str;
lock (dump)
{
payload_str = DumpStateTotal_internal (out portable_hash, out unportable_hash);
}
return new Tuple<String, ulong, ulong> (payload_str, portable_hash, unportable_hash);
}
@@ -255,6 +264,43 @@ namespace Mono {
}
}
static string get_breadcrumb_value (string file_prefix, string directory_str, bool clear)
{
var allfiles = Directory.GetFiles (directory_str, $"{file_prefix}_*" );
if (allfiles.Length == 0)
return string.Empty;
if (allfiles.Length > 1) {
// it's impossible to tell which breadcrumb is the last one (let's not trust filesystem timestamps)
// delete the multiple files so at least next crash can make sense
try {
Array.ForEach (allfiles, f => File.Delete (f) );
} catch (Exception) { }
return string.Empty;
}
if (clear)
File.Delete (allfiles [0]);
var filename = Path.GetFileName (allfiles [0]);
return filename.Substring (file_prefix.Length + 1);
}
static long CheckCrashReportHash (string directory_str, bool clear)
{
var value = get_breadcrumb_value ("crash_hash", directory_str, clear);
if (value == string.Empty)
return 0;
else
return Convert.ToInt64 (value, 16);
}
static string CheckCrashReportReason (string directory_str, bool clear)
{
return get_breadcrumb_value ("crash_reason", directory_str, clear);
}
[MethodImplAttribute (MethodImplOptions.InternalCall)]
static extern void AnnotateMicrosoftTelemetry_internal (IntPtr key, IntPtr val);
@@ -263,7 +309,10 @@ namespace Mono {
using (var key_chars = RuntimeMarshal.MarshalString (key))
using (var val_chars = RuntimeMarshal.MarshalString (val))
{
AnnotateMicrosoftTelemetry_internal (key_chars.Value, val_chars.Value);
lock (dump)
{
AnnotateMicrosoftTelemetry_internal (key_chars.Value, val_chars.Value);
}
}
}
}
@@ -72,9 +72,6 @@ namespace System.Globalization
static bool managedCollation;
static bool managedCollationChecked;
#if WASM
const bool UseManagedCollation = false;
#else
static bool UseManagedCollation {
get {
if (!managedCollationChecked) {
@@ -85,13 +82,9 @@ namespace System.Globalization
return managedCollation;
}
}
#endif
ISimpleCollator GetCollator ()
{
#if WASM
return null;
#else
if (collator != null)
return collator;
@@ -107,7 +100,6 @@ namespace System.Globalization
}
return collator;
#endif
}
SortKey CreateSortKeyCore (string source, CompareOptions options)
@@ -284,56 +284,93 @@ namespace System.Diagnostics.Tracing
// [MonoTODO]
public event EventHandler<EventCommandEventArgs> EventCommandExecuted
{
#if WASM
add { throw new PlatformNotSupportedException (); }
remove { throw new PlatformNotSupportedException (); }
#else
add { throw new NotImplementedException (); }
remove { throw new NotImplementedException (); }
#endif
}
// [MonoTODO]
public static string GenerateManifest (Type eventSourceType, string assemblyPathToIncludeInManifest)
{
#if WASM
throw new PlatformNotSupportedException ();
#else
throw new NotImplementedException ();
#endif
}
// [MonoTODO]
public static string GenerateManifest (Type eventSourceType, string assemblyPathToIncludeInManifest, EventManifestOptions flags)
{
#if WASM
throw new PlatformNotSupportedException ();
#else
throw new NotImplementedException ();
#endif
}
// [MonoTODO]
public static Guid GetGuid (Type eventSourceType)
{
#if WASM
throw new PlatformNotSupportedException ();
#else
throw new NotImplementedException ();
#endif
}
// [MonoTODO]
public static string GetName (Type eventSourceType)
{
#if WASM
throw new PlatformNotSupportedException ();
#else
throw new NotImplementedException ();
#endif
}
// [MonoTODO]
public static IEnumerable<EventSource> GetSources ()
{
#if WASM
throw new PlatformNotSupportedException ();
#else
throw new NotImplementedException ();
#endif
}
// [MonoTODO]
public static void SendCommand (EventSource eventSource, EventCommand command, IDictionary<string, string> commandArguments)
{
#if WASM
throw new PlatformNotSupportedException ();
#else
throw new NotImplementedException ();
#endif
}
// [MonoTODO]
public static void SetCurrentThreadActivityId (Guid activityId)
{
#if WASM
throw new PlatformNotSupportedException ();
#else
throw new NotImplementedException ();
#endif
}
// [MonoTODO]
public static void SetCurrentThreadActivityId (Guid activityId, out Guid oldActivityThatWillContinue)
{
#if WASM
throw new PlatformNotSupportedException ();
#else
throw new NotImplementedException ();
#endif
}
}
}
@@ -66,6 +66,11 @@ namespace System.Runtime.InteropServices
_osArchitecture = Environment.Is64BitOperatingSystem ? Architecture.X64 : Architecture.X86;
_processArchitecture = Architecture.X64;
break;
case "wasm":
#if false
_osArchitecture = Architecture.Wasm;
_processArchitecture = Architecture.Wasm;
#endif
// upstream only has these values; try to pretend we're x86 if nothing matches
// want more? bug: https://github.com/dotnet/corefx/issues/30706
default:
@@ -107,7 +112,7 @@ namespace System.Runtime.InteropServices
_osPlatform = OSPlatform.Create ("HAIKU");
break;
case "wasm":
_osPlatform = OSPlatform.Create ("WEBASSEMBLY");
_osPlatform = OSPlatform.Create ("BROWSER");
break;
default:
_osPlatform = OSPlatform.Create ("UNKNOWN");
@@ -1499,6 +1499,7 @@ public class DirectoryTest
}
[Test] // bug #346123
[Category ("NotWasm")]
public void GetDirectories_Backslash ()
{
if (!RunningOnUnix)
@@ -1567,6 +1568,7 @@ public class DirectoryTest
}
[Test] // bug #346123
[Category ("NotWasm")]
public void GetFiles_Backslash ()
{
if (!RunningOnUnix)
@@ -977,9 +977,15 @@ namespace MonoTests.System.IO
Assert.IsTrue (Path.IsPathRooted ("\\"), "IsPathRooted #16");
Assert.IsTrue (Path.IsPathRooted ("\\\\"), "IsPathRooted #17");
} else {
// To fix issue https://github.com/mono/mono/issues/18933 we set the AltDirectorySeparatorChar as well.
// This causes the Assert.IsTrue (!Path.IsPathRooted ("\\"), "IsPathRooted #09"); to fail.
// Path.IsPathFullyQualified Method handles paths that use both the DirectorySeparatorChar
// and the AltDirectorySeparatorChar characters.
#if !WASM
Assert.IsTrue (!Path.IsPathRooted ("\\"), "IsPathRooted #09");
Assert.IsTrue (!Path.IsPathRooted ("\\\\"), "IsPathRooted #10");
Assert.IsTrue (!Path.IsPathRooted ("z:"), "IsPathRooted #11");
#endif
}
}
}
@@ -316,6 +316,28 @@ namespace MonoTests.System.Reflection.Emit
Assert.Fail ("Expected CreateInstance of a broken type to throw TLE");
}
[Test]
public void TestCreateInvalidEnumWithAnIncompleteUnderlyingEnumType ()
{
var mb = GenerateModule ();
var incomplete = GenerateEnum (mb);
GenerateField (incomplete);
var eb = mb.DefineEnum (
_enumNamespace + ".IncompleteUnderlying",
TypeAttributes.Public,
incomplete);
bool caught = false;
try {
var t = eb.CreateType ();
} catch (TypeLoadException exn) {
caught = true;
}
if (!caught)
Assert.Fail ("Expected CreateType of a broken type to throw TLE");
}
[Test]
public void TestEnumBuilderTokenUsable () {
// Regression test for https://bugzilla.xamarin.com/show_bug.cgi?id=58361
+6
View File
@@ -61,6 +61,11 @@ namespace MonoTests.System
C
};
class GenericEnum<T>
{
public enum TheEnum { A, B };
}
class SampleGeneric<T> where T : IFace1
{
}
@@ -2935,6 +2940,7 @@ namespace MonoTests.System
Assert.AreEqual (TypeCode.UInt16, Type.GetTypeCode (typeof (ushort)), "#16");
Assert.AreEqual (TypeCode.UInt32, Type.GetTypeCode (typeof (uint)), "#17");
Assert.AreEqual (TypeCode.UInt64, Type.GetTypeCode (typeof (ulong)), "#18");
Assert.AreEqual (TypeCode.Int32, Type.GetTypeCode (typeof (GenericEnum<int>.TheEnum)));
}
[Test]
+1 -1
View File
@@ -14,7 +14,7 @@ namespace Internal.Runtime.Augments
public void ResetThreadPoolThread () {}
public static RuntimeThread InitializeThreadPoolThread () => default;
public static RuntimeThread InitializeThreadPoolThread () => new RuntimeThread (null);
public static RuntimeThread Create (ParameterizedThreadStart start, int maxStackSize)
=> new RuntimeThread (new Thread (start, maxStackSize));
+22 -15
View File
@@ -1301,6 +1301,7 @@
<Compile Include="Mono.Globalization.Unicode\MSCompatUnicodeTableUtil.cs" />
<Compile Include="Mono.Globalization.Unicode\Normalization.cs" />
<Compile Include="Mono.Globalization.Unicode\NormalizationTableUtil.cs" />
<Compile Include="Mono.Globalization.Unicode\SimpleCollator.cs" />
<Compile Include="Mono.Globalization.Unicode\SortKey.cs" />
<Compile Include="Mono.Globalization.Unicode\SortKeyBuffer.cs" />
<Compile Include="Mono.Security.Cryptography\DSAManaged.cs" />
@@ -1986,7 +1987,6 @@
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
<Compile Include="Mono.Globalization.Unicode\SimpleCollator.cs" />
<Compile Include="Mono.Interop\ComInteropProxy.cs" />
<Compile Include="Mono.Interop\IDispatch.cs" />
<Compile Include="Mono.Interop\IUnknown.cs" />
@@ -2266,7 +2266,6 @@
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
<Compile Include="Mono.Globalization.Unicode\SimpleCollator.cs" />
<Compile Include="Mono.Interop\ComInteropProxy.cs" />
<Compile Include="Mono.Interop\IDispatch.cs" />
<Compile Include="Mono.Interop\IUnknown.cs" />
@@ -2600,7 +2599,6 @@
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
<Compile Include="Mono.Globalization.Unicode\SimpleCollator.cs" />
<Compile Include="Mono.Interop\ComInteropProxy.cs" />
<Compile Include="Mono.Interop\IDispatch.cs" />
<Compile Include="Mono.Interop\IUnknown.cs" />
@@ -2855,7 +2853,6 @@
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
<Compile Include="Mono.Globalization.Unicode\SimpleCollator.cs" />
<Compile Include="Mono.Interop\ComInteropProxy.cs" />
<Compile Include="Mono.Interop\IDispatch.cs" />
<Compile Include="Mono.Interop\IUnknown.cs" />
@@ -3176,7 +3173,6 @@
<Compile Include="..\referencesource\mscorlib\system\security\cryptography\sha384managed.cs" />
<Compile Include="..\referencesource\mscorlib\system\security\cryptography\sha512managed.cs" />
<Compile Include="..\referencesource\mscorlib\system\security\cryptography\tripledescryptoserviceprovider.cs" />
<Compile Include="Mono.Globalization.Unicode\SimpleCollator.cs" />
<Compile Include="Mono.Interop\ComInteropProxy.cs" />
<Compile Include="Mono.Interop\IDispatch.cs" />
<Compile Include="Mono.Interop\IUnknown.cs" />
@@ -3425,7 +3421,6 @@
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
<Compile Include="Mono.Globalization.Unicode\SimpleCollator.cs" />
<Compile Include="Mono.Interop\ComInteropProxy.cs" />
<Compile Include="Mono.Interop\IDispatch.cs" />
<Compile Include="Mono.Interop\IUnknown.cs" />
@@ -3681,7 +3676,6 @@
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
<Compile Include="Mono.Globalization.Unicode\SimpleCollator.cs" />
<Compile Include="Mono.Interop\ComInteropProxy.cs" />
<Compile Include="Mono.Interop\IDispatch.cs" />
<Compile Include="Mono.Interop\IUnknown.cs" />
@@ -3937,7 +3931,6 @@
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
<Compile Include="Mono.Globalization.Unicode\SimpleCollator.cs" />
<Compile Include="Mono.Interop\ComInteropProxy.cs" />
<Compile Include="Mono.Interop\IDispatch.cs" />
<Compile Include="Mono.Interop\IUnknown.cs" />
@@ -4185,7 +4178,6 @@
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
<Compile Include="Mono.Globalization.Unicode\SimpleCollator.cs" />
<Compile Include="Mono.Interop\ComInteropProxy.cs" />
<Compile Include="Mono.Interop\IDispatch.cs" />
<Compile Include="Mono.Interop\IUnknown.cs" />
@@ -4436,7 +4428,6 @@
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
<Compile Include="Mono.Globalization.Unicode\SimpleCollator.cs" />
<Compile Include="Mono.Interop\ComInteropProxy.cs" />
<Compile Include="Mono.Interop\IDispatch.cs" />
<Compile Include="Mono.Interop\IUnknown.cs" />
@@ -4687,7 +4678,6 @@
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
<Compile Include="Mono.Globalization.Unicode\SimpleCollator.cs" />
<Compile Include="Mono.Interop\ComInteropProxy.cs" />
<Compile Include="Mono.Interop\IDispatch.cs" />
<Compile Include="Mono.Interop\IUnknown.cs" />
@@ -4973,7 +4963,6 @@
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
<Compile Include="Mono.Globalization.Unicode\SimpleCollator.cs" />
<Compile Include="Mono.Interop\ComInteropProxy.cs" />
<Compile Include="Mono.Interop\IDispatch.cs" />
<Compile Include="Mono.Interop\IUnknown.cs" />
@@ -5223,7 +5212,6 @@
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
<Compile Include="Mono.Globalization.Unicode\SimpleCollator.cs" />
<Compile Include="Mono.Interop\ComInteropProxy.cs" />
<Compile Include="Mono.Interop\IDispatch.cs" />
<Compile Include="Mono.Interop\IUnknown.cs" />
@@ -5478,7 +5466,6 @@
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
<Compile Include="Mono.Globalization.Unicode\SimpleCollator.cs" />
<Compile Include="Mono.Interop\ComInteropProxy.cs" />
<Compile Include="Mono.Interop\IDispatch.cs" />
<Compile Include="Mono.Interop\IUnknown.cs" />
@@ -5733,7 +5720,6 @@
<Compile Include="Microsoft.Win32\UnixRegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32RegistryApi.cs" />
<Compile Include="Microsoft.Win32\Win32ResultCode.cs" />
<Compile Include="Mono.Globalization.Unicode\SimpleCollator.cs" />
<Compile Include="Mono.Interop\ComInteropProxy.cs" />
<Compile Include="Mono.Interop\IDispatch.cs" />
<Compile Include="Mono.Interop\IUnknown.cs" />
@@ -6423,6 +6409,27 @@
<EmbeddedResource Include="LinkerDescriptor/mscorlib.xml">
<LogicalName>mscorlib.xml</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="resources/collation.cjkCHS.bin">
<LogicalName>collation.cjkCHS.bin</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="resources/collation.cjkCHT.bin">
<LogicalName>collation.cjkCHT.bin</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="resources/collation.cjkJA.bin">
<LogicalName>collation.cjkJA.bin</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="resources/collation.cjkKO.bin">
<LogicalName>collation.cjkKO.bin</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="resources/collation.cjkKOlv2.bin">
<LogicalName>collation.cjkKOlv2.bin</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="resources/collation.core.bin">
<LogicalName>collation.core.bin</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="resources/collation.tailoring.bin">
<LogicalName>collation.tailoring.bin</LogicalName>
</EmbeddedResource>
</ItemGroup>
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
@@ -1,4 +1,2 @@
#include unix_build_corlib.dll.exclude.sources
#include testing_aot_common_corlib.dll.exclude.sources
Mono.Globalization.Unicode/SimpleCollator.cs
+1 -1
View File
@@ -92,7 +92,7 @@ t }
. int [] tokens = yyExpectingTokens (state);
. string [] result = new string[tokens.Length];
. for (int n = 0; n < tokens.Length; n++)
. result[n++] = yyNames[tokens [n]];
. result[n] = yyNames[tokens [n]];
. return result;
. }
.
+1 -1
View File
@@ -1661,7 +1661,7 @@ namespace Mono.CSharp {
" -reference:A1[,An] Imports metadata from the specified assembly (short: -r)\n" +
" -reference:ALIAS=A Imports metadata using specified extern alias (short: -r)\n" +
" -sdk:VERSION Specifies SDK version of referenced assemblies\n" +
" VERSION can be one of: 2, 4, 4.5 (default) or a custom value\n" +
" VERSION can be one of: 2, 4, 4.5, 4.x (default) or a custom value\n" +
" -target:KIND Specifies the format of the output assembly (short: -t)\n" +
" KIND can be one of: exe, winexe, library, module\n" +
" -unsafe[+|-] Allows to compile code which uses unsafe keyword\n" +
+16 -16
View File
@@ -1,24 +1,24 @@
App,mscorlib.dll,System.dll,System.Core.dll,System.Xml.dll,I18N.CJK.dll,I18N.MidEast.dll,I18N.Other.dll,I18N.Rare.dll,I18N.West.dll,I18N.dll,Microsoft.CSharp.dll,System.ComponentModel.Composition.dll,System.ComponentModel.DataAnnotations.dll,System.Data.DataSetExtensions.dll,System.Data.Services.Client.dll,System.Data.dll,System.IO.Compression.FileSystem.dll,System.IO.Compression.dll,System.IdentityModel.dll,System.Json.dll,System.Net.Http.WinHttpHandler.dll,System.Net.Http.dll,System.Net.dll,System.Numerics.Vectors.dll,System.Numerics.dll,System.Reflection.Context.dll,System.Runtime.CompilerServices.Unsafe.dll,System.Runtime.Serialization.dll,System.Security.dll,System.ServiceModel.Internals.dll,System.ServiceModel.Web.dll,System.ServiceModel.dll,System.Transactions.dll,System.Web.Services.dll,System.Windows.dll,System.Xml.Linq.dll,System.Xml.Serialization.dll
System.Core/test-plinq-01.exe,1564160,12800,63488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
System.Core/test-queryable-01.exe,1889280,14336,385536,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
System.Core/test-queryable-02.exe,1889280,14336,385536,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
System.Net.Http/test-handler-01.exe,1891328,101376,27136,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10752,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
System/test-security.exe,1885184,71168,27136,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
System.Core/test-plinq-01.exe,1563648,12800,63488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
System.Core/test-queryable-01.exe,1888768,14336,385536,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
System.Core/test-queryable-02.exe,1888768,14336,385536,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
System.Net.Http/test-handler-01.exe,1890816,101376,27136,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10752,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
System/test-security.exe,1884672,71168,27136,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
System/test-typeconverter.exe,1589760,81408,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-array.exe,1557504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-calendar-01.exe,1557504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-calendar-02.exe,1557504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-array.exe,1556992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-calendar-01.exe,1556992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-calendar-02.exe,1556992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-crypto-01.exe,1747968,13824,24576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-exception-01.exe,1557504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-exception-01.exe,1556992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-locale-01.exe,1559040,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-methodimpl-01.exe,1557504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-01.exe,1557504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-02.exe,1567232,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-methodimpl-01.exe,1556992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-01.exe,1556992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-02.exe,1566720,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-03.exe,1558016,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-04.exe,1566720,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection.exe,1852928,13824,24576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-remoting.exe,1557504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-string-01.exe,1557504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-string-02.exe,1557504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection.exe,1852416,13824,24576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-remoting.exe,1556992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-string-01.exe,1556992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-string-02.exe,1556992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-string-03.exe,1557504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-task-01.exe,1561088,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1 App mscorlib.dll System.dll System.Core.dll System.Xml.dll I18N.CJK.dll I18N.MidEast.dll I18N.Other.dll I18N.Rare.dll I18N.West.dll I18N.dll Microsoft.CSharp.dll System.ComponentModel.Composition.dll System.ComponentModel.DataAnnotations.dll System.Data.DataSetExtensions.dll System.Data.Services.Client.dll System.Data.dll System.IO.Compression.FileSystem.dll System.IO.Compression.dll System.IdentityModel.dll System.Json.dll System.Net.Http.WinHttpHandler.dll System.Net.Http.dll System.Net.dll System.Numerics.Vectors.dll System.Numerics.dll System.Reflection.Context.dll System.Runtime.CompilerServices.Unsafe.dll System.Runtime.Serialization.dll System.Security.dll System.ServiceModel.Internals.dll System.ServiceModel.Web.dll System.ServiceModel.dll System.Transactions.dll System.Web.Services.dll System.Windows.dll System.Xml.Linq.dll System.Xml.Serialization.dll
2 System.Core/test-plinq-01.exe 1564160 1563648 12800 63488 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
3 System.Core/test-queryable-01.exe 1889280 1888768 14336 385536 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4 System.Core/test-queryable-02.exe 1889280 1888768 14336 385536 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5 System.Net.Http/test-handler-01.exe 1891328 1890816 101376 27136 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10752 0 0 25600 0 0 0 0 0 0 0 0 0 0 0 0
6 System/test-security.exe 1885184 1884672 71168 27136 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 25600 0 0 0 0 0 0 0 0 0 0 0 0
7 System/test-typeconverter.exe 1589760 81408 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8 mscorlib/test-array.exe 1557504 1556992 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
9 mscorlib/test-calendar-01.exe 1557504 1556992 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
10 mscorlib/test-calendar-02.exe 1557504 1556992 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
11 mscorlib/test-crypto-01.exe 1747968 13824 24576 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
12 mscorlib/test-exception-01.exe 1557504 1556992 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
13 mscorlib/test-locale-01.exe 1559040 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
14 mscorlib/test-methodimpl-01.exe 1557504 1556992 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 mscorlib/test-reflection-01.exe 1557504 1556992 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 mscorlib/test-reflection-02.exe 1567232 1566720 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
17 mscorlib/test-reflection-03.exe 1558016 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
18 mscorlib/test-reflection-04.exe 1566720 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
19 mscorlib/test-reflection.exe 1852928 1852416 13824 24576 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
20 mscorlib/test-remoting.exe 1557504 1556992 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
21 mscorlib/test-string-01.exe 1557504 1556992 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
22 mscorlib/test-string-02.exe 1557504 1556992 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
23 mscorlib/test-string-03.exe 1557504 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
24 mscorlib/test-task-01.exe 1561088 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+6 -6
View File
@@ -1,19 +1,19 @@
App,mscorlib.dll,System.dll,System.Core.dll,System.Xml.dll,I18N.CJK.dll,I18N.MidEast.dll,I18N.Other.dll,I18N.Rare.dll,I18N.West.dll,I18N.dll,Microsoft.CSharp.dll,System.ComponentModel.Composition.dll,System.ComponentModel.DataAnnotations.dll,System.Data.DataSetExtensions.dll,System.Data.Services.Client.dll,System.Data.dll,System.IO.Compression.FileSystem.dll,System.IO.Compression.dll,System.IdentityModel.dll,System.Json.dll,System.Net.Http.WinHttpHandler.dll,System.Net.Http.dll,System.Net.dll,System.Numerics.Vectors.dll,System.Numerics.dll,System.Reflection.Context.dll,System.Runtime.CompilerServices.Unsafe.dll,System.Runtime.Serialization.dll,System.Security.dll,System.ServiceModel.Internals.dll,System.ServiceModel.Web.dll,System.ServiceModel.dll,System.Transactions.dll,System.Web.Services.dll,System.Windows.dll,System.Xml.Linq.dll,System.Xml.Serialization.dll
Newtonsoft.Json.Test/bin/iPhoneSimulator/Release/Newtonsoft.Json.Test.exe,1824768,720384,369152,421376,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35840,0,0,0,0,0,0,0,0,0,0,30720,0
Newtonsoft.Json.Test/bin/iPhoneSimulator/Release/Newtonsoft.Json.Test.exe,1824256,720384,369152,420864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35840,0,0,0,0,0,0,0,0,0,0,30720,0
System.Core/test-plinq-01.exe,942080,13824,60928,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
System.Net.Http/test-handler-01.exe,1392128,86016,8192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10240,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
System/test-security.exe,1384960,64000,8192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
System.Net.Http/test-handler-01.exe,1391616,86016,8192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10240,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
System/test-security.exe,1384448,64000,8192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0
System/test-typeconverter.exe,1033728,80384,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-array.exe,874496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-calendar-01.exe,874496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-calendar-02.exe,874496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-crypto-01.exe,875008,0,4608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-exception-01.exe,874496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-locale-01.exe,878592,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-locale-01.exe,878080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-methodimpl-01.exe,874496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-01.exe,874496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-02.exe,886784,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-03.exe,997376,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-02.exe,886272,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-03.exe,996864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-04.exe,886272,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-string-01.exe,874496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-string-02.exe,875008,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1 App mscorlib.dll System.dll System.Core.dll System.Xml.dll I18N.CJK.dll I18N.MidEast.dll I18N.Other.dll I18N.Rare.dll I18N.West.dll I18N.dll Microsoft.CSharp.dll System.ComponentModel.Composition.dll System.ComponentModel.DataAnnotations.dll System.Data.DataSetExtensions.dll System.Data.Services.Client.dll System.Data.dll System.IO.Compression.FileSystem.dll System.IO.Compression.dll System.IdentityModel.dll System.Json.dll System.Net.Http.WinHttpHandler.dll System.Net.Http.dll System.Net.dll System.Numerics.Vectors.dll System.Numerics.dll System.Reflection.Context.dll System.Runtime.CompilerServices.Unsafe.dll System.Runtime.Serialization.dll System.Security.dll System.ServiceModel.Internals.dll System.ServiceModel.Web.dll System.ServiceModel.dll System.Transactions.dll System.Web.Services.dll System.Windows.dll System.Xml.Linq.dll System.Xml.Serialization.dll
2 Newtonsoft.Json.Test/bin/iPhoneSimulator/Release/Newtonsoft.Json.Test.exe 1824768 1824256 720384 369152 421376 420864 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 35840 0 0 0 0 0 0 0 0 0 0 30720 0
3 System.Core/test-plinq-01.exe 942080 13824 60928 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4 System.Net.Http/test-handler-01.exe 1392128 1391616 86016 8192 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10240 0 0 25600 0 0 0 0 0 0 0 0 0 0 0 0
5 System/test-security.exe 1384960 1384448 64000 8192 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 25600 0 0 0 0 0 0 0 0 0 0 0 0
6 System/test-typeconverter.exe 1033728 80384 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 mscorlib/test-array.exe 874496 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8 mscorlib/test-calendar-01.exe 874496 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
9 mscorlib/test-calendar-02.exe 874496 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
10 mscorlib/test-crypto-01.exe 875008 0 4608 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
11 mscorlib/test-exception-01.exe 874496 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
12 mscorlib/test-locale-01.exe 878592 878080 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
13 mscorlib/test-methodimpl-01.exe 874496 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
14 mscorlib/test-reflection-01.exe 874496 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 mscorlib/test-reflection-02.exe 886784 886272 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 mscorlib/test-reflection-03.exe 997376 996864 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
17 mscorlib/test-reflection-04.exe 886272 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
18 mscorlib/test-string-01.exe 874496 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
19 mscorlib/test-string-02.exe 875008 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+20 -20
View File
@@ -1,23 +1,23 @@
App,mscorlib.dll,System.dll,System.Core.dll,System.Xml.dll,I18N.CJK.dll,I18N.MidEast.dll,I18N.Other.dll,I18N.Rare.dll,I18N.West.dll,I18N.dll,Microsoft.Build.Engine.dll,Microsoft.Build.Framework.dll,Microsoft.Build.Tasks.v4.0.dll,Microsoft.Build.Utilities.v4.0.dll,Microsoft.Build.dll,Microsoft.CSharp.dll,Microsoft.VisualC.dll,Microsoft.Web.Infrastructure.dll,System.ComponentModel.Composition.dll,System.ComponentModel.DataAnnotations.dll,System.Configuration.Install.dll,System.Configuration.dll,System.Data.DataSetExtensions.dll,System.Data.Entity.dll,System.Data.Linq.dll,System.Data.OracleClient.dll,System.Data.Services.Client.dll,System.Data.Services.dll,System.Data.dll,System.Deployment.dll,System.Design.dll,System.DirectoryServices.Protocols.dll,System.DirectoryServices.dll,System.Drawing.Design.dll,System.Drawing.dll,System.Dynamic.dll,System.EnterpriseServices.dll,System.IO.Compression.FileSystem.dll,System.IO.Compression.dll,System.IdentityModel.Selectors.dll,System.IdentityModel.dll,System.Json.Microsoft.dll,System.Json.dll,System.Management.dll,System.Messaging.dll,System.Net.Http.Formatting.dll,System.Net.Http.WebRequest.dll,System.Net.Http.dll,System.Net.dll,System.Numerics.Vectors.dll,System.Numerics.dll,System.Reactive.Core.dll,System.Reactive.Debugger.dll,System.Reactive.Experimental.dll,System.Reactive.Interfaces.dll,System.Reactive.Linq.dll,System.Reactive.Observable.Aliases.dll,System.Reactive.PlatformServices.dll,System.Reactive.Providers.dll,System.Reactive.Runtime.Remoting.dll,System.Reactive.Windows.Forms.dll,System.Reactive.Windows.Threading.dll,System.Reflection.Context.dll,System.Runtime.Caching.dll,System.Runtime.CompilerServices.Unsafe.dll,System.Runtime.DurableInstancing.dll,System.Runtime.Remoting.dll,System.Runtime.Serialization.Formatters.Soap.dll,System.Runtime.Serialization.dll,System.Security.dll,System.ServiceModel.Activation.dll,System.ServiceModel.Discovery.dll,System.ServiceModel.Internals.dll,System.ServiceModel.Routing.dll,System.ServiceModel.Web.dll,System.ServiceModel.dll,System.ServiceProcess.dll,System.Threading.Tasks.Dataflow.dll,System.Transactions.dll,System.Web.Abstractions.dll,System.Web.ApplicationServices.dll,System.Web.DynamicData.dll,System.Web.Extensions.Design.dll,System.Web.Extensions.dll,System.Web.Http.SelfHost.dll,System.Web.Http.WebHost.dll,System.Web.Http.dll,System.Web.Mobile.dll,System.Web.Mvc.dll,System.Web.Razor.dll,System.Web.RegularExpressions.dll,System.Web.Routing.dll,System.Web.Services.dll,System.Web.WebPages.Deployment.dll,System.Web.WebPages.Razor.dll,System.Web.WebPages.dll,System.Web.dll,System.Windows.Forms.DataVisualization.dll,System.Windows.Forms.dll,System.Windows.dll,System.Workflow.Activities.dll,System.Workflow.ComponentModel.dll,System.Workflow.Runtime.dll,System.Xaml.dll,System.Xml.Linq.dll,System.Xml.Serialization.dll
Newtonsoft.Json.Test/bin/Release/Newtonsoft.Json.Test.exe,2366976,1025024,346112,1319424,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56832,0,0,0,0,0,0,622080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6144,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35840,0
System.Core/test-plinq-01.exe,1563136,67072,63488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
System.Core/test-queryable-01.exe,1980416,62464,365056,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
System.Core/test-queryable-02.exe,1980416,62464,365568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
System/test-security.exe,2152960,842240,7168,694272,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51712,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
System/test-typeconverter.exe,1579008,136704,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-array.exe,1556480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-calendar-01.exe,1556480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-calendar-02.exe,1556480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-exception-01.exe,1556480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Newtonsoft.Json.Test/bin/Release/Newtonsoft.Json.Test.exe,2366464,1024512,346112,1319424,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56832,0,0,0,0,0,0,622080,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6144,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,35840,0
System.Core/test-plinq-01.exe,1562624,67072,63488,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
System.Core/test-queryable-01.exe,1979904,62464,365056,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
System.Core/test-queryable-02.exe,1979904,62464,365568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
System/test-security.exe,2152448,841728,7168,694272,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51712,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
System/test-typeconverter.exe,1578496,136704,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-array.exe,1555968,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-calendar-01.exe,1555968,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-calendar-02.exe,1555968,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-exception-01.exe,1555968,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-locale-01.exe,1558528,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-methodimpl-01.exe,1556480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-01.exe,1556480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-02.exe,1566208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-03.exe,1658368,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-methodimpl-01.exe,1555968,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-01.exe,1555968,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-02.exe,1565696,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-03.exe,1657856,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-04.exe,1565696,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection.exe,1943552,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-remoting.exe,1556480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-string-01.exe,1556480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-string-02.exe,1556480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-string-03.exe,1561088,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-task-01.exe,1560576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection.exe,1943040,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-remoting.exe,1555968,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-string-01.exe,1555968,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-string-02.exe,1555968,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-string-03.exe,1560576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-task-01.exe,1560064,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1 App mscorlib.dll System.dll System.Core.dll System.Xml.dll I18N.CJK.dll I18N.MidEast.dll I18N.Other.dll I18N.Rare.dll I18N.West.dll I18N.dll Microsoft.Build.Engine.dll Microsoft.Build.Framework.dll Microsoft.Build.Tasks.v4.0.dll Microsoft.Build.Utilities.v4.0.dll Microsoft.Build.dll Microsoft.CSharp.dll Microsoft.VisualC.dll Microsoft.Web.Infrastructure.dll System.ComponentModel.Composition.dll System.ComponentModel.DataAnnotations.dll System.Configuration.Install.dll System.Configuration.dll System.Data.DataSetExtensions.dll System.Data.Entity.dll System.Data.Linq.dll System.Data.OracleClient.dll System.Data.Services.Client.dll System.Data.Services.dll System.Data.dll System.Deployment.dll System.Design.dll System.DirectoryServices.Protocols.dll System.DirectoryServices.dll System.Drawing.Design.dll System.Drawing.dll System.Dynamic.dll System.EnterpriseServices.dll System.IO.Compression.FileSystem.dll System.IO.Compression.dll System.IdentityModel.Selectors.dll System.IdentityModel.dll System.Json.Microsoft.dll System.Json.dll System.Management.dll System.Messaging.dll System.Net.Http.Formatting.dll System.Net.Http.WebRequest.dll System.Net.Http.dll System.Net.dll System.Numerics.Vectors.dll System.Numerics.dll System.Reactive.Core.dll System.Reactive.Debugger.dll System.Reactive.Experimental.dll System.Reactive.Interfaces.dll System.Reactive.Linq.dll System.Reactive.Observable.Aliases.dll System.Reactive.PlatformServices.dll System.Reactive.Providers.dll System.Reactive.Runtime.Remoting.dll System.Reactive.Windows.Forms.dll System.Reactive.Windows.Threading.dll System.Reflection.Context.dll System.Runtime.Caching.dll System.Runtime.CompilerServices.Unsafe.dll System.Runtime.DurableInstancing.dll System.Runtime.Remoting.dll System.Runtime.Serialization.Formatters.Soap.dll System.Runtime.Serialization.dll System.Security.dll System.ServiceModel.Activation.dll System.ServiceModel.Discovery.dll System.ServiceModel.Internals.dll System.ServiceModel.Routing.dll System.ServiceModel.Web.dll System.ServiceModel.dll System.ServiceProcess.dll System.Threading.Tasks.Dataflow.dll System.Transactions.dll System.Web.Abstractions.dll System.Web.ApplicationServices.dll System.Web.DynamicData.dll System.Web.Extensions.Design.dll System.Web.Extensions.dll System.Web.Http.SelfHost.dll System.Web.Http.WebHost.dll System.Web.Http.dll System.Web.Mobile.dll System.Web.Mvc.dll System.Web.Razor.dll System.Web.RegularExpressions.dll System.Web.Routing.dll System.Web.Services.dll System.Web.WebPages.Deployment.dll System.Web.WebPages.Razor.dll System.Web.WebPages.dll System.Web.dll System.Windows.Forms.DataVisualization.dll System.Windows.Forms.dll System.Windows.dll System.Workflow.Activities.dll System.Workflow.ComponentModel.dll System.Workflow.Runtime.dll System.Xaml.dll System.Xml.Linq.dll System.Xml.Serialization.dll
2 Newtonsoft.Json.Test/bin/Release/Newtonsoft.Json.Test.exe 2366976 2366464 1025024 1024512 346112 1319424 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 56832 0 0 0 0 0 0 622080 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 36864 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6144 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 35840 0
3 System.Core/test-plinq-01.exe 1563136 1562624 67072 63488 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4 System.Core/test-queryable-01.exe 1980416 1979904 62464 365056 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5 System.Core/test-queryable-02.exe 1980416 1979904 62464 365568 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
6 System/test-security.exe 2152960 2152448 842240 841728 7168 694272 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 51712 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 25600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 System/test-typeconverter.exe 1579008 1578496 136704 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8 mscorlib/test-array.exe 1556480 1555968 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
9 mscorlib/test-calendar-01.exe 1556480 1555968 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
10 mscorlib/test-calendar-02.exe 1556480 1555968 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
11 mscorlib/test-exception-01.exe 1556480 1555968 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
12 mscorlib/test-locale-01.exe 1558528 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
13 mscorlib/test-methodimpl-01.exe 1556480 1555968 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
14 mscorlib/test-reflection-01.exe 1556480 1555968 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 mscorlib/test-reflection-02.exe 1566208 1565696 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 mscorlib/test-reflection-03.exe 1658368 1657856 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
17 mscorlib/test-reflection-04.exe 1565696 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
18 mscorlib/test-reflection.exe 1943552 1943040 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
19 mscorlib/test-remoting.exe 1556480 1555968 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
20 mscorlib/test-string-01.exe 1556480 1555968 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
21 mscorlib/test-string-02.exe 1556480 1555968 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
22 mscorlib/test-string-03.exe 1561088 1560576 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
23 mscorlib/test-task-01.exe 1560576 1560064 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+23 -23
View File
@@ -1,24 +1,24 @@
App,mscorlib.dll,System.dll,System.Core.dll,System.Xml.dll,I18N.CJK.dll,I18N.MidEast.dll,I18N.Other.dll,I18N.Rare.dll,I18N.West.dll,I18N.dll,Microsoft.CSharp.dll,System.ComponentModel.Composition.dll,System.ComponentModel.DataAnnotations.dll,System.Data.DataSetExtensions.dll,System.Data.dll,System.IO.Compression.FileSystem.dll,System.IO.Compression.dll,System.Net.Http.dll,System.Numerics.Vectors.dll,System.Numerics.dll,System.Runtime.CompilerServices.Unsafe.dll,System.Runtime.Serialization.dll,System.Security.dll,System.ServiceModel.Internals.dll,System.Transactions.dll,System.Xml.Linq.dll
BlazingPizza.Client/bin/Release/netstandard2.0/BlazingPizza.Client.dll,1122304,67072,286208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,3072,0,0,0,0,0
HelloWorld/bin/Release/netstandard2.0/dist/_framework/_bin/HelloWorld.dll,1110016,67072,284672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,0,0,0,0,0,0
Microsoft.AspNetCore.Blazor.E2EPerformance/bin/Release/netstandard2.0/Microsoft.AspNetCore.Blazor.E2EPerformance.dll,1155584,68608,286208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,0,0,0,0,0,0
Newtonsoft/bin/Release/netstandard2.0/dist/_framework/_bin/Newtonsoft.dll,1110016,67072,284672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,0,0,0,0,0,0
System.Core/test-plinq-01.exe,535040,12288,60928,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
System.Net.Http/test-handler-01.exe,713216,38400,7168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6656,0,0,0,0,0,0,0,0
System/test-security.exe,1039360,60416,26624,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0
System/test-typeconverter.exe,648704,78848,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-array.exe,450560,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-calendar-01.exe,450560,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-calendar-02.exe,450560,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-crypto-01.exe,833024,11776,24576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-exception-01.exe,450560,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-locale-01.exe,458752,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-methodimpl-01.exe,450560,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-01.exe,450560,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-02.exe,462336,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-03.exe,599040,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-04.exe,461824,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-string-01.exe,450560,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-string-02.exe,450560,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-string-03.exe,466944,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-task-01.exe,532992,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
BlazingPizza.Client/bin/Release/netstandard2.0/BlazingPizza.Client.dll,1491968,67072,286208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,3072,0,0,0,0,0
HelloWorld/bin/Release/netstandard2.0/dist/_framework/_bin/HelloWorld.dll,1479680,67072,284672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,0,0,0,0,0,0
Microsoft.AspNetCore.Blazor.E2EPerformance/bin/Release/netstandard2.0/Microsoft.AspNetCore.Blazor.E2EPerformance.dll,1529856,68608,286208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,0,0,0,0,0,0
Newtonsoft/bin/Release/netstandard2.0/dist/_framework/_bin/Newtonsoft.dll,1479680,67072,284672,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8704,0,0,0,0,0,0,0,0
System.Core/test-plinq-01.exe,975360,12288,60928,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
System.Net.Http/test-handler-01.exe,1085440,38400,7168,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6656,0,0,0,0,0,0,0,0
System/test-security.exe,1414144,60416,26624,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25600,0,0,0,0,0,0
System/test-typeconverter.exe,1135104,78848,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-array.exe,969216,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-calendar-01.exe,969216,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-calendar-02.exe,969216,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-crypto-01.exe,1210880,11776,24576,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-exception-01.exe,969216,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-locale-01.exe,971264,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-methodimpl-01.exe,969216,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-01.exe,969216,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-02.exe,980480,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-03.exe,990208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-reflection-04.exe,979968,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-string-01.exe,969216,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-string-02.exe,969216,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-string-03.exe,977920,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mscorlib/test-task-01.exe,972800,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1 App mscorlib.dll System.dll System.Core.dll System.Xml.dll I18N.CJK.dll I18N.MidEast.dll I18N.Other.dll I18N.Rare.dll I18N.West.dll I18N.dll Microsoft.CSharp.dll System.ComponentModel.Composition.dll System.ComponentModel.DataAnnotations.dll System.Data.DataSetExtensions.dll System.Data.dll System.IO.Compression.FileSystem.dll System.IO.Compression.dll System.Net.Http.dll System.Numerics.Vectors.dll System.Numerics.dll System.Runtime.CompilerServices.Unsafe.dll System.Runtime.Serialization.dll System.Security.dll System.ServiceModel.Internals.dll System.Transactions.dll System.Xml.Linq.dll
2 BlazingPizza.Client/bin/Release/netstandard2.0/BlazingPizza.Client.dll 1122304 1491968 67072 286208 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8704 0 0 3072 0 0 0 0 0
3 HelloWorld/bin/Release/netstandard2.0/dist/_framework/_bin/HelloWorld.dll 1110016 1479680 67072 284672 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8704 0 0 0 0 0 0 0 0
4 Microsoft.AspNetCore.Blazor.E2EPerformance/bin/Release/netstandard2.0/Microsoft.AspNetCore.Blazor.E2EPerformance.dll 1155584 1529856 68608 286208 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8704 0 0 0 0 0 0 0 0
5 Newtonsoft/bin/Release/netstandard2.0/dist/_framework/_bin/Newtonsoft.dll 1110016 1479680 67072 284672 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8704 0 0 0 0 0 0 0 0
6 System.Core/test-plinq-01.exe 535040 975360 12288 60928 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 System.Net.Http/test-handler-01.exe 713216 1085440 38400 7168 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6656 0 0 0 0 0 0 0 0
8 System/test-security.exe 1039360 1414144 60416 26624 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 25600 0 0 0 0 0 0
9 System/test-typeconverter.exe 648704 1135104 78848 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
10 mscorlib/test-array.exe 450560 969216 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
11 mscorlib/test-calendar-01.exe 450560 969216 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
12 mscorlib/test-calendar-02.exe 450560 969216 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
13 mscorlib/test-crypto-01.exe 833024 1210880 11776 24576 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
14 mscorlib/test-exception-01.exe 450560 969216 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 mscorlib/test-locale-01.exe 458752 971264 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 mscorlib/test-methodimpl-01.exe 450560 969216 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
17 mscorlib/test-reflection-01.exe 450560 969216 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
18 mscorlib/test-reflection-02.exe 462336 980480 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
19 mscorlib/test-reflection-03.exe 599040 990208 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
20 mscorlib/test-reflection-04.exe 461824 979968 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
21 mscorlib/test-string-01.exe 450560 969216 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
22 mscorlib/test-string-02.exe 450560 969216 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
23 mscorlib/test-string-03.exe 466944 977920 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
24 mscorlib/test-task-01.exe 532992 972800 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+3 -1
View File
@@ -72,7 +72,9 @@ Options:
return new ResourceReader (stream);
case ".resx":
var reader = new ResXResourceReader (stream);
reader.BasePath = Path.GetDirectoryName (name);
if (useSourcePath) {
reader.BasePath = Path.GetDirectoryName (name);
}
return reader;
default:
throw new Exception ("Unknown format in file " + name);
@@ -0,0 +1,346 @@
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using Mono.Cecil;
//
// This class generates the icall_trampoline_dispatch () function used by the interpreter to call native code on WASM.
// It should be kept in sync with mono_wasm_interp_to_native_trampoline () in the runtime.
//
class InterpToNativeGenerator {
// Default set of signatures
static string[] cookies = new string[] {
"V",
"VI",
"VII",
"VIII",
"VIIII",
"VIIIII",
"VIIIIII",
"VIIIIIII",
"VIIIIIIII",
"VIIIIIIIII",
"VIIIIIIIIII",
"VIIIIIIIIIII",
"VIIIIIIIIIIII",
"VIIIIIIIIIIIII",
"VIIIIIIIIIIIIII",
"VIIIIIIIIIIIIIII",
"I",
"II",
"III",
"IIII",
"IIIII",
"IIIIII",
"IIIIIII",
"IIIIIIII",
"IIIIIIIII",
"IIIIIIIIII",
"IIIIIIIIIII",
"IIIIIIIIIIII",
"IIIIIIIIIIIII",
"IIIIIIIIIIIIII",
"IILIIII",
"IIIL",
"IF",
"ID",
"IIF",
"IIFI",
"IIFF",
"IFFII",
"IIFII",
"IIFFI",
"IIFFF",
"IIFFFI",
"IIFFII",
"IIFIII",
"IIFFFFI",
"IIFFFFII",
"IIIF",
"IIIFI",
"IIIFII",
"IIIFIII",
"IIIIF",
"IIIIFI",
"IIIIFII",
"IIIIFIII",
"IIIFFFF",
"IIIFFFFF",
"IIFFFFFF",
"IIIFFFFFF",
"IIIIIIIF",
"IIIIIIIFF",
"IIFFFFFFFF",
"IIIFFFFFFFF",
"IIIIIIFII",
"IIIFFFFFFFFIII",
"IIIIIFFFFIIII",
"IFFFFFFI",
"IIFFIII",
"ILI",
"IILLI",
"L",
"LL",
"LI",
"LIL",
"LILI",
"LILII",
"DD",
"DDI",
"DDD",
"DDDD",
"VF",
"VFF",
"VFFF",
"VFFFF",
"VFFFFF",
"VFFFFFF",
"VFFFFFFF",
"VFFFFFFFF",
"VFI",
"VIF",
"VIFF",
"VIFFFF",
"VIFFFFF",
"VIFFFFFF",
"VIFFFFFI",
"VIIFFI",
"VIIF",
"VIIFFF",
"VIIFI",
"FF",
"FFI",
"FFF",
"FFFF",
"DI",
"FI",
"IIL",
"IILI",
"IILIIIL",
"IILLLI",
"IDIII",
"LII",
"VID",
"VILLI",
"DID",
"DIDD",
"FIF",
"FIFF",
"LILL",
"VL",
"VIL",
"VIIL",
"FIFFF",
"FII",
"FIII",
"FIIIIII",
"IFFFFIIII",
"IFFI",
"IFFIF",
"IFFIFI",
"IFI",
"IFIII",
"IIFIFIIIII",
"IIFIFIIIIII",
"IIFIIIII",
"IIFIIIIII",
"IIIFFFII",
"IIIFFIFFFII",
"IIIFFIFFII",
"IIIFFII",
"IIIFFIIIII",
"IIIIIF",
"IIIIIFII",
"IIIIIIFFI",
"IIIIIIIFFI",
"VIFFF",
"VIFFFFI",
"VIFFFI",
"VIFFFIIFF",
"VIFFI",
"VIFI",
"VIIFF",
"VIIFFFF",
"VIIFFII",
"VIIIF",
"VIIIFFII",
"VIIIFFIII",
"VIIIFII",
"VIIIFIII",
"VIIIIF",
"IFFFFIII",
"IFFIII",
"VIIIIFFII",
"IIILIIII",
"IIILLI",
"IL",
"IFF",
"IFFF",
"IFFFF",
"VLII",
};
static string TypeToSigType (char c) {
switch (c) {
case 'V': return "void";
case 'I': return "int";
case 'L': return "gint64";
case 'F': return "float";
case 'D': return "double";
default:
throw new Exception ("Can't handle " + c);
}
}
List<string> extra_signatures;
public InterpToNativeGenerator () {
extra_signatures = new List<string> ();
}
static char typeToChar (TypeReference type) {
switch (type.MetadataType) {
case MetadataType.Void:
return 'V';
case MetadataType.Boolean:
case MetadataType.Char:
case MetadataType.SByte:
case MetadataType.Byte:
case MetadataType.Int16:
case MetadataType.UInt16:
case MetadataType.Int32:
case MetadataType.UInt32:
case MetadataType.IntPtr:
case MetadataType.UIntPtr:
return 'I';
case MetadataType.Int64:
case MetadataType.UInt64:
return 'L';
case MetadataType.Single:
return 'F';
case MetadataType.Double:
return 'D';
case MetadataType.String:
case MetadataType.Pointer:
case MetadataType.ByReference:
case MetadataType.Object:
case MetadataType.Class:
case MetadataType.Array:
return 'I';
case MetadataType.ValueType:
return 'I';
default:
throw new Exception ("Can't handle type '" + type.FullName + "' (" + type.MetadataType + ").");
}
}
// Add an extra signature for a pinvoke method
public void AddSignature (MethodReference Method) {
var sb = new StringBuilder ();
sb.Append (typeToChar (Method.ReturnType));
foreach (var par in Method.Parameters)
sb.Append (typeToChar (par.ParameterType));
extra_signatures.Add (sb.ToString ());
}
public void Emit (StreamWriter w) {
w.WriteLine ("/*");
w.WriteLine ("* GENERATED FILE, DON'T EDIT");
w.WriteLine ("* Generated by wasm-tuner.exe --gen-interp-to-native");
w.WriteLine ("*/");
var added = new HashSet<string> ();
var l = new List<string> ();
foreach (var c in cookies) {
l.Add (c);
added.Add (c);
}
foreach (var c in extra_signatures) {
if (!added.Contains (c)) {
l.Add (c);
added.Add (c);
}
}
var signatures = l.ToArray ();
foreach (var c in signatures) {
w.WriteLine ("static void");
w.WriteLine ($"wasm_invoke_{c.ToLower ()} (void *target_func, InterpMethodArguments *margs)");
w.WriteLine ("{");
w.Write ($"\ttypedef {TypeToSigType (c [0])} (*T)(");
for (int i = 1; i < c.Length; ++i) {
char p = c [i];
if (i > 1)
w.Write (", ");
w.Write ($"{TypeToSigType (p)} arg_{i - 1}");
}
if (c.Length == 1)
w.Write ("void");
w.WriteLine (");\n\tT func = (T)target_func;");
var ctx = new EmitCtx ();
w.Write ("\t");
if (c [0] != 'V')
w.Write ($"{TypeToSigType (c [0])} res = ");
w.Write ("func (");
for (int i = 1; i < c.Length; ++i) {
char p = c [i];
if (i > 1)
w.Write (", ");
w.Write (ctx.Emit (p));
}
w.WriteLine (");");
if (c [0] != 'V')
w.WriteLine ($"\t*({TypeToSigType (c [0])}*)margs->retval = res;");
w.WriteLine ("\n}\n");
}
Array.Sort (signatures);
w.WriteLine ("static const char* interp_to_native_signatures [] = {");
foreach (var sig in signatures)
w.WriteLine ($"\"{sig}\",");
w.WriteLine ("};");
w.WriteLine ("static void* interp_to_native_invokes [] = {");
foreach (var sig in signatures) {
var lsig = sig.ToLower ();
w.WriteLine ($"wasm_invoke_{lsig},");
}
w.WriteLine ("};");
}
class EmitCtx
{
int iarg, farg;
public string Emit (char c) {
switch (c) {
case 'I':
iarg += 1;
return $"(int)(gssize)margs->iargs [{iarg - 1}]";
case 'F':
farg += 1;
return $"*(float*)&margs->fargs [FIDX ({farg - 1})]";
case 'L':
iarg += 2;
return $"get_long_arg (margs, {iarg - 2})";
case 'D':
farg += 1;
return $"margs->fargs [FIDX ({farg - 1})]";
default:
throw new Exception ("IDK how to handle " + c);
}
}
}
}
@@ -0,0 +1,303 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Json;
using System.Collections.Generic;
using Mono.Cecil;
public class PInvokeTableGenerator
{
public PInvokeTableGenerator () {
}
List<AssemblyDefinition> assemblies;
Dictionary<string, string> modules;
List<Pinvoke> pinvokes;
List<PinvokeCallback> callbacks;
public void Run (List<AssemblyDefinition> assemblies, Dictionary<string, string> modules) {
this.assemblies = assemblies;
this.modules = modules;
CollectPInvokes (assemblies, out pinvokes, out callbacks);
Console.WriteLine ("// GENERATED FILE, DO NOT MODIFY");
Console.WriteLine ();
GenPInvokeTable ();
GenNativeToInterp ();
}
void GenPInvokeTable () {
var decls = new Dictionary<string, Pinvoke> ();
foreach (var pinvoke in pinvokes) {
if (modules.ContainsKey (pinvoke.Module)) {
pinvoke.CDecl = GenPinvokeDecl (pinvoke);
if (decls.TryGetValue (pinvoke.EntryPoint, out Pinvoke prev_pinvoke)) {
if (pinvoke.CDecl != prev_pinvoke.CDecl) {
Console.Error.WriteLine ($"Warning: PInvoke method '{pinvoke.EntryPoint}' has incompatible declarations.");
pinvoke.TableEntryPoint = "mono_wasm_pinvoke_vararg_stub";
prev_pinvoke.TableEntryPoint = "mono_wasm_pinvoke_vararg_stub";
continue;
}
}
decls [pinvoke.EntryPoint] = pinvoke;
Console.WriteLine (pinvoke.CDecl);
}
}
foreach (var module in modules.Keys) {
string symbol = module.Replace (".", "_") + "_imports";
Console.WriteLine ("static PinvokeImport " + symbol + " [] = {");
foreach (var pinvoke in pinvokes) {
if (pinvoke.Module == module)
Console.WriteLine ("{\"" + pinvoke.EntryPoint + "\", " + pinvoke.TableEntryPoint + "},");
}
Console.WriteLine ("{NULL, NULL}");
Console.WriteLine ("};");
}
Console.Write ("static void *pinvoke_tables[] = { ");
foreach (var module in modules.Keys) {
string symbol = module.Replace (".", "_") + "_imports";
Console.Write (symbol + ",");
}
Console.WriteLine ("};");
Console.Write ("static char *pinvoke_names[] = { ");
foreach (var module in modules.Keys) {
Console.Write ("\"" + module + "\"" + ",");
}
Console.WriteLine ("};");
}
void GenNativeToInterp () {
// Generate native->interp entry functions
// These are called by native code, so they need to obtain
// the interp entry function/arg from a global array
// They also need to have a signature matching what the
// native code expects, which is the native signature
// of the delegate invoke in the [MonoPInvokeCallback]
// attribute.
// Only blittable parameter/return types are supposed.
int cb_index = 0;
// Arguments to interp entry functions in the runtime
Console.WriteLine ("InterpFtnDesc wasm_native_to_interp_ftndescs[" + callbacks.Count + "];");
foreach (var cb in callbacks) {
var method = cb.Method;
if (!IsBlittable (method.ReturnType))
Error ("The return type of pinvoke callback method '" + method.FullName + "' needs to be blittable.");
foreach (var p in method.Parameters) {
if (!IsBlittable (p.ParameterType))
Error ("Parameter types of pinvoke callback method '" + method.FullName + "' needs to be blittable.");
}
}
foreach (var cb in callbacks) {
var sb = new StringBuilder ();
var method = cb.Method;
// The signature of the interp entry function
// This is a gsharedvt_in signature
sb.Append ("typedef void ");
sb.Append (" (*WasmInterpEntrySig_" + cb_index + ") (");
int pindex = 0;
if (method.ReturnType.Name != "Void") {
sb.Append ("int");
pindex ++;
}
foreach (var p in method.Parameters) {
if (pindex > 0)
sb.Append (",");
sb.Append ("int");
pindex ++;
}
if (pindex > 0)
sb.Append (",");
// Extra arg
sb.Append ("int");
sb.Append (");\n");
bool is_void = method.ReturnType.Name == "Void";
string module_symbol = method.DeclaringType.Module.Assembly.Name.Name.Replace (".", "_");
var token = method.MetadataToken.ToUInt32 ();
string entry_name = $"wasm_native_to_interp_{module_symbol}_{token}";
cb.EntryName = entry_name;
sb.Append (WasmTuner.MapType (method.ReturnType));
sb.Append ($" {entry_name} (");
pindex = 0;
foreach (var p in method.Parameters) {
if (pindex > 0)
sb.Append (",");
sb.Append (WasmTuner.MapType (method.Parameters [pindex].ParameterType));
sb.Append (" arg" + pindex);
pindex ++;
}
sb.Append (") { \n");
if (!is_void)
sb.Append (WasmTuner.MapType (method.ReturnType) + " res;\n");
sb.Append ("((WasmInterpEntrySig_" + cb_index + ")wasm_native_to_interp_ftndescs [" + cb_index + "].func) (");
pindex = 0;
if (!is_void) {
sb.Append ("&res");
pindex ++;
}
int aindex = 0;
foreach (var p in method.Parameters) {
if (pindex > 0)
sb.Append (", ");
sb.Append ("&arg" + aindex);
pindex ++;
aindex ++;
}
if (pindex > 0)
sb.Append (", ");
sb.Append ($"wasm_native_to_interp_ftndescs [{cb_index}].arg");
sb.Append (");\n");
if (!is_void)
sb.Append ("return res;\n");
sb.Append ("}");
Console.WriteLine (sb);
cb_index ++;
}
// Array of function pointers
Console.Write ("static void *wasm_native_to_interp_funcs[] = { ");
foreach (var cb in callbacks) {
Console.Write (cb.EntryName + ",");
}
Console.WriteLine ("};");
// Lookup table from method->interp entry
// The key is a string of the form <assembly name>_<method token>
// FIXME: Use a better encoding
Console.Write ("static const char *wasm_native_to_interp_map[] = { ");
foreach (var cb in callbacks) {
var method = cb.Method;
string module_symbol = method.DeclaringType.Module.Assembly.Name.Name.Replace (".", "_");
var token = method.MetadataToken.ToUInt32 ();
Console.WriteLine ($"\"{module_symbol}_{token}\",");
}
Console.WriteLine ("};");
}
static bool IsBlittable (TypeReference type) {
switch (type.MetadataType) {
case MetadataType.Void:
case MetadataType.Char:
case MetadataType.Boolean:
case MetadataType.Byte:
case MetadataType.SByte:
case MetadataType.Int16:
case MetadataType.UInt16:
case MetadataType.Int32:
case MetadataType.UInt32:
case MetadataType.Int64:
case MetadataType.UInt64:
case MetadataType.IntPtr:
case MetadataType.UIntPtr:
case MetadataType.Single:
case MetadataType.Double:
case MetadataType.Pointer:
case MetadataType.ByReference:
return true;
case MetadataType.ValueType: {
var tdef = type.Resolve ();
return tdef != null && tdef.IsEnum;
}
default:
return false;
}
}
static void Error (string msg) {
Console.Error.WriteLine (msg);
Environment.Exit (1);
}
public static void CollectPInvokes (List<AssemblyDefinition> assemblies, out List<Pinvoke> pinvokes, out List<PinvokeCallback> callbacks) {
pinvokes = new List<Pinvoke> ();
callbacks = new List<PinvokeCallback> ();
foreach (var assembly in assemblies) {
foreach (var type in assembly.MainModule.Types) {
ProcessTypeForPinvoke (pinvokes, callbacks, type);
foreach (var nested in type.NestedTypes)
ProcessTypeForPinvoke (pinvokes, callbacks, nested);
}
}
}
static void ProcessTypeForPinvoke (List<Pinvoke> pinvokes, List<PinvokeCallback> callbacks, TypeDefinition type) {
foreach (var method in type.Methods) {
var info = method.PInvokeInfo;
if (info != null) {
pinvokes.Add (new Pinvoke (info.EntryPoint, info.Module.Name, method));
}
foreach (var attr in method.CustomAttributes) {
// The type has no defined namespace
if (attr.Constructor.DeclaringType.Name == "MonoPInvokeCallbackAttribute") {
if (!method.IsStatic)
Error ($"Method '{method.FullName}' decored with [MonoPInvokeCallback] needs to be static.");
var callback_type = attr.ConstructorArguments [0];
if (callback_type.Type.Name != "Type" || callback_type.Value == null)
Error ("[MonoPInvokeCallback] attribute has invalid format.");
var tref = (TypeReference)callback_type.Value;
callbacks.Add (new PinvokeCallback (method, tref));
} else if (attr.Constructor.DeclaringType.Name == "UnmanagedCallersOnlyAttribute") {
callbacks.Add (new PinvokeCallback (method, null));
}
}
}
}
static string GenPinvokeDecl (Pinvoke pinvoke) {
var sb = new StringBuilder ();
var method = pinvoke.Method;
sb.Append (WasmTuner.MapType (method.ReturnType));
sb.Append ($" {pinvoke.EntryPoint} (");
int pindex = 0;
foreach (var p in method.Parameters) {
if (pindex > 0)
sb.Append (",");
sb.Append (WasmTuner.MapType (method.Parameters [pindex].ParameterType));
pindex ++;
}
sb.Append (");");
return sb.ToString ();
}
}
public class Pinvoke
{
public Pinvoke (string entry_point, string module, MethodReference method) {
EntryPoint = entry_point;
TableEntryPoint = entry_point;
Module = module;
Method = method;
}
public string EntryPoint;
public string TableEntryPoint;
public string Module;
public MethodReference Method;
public string CDecl;
}
public class PinvokeCallback
{
public PinvokeCallback (MethodReference method, TypeReference callback_type) {
Method = method;
CallbackType = callback_type;
}
public MethodReference Method;
public TypeReference CallbackType;
public string EntryName;
}
+47 -86
View File
@@ -40,19 +40,6 @@ class IcallClass {
public Dictionary<string, Icall> Icalls;
}
class Pinvoke
{
public Pinvoke (string entry_point, string module, MethodReference method) {
EntryPoint = entry_point;
Module = module;
Method = method;
}
public string EntryPoint;
public string Module;
public MethodReference Method;
}
public class WasmTuner
{
public static int Main (String[] args) {
@@ -63,8 +50,6 @@ public class WasmTuner
Dictionary<string, IcallClass> runtime_icalls;
List<Pinvoke> pinvokes;
// Read the icall table generated by mono --print-icall-table
void ReadTable (string filename) {
JsonValue json;
@@ -97,6 +82,7 @@ public class WasmTuner
Console.WriteLine ("Arguments:");
Console.WriteLine ("--gen-icall-table icall-table.json <assemblies>.");
Console.WriteLine ("--gen-pinvoke-table <list of native library names separated by commas> <assemblies>.");
Console.WriteLine ("--gen-interp-to-native <output file name> <assemblies>.");
Console.WriteLine ("--gen-empty-assemblies <filenames>.");
}
@@ -116,13 +102,15 @@ public class WasmTuner
return GenPinvokeTable (args);
} else if (cmd == "--gen-empty-assemblies") {
return GenEmptyAssemblies (args);
} else if (cmd == "--gen-interp-to-native") {
return GenInterpToNative (args);
} else {
Usage ();
return 1;
}
}
static string MapType (TypeReference t) {
public static string MapType (TypeReference t) {
if (t.Name == "Void")
return "void";
else if (t.Name == "Double")
@@ -137,83 +125,25 @@ public class WasmTuner
return "int";
}
static string GenPinvokeDecl (Pinvoke pinvoke) {
var sb = new StringBuilder ();
var method = pinvoke.Method;
sb.Append (MapType (method.ReturnType));
sb.Append ($" {pinvoke.EntryPoint} (");
int pindex = 0;
foreach (var p in method.Parameters) {
if (pindex > 0)
sb.Append (",");
sb.Append (MapType (method.Parameters [pindex].ParameterType));
pindex ++;
}
sb.Append (");");
return sb.ToString ();
}
int GenPinvokeTable (String[] args) {
var modules = new Dictionary<string, string> ();
foreach (var module in args [1].Split (','))
modules [module] = module;
args = args.Skip (2).ToArray ();
pinvokes = new List<Pinvoke> ();
foreach (var fname in args) {
var a = AssemblyDefinition.ReadAssembly (fname);
var assemblies = new List<AssemblyDefinition> ();
foreach (var fname in args)
assemblies.Add (AssemblyDefinition.ReadAssembly (fname));
foreach (var type in a.MainModule.Types) {
ProcessTypeForPinvoke (type);
foreach (var nested in type.NestedTypes)
ProcessTypeForPinvoke (nested);
}
}
Console.WriteLine ("// GENERATED FILE, DO NOT MODIFY");
Console.WriteLine ("typedef struct {");
Console.WriteLine ("const char *name;");
Console.WriteLine ("void *func;");
Console.WriteLine ("} PinvokeImport;");
Console.WriteLine ();
foreach (var pinvoke in pinvokes) {
if (modules.ContainsKey (pinvoke.Module))
Console.WriteLine (GenPinvokeDecl (pinvoke));
}
foreach (var module in modules.Keys) {
string symbol = module.Replace (".", "_") + "_imports";
Console.WriteLine ("static PinvokeImport " + symbol + " [] = {");
foreach (var pinvoke in pinvokes) {
if (pinvoke.Module == module)
Console.WriteLine ("{\"" + pinvoke.EntryPoint + "\", " + pinvoke.EntryPoint + "},");
}
Console.WriteLine ("{NULL, NULL}");
Console.WriteLine ("};");
}
Console.Write ("static void *pinvoke_tables[] = { ");
foreach (var module in modules.Keys) {
string symbol = module.Replace (".", "_") + "_imports";
Console.Write (symbol + ",");
}
Console.WriteLine ("};");
Console.Write ("static char *pinvoke_names[] = { ");
foreach (var module in modules.Keys) {
Console.Write ("\"" + module + "\"" + ",");
}
Console.WriteLine ("};");
var generator = new PInvokeTableGenerator ();
generator.Run (assemblies, modules);
return 0;
}
void ProcessTypeForPinvoke (TypeDefinition type) {
foreach (var method in type.Methods) {
var info = method.PInvokeInfo;
if (info == null)
continue;
pinvokes.Add (new Pinvoke (info.EntryPoint, info.Module.Name, method));
}
void Error (string msg) {
Console.Error.WriteLine (msg);
Environment.Exit (1);
}
static string GenIcallDecl (Icall icall) {
@@ -274,21 +204,26 @@ public class WasmTuner
var sorted = icalls.Where (i => i.Assembly == assembly).ToArray ();
Array.Sort (sorted);
Console.WriteLine ($"#define ICALL_TABLE_{assembly} 1\n");
string aname;
if (assembly == "mscorlib" || assembly == "System.Private.CoreLib")
aname = "corlib";
else
aname = assembly.Replace (".", "_");
Console.WriteLine ($"#define ICALL_TABLE_{aname} 1\n");
Console.WriteLine ($"static int {assembly}_icall_indexes [] = {{");
Console.WriteLine ($"static int {aname}_icall_indexes [] = {{");
foreach (var icall in sorted)
Console.WriteLine (String.Format ("{0},", icall.TokenIndex));
Console.WriteLine ("};");
foreach (var icall in sorted)
Console.WriteLine (GenIcallDecl (icall));
Console.WriteLine ($"static void *{assembly}_icall_funcs [] = {{");
Console.WriteLine ($"static void *{aname}_icall_funcs [] = {{");
foreach (var icall in sorted) {
Console.WriteLine (String.Format ("// token {0},", icall.TokenIndex));
Console.WriteLine (String.Format ("{0},", icall.Func));
}
Console.WriteLine ("};");
Console.WriteLine ($"static uint8_t {assembly}_icall_handles [] = {{");
Console.WriteLine ($"static uint8_t {aname}_icall_handles [] = {{");
foreach (var icall in sorted)
Console.WriteLine (String.Format ("{0},", icall.Handles ? "1" : "0"));
Console.WriteLine ("};");
@@ -426,4 +361,30 @@ public class WasmTuner
}
return 0;
}
int GenInterpToNative (String[] args) {
if (args.Length < 2) {
Usage ();
return 1;
}
string outfileName = args [1];
args = args.Skip (2).ToArray ();
var assemblies = new List<AssemblyDefinition> ();
foreach (var fname in args)
assemblies.Add (AssemblyDefinition.ReadAssembly (fname));
List<Pinvoke> pinvokes;
List<PinvokeCallback> callbacks;
PInvokeTableGenerator.CollectPInvokes (assemblies, out pinvokes, out callbacks);
var gen = new InterpToNativeGenerator ();
foreach (var pinvoke in pinvokes)
gen.AddSignature (pinvoke.Method);
using (var w = File.CreateText (outfileName)) {
gen.Emit (w);
}
return 0;
}
}
+2
View File
@@ -53,6 +53,8 @@
<Compile Include="..\..\build\common\Consts.cs" />
<Compile Include="..\..\build\common\SR.cs" />
<Compile Include="..\..\class\System.Json\corefx\SR.cs" />
<Compile Include="InterpToNativeGenerator.cs" />
<Compile Include="PInvokeTableGenerator.cs" />
<Compile Include="tuner.cs" />
<ProjectReference Include="$(SolutionDir)\msvc\scripts\genconsts.csproj">
<Name>genconsts</Name>
@@ -1,4 +1,6 @@
tuner.cs
InterpToNativeGenerator.cs
PInvokeTableGenerator.cs
../../build/common/Consts.cs
../../build/common/SR.cs
../../class/System.Json/corefx/SR.cs
+6 -6
View File
@@ -1,8 +1,8 @@
project (mono)
project(mono)
#set (subdirs eglib arch utils cil sgen metadata mini dis profiler)
set (subdirs mini)
#set(subdirs eglib arch utils cil sgen metadata mini dis profiler)
set(subdirs mini profiler)
foreach (dir ${subdirs})
add_subdirectory (${dir})
endforeach ()
foreach(dir ${subdirs})
add_subdirectory(${dir})
endforeach()
+19 -6
View File
@@ -13,22 +13,35 @@ native_dirs = native
endif
if ENABLE_NETCORE
btls_dirs =
btls_dirs =
managed_unit_test_dirs =
native_unit_test_dirs =
culture_dirs =
else
managed_unit_test_dirs = tests
native_unit_test_dirs = unit-tests
culture_dirs = culture
endif
if ENABLE_PERFTRACING
eventpipe_dirs = eventpipe
endif
if ENABLE_NETCORE
SUBDIRS = eglib arch utils sgen zlib metadata mini profiler
SUBDIRS = eglib arch utils sgen zlib $(eventpipe_dirs) metadata mini profiler $(native_unit_test_dirs)
else
if CROSS_COMPILING
SUBDIRS = $(btls_dirs) eglib arch utils cil zlib $(sgen_dirs) metadata mini dis profiler $(native_dirs)
SUBDIRS = $(btls_dirs) $(culture_dirs) eglib arch utils cil zlib $(sgen_dirs) metadata mini dis profiler $(native_dirs)
else
if INSTALL_MONOTOUCH
SUBDIRS = $(btls_dirs) eglib arch utils zlib $(sgen_dirs) metadata mini profiler $(native_dirs)
SUBDIRS = $(btls_dirs) $(culture_dirs) eglib arch utils zlib $(sgen_dirs) metadata mini profiler $(native_dirs)
else
SUBDIRS = $(btls_dirs) eglib arch utils cil zlib $(sgen_dirs) metadata mini dis tests unit-tests benchmark profiler $(native_dirs)
SUBDIRS = $(btls_dirs) $(culture_dirs) eglib arch utils cil zlib $(sgen_dirs) metadata mini dis $(managed_unit_test_dirs) $(native_unit_test_dirs) benchmark profiler $(native_dirs)
endif
endif
endif
DIST_SUBDIRS = btls native eglib arch utils cil zlib $(sgen_dirs) metadata mini dis tests unit-tests benchmark profiler
DIST_SUBDIRS = btls $(culture_dirs) native eglib eventpipe arch utils cil zlib $(sgen_dirs) metadata mini dis $(managed_unit_test_dirs) $(native_unit_test_dirs) benchmark profiler
EXTRA_DIST = eventpipe/Makefile
+6
View File
@@ -1,3 +1,9 @@
MAKEFLAGS := $(MAKEFLAGS) --no-builtin-rules
EXTRA_DIST = arm64-codegen.h codegen-test.c
test-codegen:
$(CC) $(CFLAGS) -I../../.. -I../../eglib/ ../../eglib/.libs/libeglib.a -o codegen-test codegen-test.c
./codegen-test > tmp.s
$(CC) $(CFLAGS) -c -o tmp.o tmp.s
objdump -d --triple=arm64e tmp.o
+36
View File
@@ -867,4 +867,40 @@ arm_encode_arith_imm (int imm, guint32 *shift)
#define arm_cmpp arm_cmpx
#endif
/* ARM v8.3 */
/* PACIA */
#define arm_format_pacia(p, crm, op2) arm_emit ((p), (0b11010101000000110010000000011111 << 0) | ((crm) << 8) | ((op2) << 5))
#define arm_paciasp(p) arm_format_pacia ((p), 0b0011, 0b001)
/* PACIB */
#define arm_format_pacib(p, crm, op2) arm_emit ((p), (0b11010101000000110010000000011111 << 0) | ((crm) << 8) | ((op2) << 5))
#define arm_pacibsp(p) arm_format_pacib ((p), 0b0011, 0b011)
/* RETA */
#define arm_format_reta(p,key) arm_emit ((p), 0b11010110010111110000101111111111 + ((key) << 10))
#define arm_retaa(p) arm_format_reta ((p),0)
#define arm_retab(p) arm_format_reta ((p),1)
/* BRA */
#define arm_format_bra(p, z, m, rn, rm) arm_emit ((p), (0b1101011000011111000010 << 10) + ((z) << 24) + ((m) << 10) + ((rn) << 5) + ((rm) << 0))
#define arm_braaz(p, rn) arm_format_bra ((p), 0, 0, (rn), 0b11111)
#define arm_brabz(p, rn) arm_format_bra ((p), 0, 1, (rn), 0b11111)
#define arm_braa(p, rn, rm) arm_format_bra ((p), 1, 0, (rn), (rm))
#define arm_brab(p, rn, rm) arm_format_bra ((p), 1, 1, (rn), (rm))
/* BLRA */
#define arm_format_blra(p, z, m, rn, rm) arm_emit ((p), (0b1101011000111111000010 << 10) + ((z) << 24) + ((m) << 10) + ((rn) << 5) + ((rm) << 0))
#define arm_blraaz(p, rn) arm_format_blra ((p), 0, 0, (rn), 0b11111)
#define arm_blraa(p, rn, rm) arm_format_blra ((p), 1, 0, (rn), (rm))
#define arm_blrabz(p, rn) arm_format_blra ((p), 0, 1, (rn), 0b11111)
#define arm_blrab(p, rn, rm) arm_format_blra ((p), 1, 1, (rn), (rm))
#endif /* __arm_CODEGEN_H__ */
+13
View File
@@ -416,6 +416,19 @@ main (int argc, char *argv [])
arm_stlxrx (code, ARMREG_R0, ARMREG_R1, ARMREG_R2);
arm_stlxrw (code, ARMREG_R0, ARMREG_R1, ARMREG_R2);
arm_paciasp (code);
arm_pacibsp (code);
arm_retaa (code);
arm_retab (code);
arm_braaz (code, ARMREG_R1);
arm_brabz (code, ARMREG_R1);
arm_braa (code, ARMREG_R1, ARMREG_R2);
arm_brab (code, ARMREG_R1, ARMREG_R2);
arm_blraaz (code, ARMREG_R1);
arm_blraa (code, ARMREG_R1, ARMREG_R2);
arm_blrabz (code, ARMREG_R1);
arm_blrab (code, ARMREG_R1, ARMREG_R2);
for (i = 0; i < code - buf; ++i)
printf (".byte %d\n", buf [i]);
printf ("\n");
-1
View File
@@ -1,7 +1,6 @@
/*
* Licensed to the .NET Foundation under one or more agreements.
* The .NET Foundation licenses this file to you under the MIT license.
* See the LICENSE file in the project root for more information.
*/
#define MONO_RISCV_CODEGEN_TEST
Loaded 100 of 514 files, more files were not shown because too many files have changed in this diff. Show more