Merge dev/defaultintf to master#15370
Conversation
* allow non-zero RVA on abstract interface method in ilasm * Revert "allow non-zero RVA on abstract interface method in ilasm" This reverts commit eecb802. * add a test case and allow virtual non-abstract method in ilasm * allow non-abstract methods in the loader * fixup dispatch map * support for simple default interface method scenario * fix a bug with incorrect usage of MethodIterator skpping the first method. add a test case for overriding but it may not be what we want * add another simple test case for base class * allow private/internal methods in ilasm and add a explict impl test * update reference to mscorlib in il test * add shared generics and variance case * allow interface dispatch to return instantiating stubs with the right PARAM_TYPE calling conv * simple factoring and add a valuetype test case * add a test case for generic virtual methods * a bit more refactoring by moving the CALLCONV_PARAMTYPE logic inside getMethodSigInternal * support explicit methodimpl and remove implicit methodimpl test case * update test cases to give more clear output * Fix a bug where GetMethodDescForSlot chokes on interface MethodDesc without precode. This is accdentally discovered by methodimpl test case when iterating methods on a default interface method that has already been JITted * cleanup code after review and add a bit more comments * update comments * only use custom ILAsm for default interface methods tests - some tests are choking on CoreCLR ilasm for security related stuff * address comments and allow instance methods, and add a constraint value type call test scenario * disable the failing protected method scenario
* Support protected methods * add a test for diamond shape scenario and tentatively throw exception when that happens
* Support non-virtual calls on interface private members correctly * Support protected methods * Properly handle precode * Throw (tentative) exception when seeing conflict overrides and add a test case (This updates CoreCLR dev/defaultintf the same with the build we are showing at //build)
Updating the PreReleaseLabel name so we get official Default Interface's builds.
This will fix errors like "E:\A\_work\0\a\MicroBuild\Plugins\MicroBuild.Plugins.Signing.1.0.321\build\MicroBuild.Plugins.Signing.targets(0,0): error : File E:\A\_work\0\b\pipelineRepository\bin\obj\SymbolsCatalog\9\signatures.cat is not in one of the expected output locations and cannot be signed. [E:\A\_work\0\b\pipelineRepository\build.proj]" being tracked by https://github.com/dotnet/core-eng/issues/1173
This value was changed back after a rebase to master was done
* Update dependencies and use live/packaged ilasm * Fix ilasm excessive stack usage when deleting lots of generic parameters
* first cut of multiple candidates * new positive case for diamond shape * Add proper missing implementation detection and positive diamond shape scenario support. Untested * fix bug and get test to pass * Add more diamond shape pos/neg tests * Fix bad I8 * Add GVM tests to diamond shape * GVM working * Change test case to better match diamondshape scenario * Fix MethodImpl::Iterator::GetMethodDesc and optimize no-method impl scenario * Update methodimpl test to include multiple slots and fix a bug * Temporarily disable incremental build in this branch * Update methodimpl to include multiple methodipml overriding scenario. This is triggering some bugs and need to investigate * Fix a buffer overrrun bug with interface methodimpl * Update after self-review * Add proper methodImpl validation for methods * Address feedback. Refactoring pending
Update to latest changes from master branch
…ster Actually merge to completely up to date with master
Add PB_SignType as explicit variable
Merge master to dev/defaultintf
|
@dotnet-bot test Windows_NT x64 corefx_baseline |
|
Cc @sergiy-k |
|
@dotnet-bot test Windows_NT x64 Checked corefx_baseline |
|
@dotnet-bot test Windows_NT x64 Checked corefx_baseline |
|
@dotnet-bot test Windows_NT x64 Checked corefx_baseline We ran out of disk space. Cc @dotnet/dnceng |
|
/cc: @mmitche |
|
@MattGal This was that machine I was referring to. We should check to see whether we can figure out what is taking up so much space, and whether the machine has been around a long time. |
|
OK, the Windows_NT x64 Checked Build and Test (Jit - CoreFx) failure is also present in the baseline (see #15391). The tests can be considered green. |
|
|
||
| # If set, indicates that this is not an officially supported release | ||
| # Keep in sync with IsPrerelease in dir.props | ||
| set(PRERELEASE 1) |
There was a problem hiding this comment.
It seems like this is hard coded to 1. Shouldn't this be controlled by an environment variable or something?
There was a problem hiding this comment.
We want this to be always enabled in development branches and always disabled in release branches. Unfortunately, we couldn't find any other way. Environment variables wouldn't satisfy that requirement.
davidwrighton
left a comment
There was a problem hiding this comment.
In general, this looks ok, although I have a few comments regarding making the disabling of the the feature more comprehensive. Also, as the change is large and potentially impactful, its difficult to review for correctness, and I'm assuming we're running as much of a test suite as we can manage.
| inline BOOL IsDefaultInterfaceMethod() | ||
| { | ||
| LIMITED_METHOD_CONTRACT; | ||
|
|
There was a problem hiding this comment.
if the #if for default interfaces isn't enabled, this should just return false.
| MethodDesc **ppDefaultMethod | ||
| ) | ||
| { | ||
| CONTRACT(BOOL) { |
There was a problem hiding this comment.
If the default interface #if isn't enabled, this function should return false, and fail to find anything.
| MethodTable::InterfaceMapIterator it = pCanonMT->IterateInterfaceMap(); | ||
| DWORD cPotentialMatchingInterfaces = 0; | ||
| while (it.Next()) | ||
| // chance of this happening by checking for all interfaces which might possibly |
There was a problem hiding this comment.
What happened to indenting here?
| } | ||
| } | ||
| else if(fIsClassInterface) | ||
| { |
There was a problem hiding this comment.
This code has a lot of trailing spaces, please fix.
|
|
||
| // Returns true if there is at least one default implementation for this interface method | ||
| // We don't care about conflicts at this stage in order to avoid impact type load performance | ||
| BOOL MethodTableBuilder::HasDefaultInterfaceImplementation(MethodDesc *pDeclMD) |
There was a problem hiding this comment.
HasDefaultInterfaceImplementation [](start = 25, length = 33)
This should also return false if the default interface #if is not enabled
|
@jkotas Do you have an opinion on whether we should just squash and merge or make a merge commit, or try to rebase something? (I'm not too keen on the rebasing because there was a ton of merge conflicts in the auto-update dependencies files that I would rather not have to resolve again.) |
|
I would make a merge commit. |
01b86cc to
7333bb1
Compare
…intf-merge Merge dev/defaultintf to master Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
…intf-merge Merge dev/defaultintf to master Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
|
@MichalStrehovsky It looks like this change has broken all release builds with these test failures: e.g.: |
|
@BruceForstall Sigh, thanks for bringing it to my attention! Those are new tests that came with the feature, so not a huge concern - it means there will be more bugs to deal with, I guess. I'll file an issue and block them on it. |
…intf-merge Merge dev/defaultintf to master Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
…intf-merge Merge dev/defaultintf to master Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
…intf-merge Merge dev/defaultintf to master Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
…intf-merge Merge dev/defaultintf to master Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
Marking as WIP because I would like to:
FEATURE_DEFAULT_INTERFACES