Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with upstream main branch #13

Closed
wants to merge 391 commits into from

Conversation

joshpeterson
Copy link

This is an automatically generated pull request to merge changes from the upstream main branch.

BruceForstall and others added 30 commits November 15, 2021 13:25
- Remove unneeded FIRST concept in loop table; it was always equal to TOP.
- Rename optMarkLoopsBlocks to optScaleLoopBlocks to more accurately describe
what it does. More consistently report block scaling in the dump
- Create optMarkLoopHeads. This was refactored out of fgRemoveUnreachableBlocks so
it can be called in a more logical location (at the beginning of optFindLoops),
and only does one thing.
- fgMakeOutgoingStructArgCopy: remove unused `argIndex` argument; reorder calls to
fgMightHaveLoop.
- Update and write a bunch of comments; convert away from `/* */` style comments.
…net#61443)

This change allows devs to manually kick off full test runs on the configurations that only execute smoke tests per PR.

/azp runtime-staging-manual will do the trick
* Adding support for X86Base.Pause() and ArmBase.Yield()

* Applying formatting patch

* Ensure NI_ArmBase_Yield actually gets through to codegen on arm64
The comment above the method mentions "many problems" with leaving
null pointers around, but it is unclear what kind of problems. I can
only speculate those were the problems in legacy codegen which "could
not handle constant op1".

It also mentions that "we cannot even fold (null+offset)", which is
incorrect: "gtFoldExprConst" does in fact fold such expressions to
zero byrefs. It is also the case that spilling the null into a local
affects little as local assertion propagation happily propagates the
null back into its original place.

There was also a little bug associated with the method that got fixed:
morph was trying to use it, and in the process created uses of a local
that was not initialized, since the statement list used by the method
is the importer's one, invalid in morph.
Currently, Actions in the dotnet/runtime repository have read/write
access by default, unless their permissions have been explicitly declared.

The markdownlint workflow can be restricted from all access except the
repository contents. This limits what the 3rd party `markdownlint-cli`
npm package can do which is installed as part of the workflow.
* Obsolete thumbtacked AssemblyName properties

Fix dotnet#59061

* Ignore obsoletion

* Fix pragma

* Merge the AssemblyName member obsoletions into a single diagnostic id

* Fix pragma to use updated diagnostic id

* Suppress SYSLIB0037 in reflection tests

* Suppress SYSLIB0037 warnings

Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
Co-authored-by: Jeff Handley <jeff.handley@microsoft.com>
)

* Trim the hot code size to the actual code length

* Remove allocatedHotCodeSize field

* Remove verbose logging

* Perform trimming only for xarch

* Include more comment about armarch

* Fix the condition for arm64
* Provide locations for src-gen diagnostic output

* Fix tests and address feedback

* Add defensive check for context type location
The on-demand Azure module load was refactored to jitutil.py,
but that requires some cross-module importing to work. Do the
minimal required to make this work.
For very large structs poisoning could end up generating instructions
requiring larger local var offsets than we can handle which would hit an
IMPL_LIMIT that throws InvalidProgramException. Switch to using rep
stosd (x86/x64)/memset helper (other platforms) when a local needs more
than a certain number of mov instructions to poison.

Also includes a register allocator change to mark killed registers as
modified in addRefsForPhysRegMask instead of by the (usually) calling
function, since this function is used directly in the change.
* Unify some code and load mono-config.json using our _fetch_asset
…xpressions (dotnet#61470)

* Fix memory consumption.

* Fix debugger-tests

* Fix compilation.

* Addressing @lewing PR.

* Address @lewing comment

* Addressing @radical comment.

* Addressing comments.

* Addressing @radical comments.

* missing return.

* Addressing @radical comments

* Adding test case

Co-authored-by: Larry Ewing <lewing@microsoft.com>

* Fixing tests.

* Adding another test case. Thanks @lewing.

* Reuse the script.

Co-authored-by: Larry Ewing <lewing@microsoft.com>
…0983)

* It's working when debug from chrome but not when debug from VS, because it uses callFunctionOn

* Remove unrelated change.

* Working also on VS.

* Working also on VS.

