I have no justification for these numbers; they were pulled from
MonoAOTCompiler.props. It might be a good idea to port the "infinite
trampoline" hack to non-Apple platforms.
This allows exporting a certificate directly to a X.509 PEM string
(`-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----`), and cert collections
to either a PKCS#7 SignedData with no signers PEM ("BEGIN PKCS7"), or to a X.509
multi-PEM (including the empty string and a single PEM for the 0 and 1 length collections).
* Reusing buffer to avoid allocate every debugger message.
* Fixing what was suggested by @radical.
* cleaning code.
* Changing what was suggested by @radical
* Implementing again after merge
* Fix spacing before parentheses.
* Addressing @pavelsavara comments.
* Fix _debugger_buffer type.
* Use public helix queue
* Remove helix queue setup from python
* Remove unnecessary comments
* TOREVERT: Download specific artifacts
* change creator to dotnet-bot
* set Creator
* run only for windows x64
* Publish antigen build logs
* put in quotes
* use correct script for helix queue
* Set some helix variables:
* Use Helix properties in proj
* Include the display name
* Revert specific build
* Add continueOnError to display warnings
Stop generating OS specific compilers for the arm and arm64 architectures for use in crossgen2
- As it turns out the OS differences here are relatively minor and fairly easy to handle with runtime switches.
- However, when an exact target is known we can generate better code by having the various if statements evaluate to a constant true/false. (This is done for all runtime jit builds)
- This has been validated to produce binary identical output for generating System.Private.CoreLib.dll on the various architectures.
- This work reduces the distribution size of crossgen2, and also reduces the amount of time it takes to build everything (Most notably, the Mac build times in PR's are reduced by 5-7 minutes, but improvements are visible across all of/architecture pairs)
* Fix incorrect tracking of sign bit
* Perform the 1 check earlier
* Add comment on checking special pattern
* Simplify fix
* Update the test to target 32 bit right shift
as the logic has been restricted to that
* Remove stray newline
The `OptionsFactory` constructors ensure that the member variable
`_validations` is never null. Yet, the `Create` method checks whether
`_validations` is null before running them.
Check that the length of `_validations` is larger than zero instead of
checking for null. This eliminates a `List<>` allocation when there are
no validations.
Another bit of code that I've had lying around that might be generally useful.
* Optionally suppress Tier0 compilation dumps
* Optionally suppress dumps from inline compiler phases
Setting `JitDumpTier0=0` prevents you from getting two dumps when you specify
dumping a method by name or hash, when TC is enabled.
A simple clean up of the SAVE_ASSEMBLIES symbol code in DI.
I am also adding the service type name to the class name because
it helps a lot when manual inspecting MSIL code for large service trees.
* Add more test cases for VersionConverter
* Reduce allocations in VersionConverter.Read method
* Remove allocations from VersionConverter.Write method
* Parse Version from chars, instead of parsing individual components. Assert successful formatting on write.
* Allow escaping, disallow leading and trailing whitespaces
* Hopefully fix tests for .NET Framework, add few more test cases that should fail
* Assume whitespaces can be only on the start, or only at the end, add one more test case that should fail
* Remove redundant return statements
* Elaborate on comment regarding leading and trailing whitespaces. Copy it to .NetStandard2.0 target.
* Add another test case.
* Dependency Injection support for ValueTypes as Services
The only that was thing missing to support ValueTypes as Services
was box the result when visiting constructors call sites.
I am also fixing several tests that were building the ServiceProvider
using the default engine, instead of relying on each specific engine.
fix#42160
* addressing pr feedback regarding tests
We were doing some local optimizations with MSIL’s Stloc and Ldloc,
but the very same ones are already present in an override of the
ILGenerator.Emit function, so we can remove them.
This PR also fixes the use of Ldloca that was generating additional
nop operations.
fix#59624
* [mono][jit] Make MONO_INS_HAS_NO_SIDE_EFFECT () into a function.
* [mono][jit] Eliminate some type comparisons in gshared methods.
Comparisons of the form
```
internal static void ThrowForUnsupportedIntrinsicsVectorBaseType<T>() where T : struct
{
if (typeof(T) != typeof(byte) && typeof(T) != typeof(sbyte) &&
...
}
```
are very common in BCL code. They are compiled to:
```
IL_0001: ldtoken !!T
IL_0006: call [System.Runtime]System.Type [System.Runtime]System.Type::GetTypeFromHandle([System.Runtime]System.RuntimeTypeHandle)
IL_000b: ldtoken [System.Runtime]System.Byte
IL_0010: call [System.Runtime]System.Type [System.Runtime]System.Type::GetTypeFromHandle([System.Runtime]System.RuntimeTypeHandle)
IL_0015: call bool [System.Runtime]System.Type::op_Inequality([System.Runtime]System.Type,
[System.Runtime]System.Type)
IL_001a: brfalse IL_015a
```
In gshared code, !!T is usually constrained to be a reference, or to have a primitive base type.
Use this fact to eliminate some of the Type::op_Equality/op_Inequality () calls.
Fixes https://github.com/dotnet/runtime/issues/54849.
* Skip ExportPkcs7_Empty test on mobile platforms
The test made it through and was failing on CI. PKCS#7 export is not supported on mobile platforms.
* PKCS7_Empty was failing on android b/c 0 length was not allowed.
Co-authored-by: Steve Pfister <[email protected]>
…nd skip any precompiling (#58979)
Refactor to allow fast-path
implement fast-path for MonoAOTCompiler when nothing has changed
re-enable some tests that got disabled by mistake
(cherry picked from commit 9fd17b1)
Currently, the loop choice condition blocks are created in a way that creates
a confusing flow graph. Restructure them to be simpler, and lay the path for
future work.
The simpler layout (and, hopefully, code and logic to create them) also
lays the groundwork to potentially put the slow path loop in the loop table,
if desired, as it creates a "standard" loop header layout.
While the flow graph has an extra block or two, there are almost no diffs,
as subsequent phases clean up any extras.
There are a few diffs where the new layout enables some downstream optimization
phases that were stymied by the old layout, but mostly in cases where we leave
around dead code slow cloned blocks (a known issue). Also, there are a couple
trivial CSE changes.
If you use `-box` (similar to pre-existing `-boa`, `-boe`), then
an exception with invoke a `DebugBreak`, which will stop in the
debugger when an exception is thrown during replay. This is helpful
when debugging (without needing to configure the debugger to catch
a specific exception).
* Exploratory tool pipeline
Add pipeline to run exploratory tools and return back the result
* Use public Antigen repo
* Add RunDuration
* Rename some of the files to antigen
* TOREVERT: download specific artifacts
* Trigger nightly and on PRs
* Adjust the duration
* Exit on fail for Antigen
* Rename yml files
* Add Antigen.md
* Temporarily run for 10 minutes
* Remove non-x64 build download and helix workaround
* Add back HelixResultsDestinationDir
* Change to net6.0
* extra ,
* Antigen is still on net5.0
* Default framework net6.0
* Run for 3 hours
* Run full build
* fix space
* Make the schedule weekly Sun@6am
* Reduce duration to 2 hours
* Set FreeBSD 12 as minimum version
This is a small clean-up to remove reliance on FreeBSD versions
prior to 12 and more specifically 12.2 which is the lowest currently
supported version of FreeBSD. 11.4 becomes unsupported as of
October 2021. See https://www.freebsd.org/releases/
* Add functionality for FreeBSD process and threads
Added support for naming native threads, the process disambiguation
key and detecting if the process is running under a debugger.
Changed references to thr_self to pthread_getthreadid_np already
used elsewhere - it returns the same value.
* [tests] Correctly detect the Mono interpreter
Checking for MONO_ENV_OPTIONS is not reliable for the mobile test runners
because they use the embedding API to enable the interpreter, rather than
setting an environment option.
Instead detect the interpreter by checking the values of the
IsDynamicCodeSupported and IsDynamicCodeCompiled runtime features.
* [tests] Run System.Threading.Tasks.Dataflow.Tests on Apple platforms
* Only check RuntimeFeature on netcoreapp. Otherwise return false
these tests are not running on mono if they're running on .NET Framework