Age | Commit message (Collapse) | Author |
|
With Project file cotains Property <IsDotNetFrameworkProductAssembly>true</IsDotNetFrameworkProductAssembly>, the final assembly will contain assembly attribute
[assembly: AssemblyMetadata(".NETFrameworkAssembly", "")]
|
|
Merge nmirror to master
|
|
Previous My last minute change introduces two problems:
1. in System.Private.Interop.CoreCLR.csproj file, if you use "<DefineConstants>$(DefineConstants);*</DefineConstants>" , when building it, it will define CoreRT which isn't expected.
2. in System.Private.Interop.Mono.csproj file, move "import System.Private.Interop.CoreCLR.csproj" above the PropertyGroup, so that the Properties in System.Private.Interop.Mono.csproj can overwrite Properties in System.Private.Interop.CoreCLR.csproj
[tfs-changeset: 1679184]
|
|
As pointed by Jan, there are duplicate copy of these types in S.R.WR/S.P.Interop and CoreRT.
The change is to remove duplicate copy of WinRT Type in ProjectN and use types from CoreRT instead.
The next step is to remove the duplicate copy in S.R.WR.
[tfs-changeset: 1679183]
|
|
Merge nmirror to master
|
|
The change is to add some "wellknown" winrt types and these winrt types( are treated specially by MCG/Interop due to projection. The reason to add them type into System.Private.Interop is that dynamic interop need these "wellknown" winrt type to compare with given type. such as if(type is typeof(IReference)) {//do something special}
Details:
1. System.Private.Interop.CoreCLR.csproj: add $(DefineConstants) to avoid override other Constants
2. System.Private.Interop.Mono.csproj: add all of these well known winrt types
3. DebugAnnotations.cs: this attribute is consumed only by debugger
4. DependencyReductionRootAttribute: add other attribute Usage
5. InteropExtensions.cs/PInvokeMarshal.cs: default implementation for methods referenced in McgMarshal
6. McgIntrinsics.cs: make necessary #ifdef change to compile new added winrt Types
7. System\Runtime\InteropServices\WindowsRuntime: Wellknown WinRT Type
8. Windows\Foundation\: Wellknown WinRT Type
[tfs-changeset: 1678923]
|
|
|
|
simple #ifdef change
[tfs-changeset: 1678784]
|
|
Mcg on MiniWinRT scenario need to use LibraryInitializer to run specific static class constructors.
By the way, Mcg on miniWinRT doesn't need pinvoke data support and Mcg on Coreclr do need pinvoke support
TODO: enable RuntimeAugments.InitializeInteropLookups for mcg on coreclr scenario
[tfs-changeset: 1678783]
|
|
This project file will generate a System.Private.Interop.dll for mono with MiniWinRT enable
[tfs-changeset: 1678779]
|
|
Merge nmirror to master
|
|
From interop point, Delegate isn't ComClass.
In WinRT, we treat delegate as interface instead of Class.
[tfs-changeset: 1678339]
|
|
ENABLE_MIN_WINRT is defined when it runs on ProjectN or mcg on minwinrt mode.
[tfs-changeset: 1678338]
|
|
|
|
the reason to change Clone signature from "out IntPtr" to "IntPtr" is that "our IntPtr" needs marshal support and "Intptr" doesn't need marshal support. For NativeCallable method, it shouldn't need marshal support.
[tfs-changeset: 1678334]
|
|
the reason for replacing StdCall<T> with StdCall__int is that
1. CoreCLR doesn't support generic Calli, see voidSigPointer::ConvertToInternalExactlyOne(Module* pSigModule, SigTypeContext *pTypeContext, SigBuilder * pSigBuilder, BOOL bSkipCustomModifier) for more info
2. StdCall<T> doesn't buy us much, since we always use StdCall<int>
[tfs-changeset: 1678326]
|
|
|
|
Yi/Alan/Tyler found out this bug and the root cause--- IsComObject(Type t) only check whether t is subclass of __ComObject or not --- IsSubclassOf fails if type is exactly __ComObject: https://msdn.microsoft.com/en-us/library/system.type.issubclassof%28v=vs.110%29.aspx
the fix is to add a check to see whether type itself is __ComObject or not.
Changes:
1. Unify IsCOMObject and IsComObject into IsComObject. don't confuse ourselves
2. Move McgComHelpers.IsComObject into McgMarshal.IsComObject
TODO:
1. Consider to split McgMarshal.cs into McgMarshal.Pinvoke.cs/McgMarshal.Com.cs/McgMarshal.WinRT.cs/McgMarshal.Common.cs
[tfs-changeset: 1678276]
|
|
|
|
The change is to free these thunks created by DynamicCCW through CallInterceptor.
Changes:
1. ComCallableObject.cs:
a. Use m_dynamicMethodStart and m_dynamicMethodEnd to record methods [dynamicMethodStart , dynamicMethodEnd) are dynamically created.
b. Free these thunks during interface CCW destroy
2. CallInterceptor.cs
a. Add a static FreeThunk method to free thunks created by CCW.
The use pattern for CCW dynamic thunk is that it only save thunk address instead of CallInterceptor instance. it is hard to call CallInterceptor instance's FreeThunk()
3. InteropCallInterceptors:
Remove TODO, since it isn't okay to clear these two field after native call this delegate once.
In native side, it may call this WinRT delegate couple times. if we clear these two fields after one call, the next call will fail.
[tfs-changeset: 1677503]
|
|
|
|
|
|
This is the first step towards open sourcing MCG - moving CoreCLR version of System.Private.Interop to CoreRT. This change also merges System.Private.Interop with System.Private.CoreLib.InteropServices.CoreCLR. I have verified that it builds on CoreRT, but haven't tried run any test with it yet.
[tfs-changeset: 1677117]
|
|
__ComObject.cs: during dynamic interop, We can generate dynamic adapter on fly for generic type
InteropCallInterceptors.cs: align with Mcg generated source code, always call McgMarshal.GetExceptionForHR instead
[tfs-changeset: 1674995]
|
|
For Generic Argument type, we should able to dynamic create them even its mcg data doesn't exist.
In future, we should remove these generic argument mcg data, since type system will help us to create them as demand.
[tfs-changeset: 1674129]
|
|
[tfs-changeset: 1673253]
|
|
showing implementation details in the debugger which is of no use for the end user .
Also this improved func eval perf since we avoid unnecessary evaluations.
[tfs-changeset: 1673187]
|
|
causes an exception
- Fix it to behave as it did before NS2.0 and be a reference equality operation
- NS 2.0 work brought along a new Equals method that needs to be overriden for correct behavior
[tfs-changeset: 1672183]
|
|
The Debug.Assert(obj == null || obj is __ComObject) is Unnecessary and incorrect:
Unnecessary: There is another Debug.Assert(!typeHnd.IsNull()) later, which will do similar(or better) check. since Debug.Assert(!typeHnd.IsNull()) also handle managed winmdobject case.
Incorrect: it miss a case such as obj itself is a managed winmd object case.
so it should be Debug.Assert(obj == null || obj is __ComObject || obj is managed winmd object);
[tfs-changeset: 1670398]
|
|
|
|
Bugs:
• https://devdiv.visualstudio.com/DevDiv/_workitems/edit/470211
• https://devdiv.visualstudio.com/DevDiv/_workitems/edit/205405
CR: AdityaM
To schedule an asynchronous call, we perform several WinRT calls to check whether the current thread has either a CoreDispatcher or a DispatcherQueue associated with it. These calls, especially the recently added ones related to DispatcherQueue support, are expensive and make async calls around 3 times slower than on desktop CLR on a microbenchmark.
This change implements a number of optimizations based on a discussion with Windows developers:
• Skip checking for CoreDispatcher/DispatcherQueue on non-[A]STA threads.
• Skip checking for CoreDispatcher for desktop apps. (CoreDispatcher is not supported for desktop apps.)
• Cache the IDispatcherQueueStatics interface pointer instead of calling RoGetActivationFactory on each async call.
• Avoid an unnecessary closure object allocation in FactoryCache.GetActivationFactory.
I had to change WinRTCallbacks.s_resourceContextQualifierMap initialization, because it would crash for desktop apps. (The class constructor would never be called for desktop apps before I added extra static fields.)
I also deleted the orphaned Interop.WinRT.cs file.
[tfs-changeset: 1669116]
|
|
static remove method. For static method delegate.Target is null and it takes the
ManagedEventRegistrationImpl code path which asserts target!=null .CoreCLR does the right thing
https://github.com/Microsoft/referencesource/blob/master/mscorlib/system/runtime/interopservices/windowsruntime/windowsruntimemarshal.cs#L98
[tfs-changeset: 1665004]
|
|
- Cleaned up comments around MightBeBlittable and simplified the implementation
- Moved a few more Marshal methods to PInvokeMarshal from InteropExtensions and removed redundant wrappers
- Fixed potential integer truncation in UnsafeAddrOfPinnedArrayElement on 64-bit platforms
[tfs-changeset: 1663953]
|
|
Interop (and a few other parts) have been using internal enumerators on ConditionalWeakTable. Replace them with the public tested efficient/non-allocating enumerator introduced for .NET Core 2.0.
[tfs-changeset: 1663943]
|
|
Merge nmirror to master
|
|
not delegate type
[tfs-changeset: 1663402]
|
|
Merge nmirror to master
|
|
Yi want to get more info about this change
[tfs-changeset: 1663381]
|
|
Merge nmirror to master
|
|
[tfs-changeset: 1663213]
|
|
- Pick up latest .NET Core 2.0 CLI and buildtools
- Remove all project.json references and convert everything to msbuild projects
- Stick to vanilla .NET CLI project shape as much as possible. Minimize dependencies on buildtools special behaviors
|
|
This change adds and internal Marshal.PtrToStringUni in S.P.CoreLib to unblock the benchmark Sergiy has been working on.
[tfs-changeset: 1662877]
|
|
Enable dynamic rcw by default, which enable generic interface casting for incremental build and non-incremental build
For non-generic type, this shouldn't affect its behavior
For generic type, support the cast will always work if QI return succeeded
Generic Type Dynamic RCW dependency:
1. These DynamicRCWAdapter for generic interface need to be UniversalCanon
Note: This change may have negative perf impact for non-incremental build
Before(Disable DynamicRCW):
• It will only call ICastable.IsInstanceOfInterface
• ICastable.IsInstanceOfInterface will return true iff whether ComObject support(QI) this interface
After(Enable DyanamicRCW):
• It will call ICastable.IsInstanceOfInterface first, if ICastable.IsInstanceOfInterface return false, then call CastableObject.CastToInterface
• ICastable.IsInstanceOfInterface will return true iff interface has DispatchClass and ComObject support(QI) this interface
[tfs-changeset: 1662871]
|
|
disallowed pinning a zero length array and corefx networking libraries use it.Also desktop do not do bounds check.
[tfs-changeset: 1662861]
|
|
NotSupportedException/NotImplemented.ByDesign according to guidelines.
[tfs-changeset: 1662850]
|
|
VS is trying to "upgrate" the full framework projects without ToolsVersion
[tfs-changeset: 1662259]
|
|
Bug 296322 # [AppCompat] System.Reflection.AmbiguousMatchException:Ambiguous match found..
The issue is related to Jupiter data binding for hiding property with different return type, see following sample code.
public class A
{
public int P {get;set;}
}
public class B : A
{
public new string P {get;set;}
}
<TextBlock name="myTextBlock" Text="{Binding P}" />
myTextBlock.DataContext = new B{ P = "B"};
Behavior:
Desktop: it will throw AmbiguousMatchException first, and then swallow it, return null and S_OK
NS2.0-: it will return B.P
NS2.0+: it will throw AmbiguousMatchException due to Reflection Change
The change is to align Desktop behavior--swallow the exception and return null property and S_OK
[tfs-changeset: 1662099]
|
|
The latest project templates do not have it, and it is only good for generating warnings like the following in the detailed build log:
Project file contains ToolsVersion="4.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="14.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=293424.
[tfs-changeset: 1662024]
|
|
|
|
Merge nmirror to master
|