* Addressing @lewing and @radical comments

* Change ArrayDimensions to be a record and not a class as suggested by @radical.

* Addressing @radical comments.
* Update WASM README.md
…on, System.IO.Compression.Brotli, System.Net.Http, System.Net.NameResolution (dotnet#61638)
… Build ID 1472678 (dotnet#61680)

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 1472242

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 1472678
Adjust partial comp not to import IL instead of importing it and then
deleting the IR. Saves some time and also sometimes a bit of stack
space as we won't create as many temps.

Update both PC and OSR to check for blocks in handlers early, rather
than pretending to support these and then backing out later.
weilinwa and others added 26 commits December 1, 2021 06:47
* Optimize FMA codegen base on the overwritten

* Improve function/var names

* Add assertions

* Get use of FMA with TryGetUse

* Decide FMA form with two conditions, OverwrittenOpNum and isContained

* Fix op reg error in codegen

* Decide form using lastUse and isContained in no overwritten case

* Clean up code

* Separate default case overwrittenOpNum==0

* Apply format patch

* Change variable and function names

* Update regOptional for op1 and resolve some other comments

* Optimize FMA codegen base on the overwritten

* Improve function/var names

* Add assertions

* Get use of FMA with TryGetUse

* Decide FMA form with two conditions, OverwrittenOpNum and isContained

* Fix op reg error in codegen

* Decide form using lastUse and isContained in no overwritten case

* Clean up code

* Separate default case overwrittenOpNum==0

* Apply format patch

* Change variable and function names

* Update regOptional for op1 and resolve some other comments

* Change var names

* Fix jit format

* Fix build node error for op1 is regOptional

* Use targetReg instead of GetResultOpNumForFMA in codegen

* Update variable names

* Refactor lsra to solve lastUse status changed caused assertion failure

* Add check to prioritize contained op in lsra

* Update for jit format

* Simplify code

* Resolve comments

* Comment out assert because of lastUse change

* Fix some copiesUpperBits related errors

* Update src/coreclr/jit/lsraxarch.cpp

Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>

* Add link to the new issue

Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
It looks like in CI we are seeing a null method ID in some cases when
this test is run under R2R and GC stress. Add a check for this, and also
mark the test as stress incompatible like other ETW tests, since it runs
very slowly under stress modes.

Fix dotnet#62118
* Added parameter for processing the value of the configuration e.g. for obfuscation

* Rename

* Extension methods separated

* After review suggestion changes

* Documentation update

* Build fixes

* Documentation for ConfigurationDebugViewContext added

* Nullable string error fix

* Changed to nullable string

* PR fixes

* Definition fix

* Missing definition

* Added getters to the definition

* Update src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationRootExtensions.cs

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>

* Tests added

* Update src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationDebugViewContext.cs

Docs update

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>

* Update src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationDebugViewContext.cs

Docs updateDocs update

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>

* Update src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationDebugViewContext.cs

Docs update

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>

* Update src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationDebugViewContext.cs

Docs update

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>

* Update src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationRootExtensions.cs

Docs update

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>

* Update src/libraries/Microsoft.Extensions.Configuration.Abstractions/src/ConfigurationDebugViewContext.cs

Docs update

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
* Update dependencies from https://github.com/dotnet/linker build 20211115.4

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.21562.1 -> To Version 7.0.100-1.21565.4

* Update dependencies from https://github.com/dotnet/linker build 20211116.4

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.21562.1 -> To Version 7.0.100-1.21566.4

* Update dependencies from https://github.com/dotnet/linker build 20211117.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.21562.1 -> To Version 7.0.100-1.21567.1

* Update dependencies from https://github.com/dotnet/linker build 20211118.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.21562.1 -> To Version 7.0.100-1.21568.1

* Update dependencies from https://github.com/dotnet/linker build 20211119.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.21562.1 -> To Version 7.0.100-1.21569.1

* Update dependencies from https://github.com/dotnet/linker build 20211122.2

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.21562.1 -> To Version 7.0.100-1.21572.2

* Update dependencies from https://github.com/dotnet/linker build 2021113.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.21562.1 -> To Version 7.0.100-1.21580.1

* Update dependencies from https://github.com/dotnet/linker build 20211201.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.21562.1 -> To Version 7.0.100-1.21601.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
* Added a new optional -compile argument that specifies which method contexts need to be compiled

* Update src/coreclr/scripts/superpmi.py

Co-authored-by: Bruce Forstall <brucefo@microsoft.com>

* Added another form of -compile argument like -c

Co-authored-by: Bruce Forstall <brucefo@microsoft.com>
…pArchive (dotnet#60973)

* throw exception when creating an entry name that already exists in ZipArchive

* secure code at the top of CreateEntry call

* specify entry name in exception message

* fix exception message, make AddEntry retrocompatible, and fix test issue with globalization

* restore the EmptyEntryTest code as before
dotnet#61867)

* Add NetCoreAppCurrent configurations to Microsoft.Extensions libraries

This makes all Extensions projects consistent in which TFMs they target. This way we don't need to add new TFMs during development of a new feature.

Fix dotnet#54012
* Cache LastAccessed during MemoryCache compaction

During cache compaction, we are sorting entries based on their LastAccessed time. However, since the cache entries can still be used concurrently on other threads, the LastAccessed time may be updated in the middle of sorting the entries. This leads to exceptions in a background thread, crashing the process.

The fix is to cache the LastAccessed time outside of the entry when we are adding it to the list. This will ensure the time is stable during the compaction process.

Fix dotnet#61032
* wait_for_attach change to gc safe mode

* change MONO_REQ_GC_SAFE_MODE to MONO_REQ_GC_UNSAFE_MODE
The copy may not get the same value as the original.
Detect this by looking for `GTF_ORDER_SIDEEFF`.

Closes dotnet#62048.
Modularized dotnet.js
* By using emcc options MODULARIZE and EXPORT_ES6, depending on WasmEnableES6 to produce ES6 or CommonJS modules respectively.
* WasmEnableES6 enables WasmBuildNative because dotnet.js need to be re-linked
* CommonJS version is able to be loaded into global namespace and behaves as before this change.
* Added new es6/*.js and es6/*.js files which are included in dotnet.js creation. 
* Key aspects are documented in src/mono/wasm/runtime/modularize-dotnet.md of this PR.
* Improved dotnet.d.ts it is now generated into version control too, so that we could observe how it evolves.
* Removed legacy --testing argument and simplified is_testing logic in the the samples.
* Added browser-es6 sample app, which uses WasmEnableES6=true to compile dotnet.js as ES6 module.
* Added browser-legacy sample, which uses dotnet.js CommonJS module and loads it into global namespace.
* Added package.json into the nupkg

Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Katelyn Gadd <kg@luminance.org>
Co-authored-by: Marek Fišera <mara@neptuo.com>
- Unused/unset variables in hot_reload.c
- Misleading indentation in aot-compiler.c
- Cast to smaller integer type in method-to-ir.c 

Co-authored-by: Aleksey Kliger (λgeek) <alklig@microsoft.com>
)

* Add test case for nested struct with explicit layout

* Add license

* Modify test

* Temporarily enable the test in the CI pipeline

* Allow running Mac Catalyst builds in App Sandbox

* Allow enabling app sandbox for the other Mac Catalyst sample

* Revert "Allow enabling app sandbox for the other Mac Catalyst sample"

This reverts commit 8c3c9f9.

* Revert "Allow running Mac Catalyst builds in App Sandbox"

This reverts commit 1e40416.

* Add more test cases

* WIP: First implementation of the recursive check

* Improve code

* Fix test case

* Add more test cases

* Unify test cases

* Bugfixes

* Remove test which behaves differently depending on the target platform

* Remove sequential layout test which behaves differently on Linux and on Windows

* Reorganize test cases

* Remove call to mono_class_setup_fields

* Fix embedding detection

* Fix layout validation for generic structs

* Remove unintentional change

* Revert temporary change to the runtime.yml pipeline

* Code clean-up

* Revert unrelated change

* Use getters instead of directly accessing MonoClass fields
* Use ReadOnlySpan<char> on RegexCompiled engine.

* Fixing unit tests by correcting some bad IL.
…ace method (dotnet#60770)

* Fix mono_get_generic_context_from_stack_frame when it's from a dim.

* Using @vargaz fix

* Fixing test case source name

* Fix behavior when the interface had static interface methods.

* Fixing test cases.
…62279)

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
@joshpeterson joshpeterson deleted the bot-upstream-main-merge-2021-12-02 branch December 3, 2021 18:21
yuc434 pushed a commit that referenced this pull request Aug 8, 2022
* Initial implementation for contract customization

fix build errors

Move converter rooting to DefaultJsonTypeInfoResolver so that it can be used standalone

Fix ConfigurationList.IsReadOnly

Minor refactorings (#1)

* Makes the following changes:

* Move singleton initialization for DefaultTypeInfoResolver behind a static property.
* Consolidate JsonSerializerContext & IJsonTypeInfoResolver values to a single field.
* Move reflection fallback logic away from JsonSerializerContext and into JsonSerializerOptions

* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs

* remove testing of removed field

Simplify the JsonTypeInfo.CreateObject implemenetation (#2)

* Simplify the JsonTypeInfo.CreateObject implemenetation

* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonTypeInfoOfT.cs

* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonTypeInfoOfT.cs

Co-authored-by: Krzysztof Wicher <mordotymoja@gmail.com>

Co-authored-by: Krzysztof Wicher <mordotymoja@gmail.com>

Tests and fixes for JsonTypeInfoKind.None

TypeInfo type mismatch tests

Allow setting NumberHandling on JsonTypeInfoKind.None

test resolver returning wrong type of options

JsonTypeInfo/JsonPropertyInfo mutability tests

rename test file

Move default converter rooting responsibility behind DefaultJsonTypeInfoResolver (#3)

* Move default converter rooting responsibility behind DefaultJsonTypeInfoResolver

* address feedback

Add simple test for using JsonTypeInfo<T> with APIs directly taking it

fix and tests for untyped/typed CreateObject

uncomment test cases, remove todo

More tests and tiny fixes

Add a JsonTypeInfoResolver.Combine test for JsonSerializerContext (#4)

* Fix JsonTypeInfoResolver.Combine for JsonSerializerContext

* Break up failing test

Fix simple scenarios for combining contexts (#6)

* Fix simple scenarios for combining contexts

* feedback

JsonSerializerContext combine test with different camel casing

Remove unneeded virtual calls & branching when accessing Get & Set delegates (#7)

JsonPropertyInfo tests everything minus ShouldSerialize & NumberHandling

Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs

Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonConverterOfT.cs

throw InvalidOperationException rather than ArgumentNullException for source gen when PropertyInfo.Name is assigned through JsonPropertyInfoValues

tests for duplicated property names and JsonPropertyInfo.NumberHandling

Add tests for NumberHandling and failing tests for ShouldSerialize

disable the failing test and add extra checks

disable remainder of the failing ShouldSerialize tests, fix working one

Fix ShouldSerialize and IgnoreCondition interop

Add failing tests for CreateObject + parametrized constructors

Fix CreateObject support for JsonConstructor types (#10)

* Fix CreateObject support for JsonConstructor types

* address feedback

Make contexts more combinator friendly (#9)

* Make contexts more combinator friendly

* remove converter cache

* redesign test to account for JsonConstructorAttribute

* Combine unit tests

* address feedback

* Add acceptance tests for DataContract attributes & Specified pattern (#11)

* Add private field serialization acceptance test (#13)

* tests, PR feedback (#14)

* PR feedback and extra tests

* Shorten class name, remove incorrect check (not true for polimorphic cases)

* Make parameter matching for custom properties map property Name with parameter (#16)

* Test static initialization with JsonTypeInfo (#17)

* Fix test failures and proper fix this time (#18)

* Fix test failures and proper fix this time

* reinstate ActiveIssueAttribute

* PR feedback and adjust couple of tests which don't set TypeInfoResolver

* fix IAsyncEnumerable tests

* Lock JsonSerializerOptions in JsonTypeInfo.EnsureConfigured()

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.