diff options
author | Andrew Au <andrewau@microsoft.com> | 2017-07-21 19:59:49 +0300 |
---|---|---|
committer | Andrew Au <andrewau@microsoft.com> | 2017-07-21 19:59:49 +0300 |
commit | 4c62c4d591a409d08717ae41377009a0606be7e0 (patch) | |
tree | a0621e323b0769cbbbdc71a2c4a16e64e965d9f0 /src/System.Private.TypeLoader | |
parent | 29a740ea8ce419d029a347a7b1ad4625d5a63f4e (diff) |
Debugger Support
[tfs-changeset: 1667277]
Diffstat (limited to 'src/System.Private.TypeLoader')
-rw-r--r-- | src/System.Private.TypeLoader/src/Internal/Runtime/DebuggerSupport/DebugFuncEval.cs | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/System.Private.TypeLoader/src/Internal/Runtime/DebuggerSupport/DebugFuncEval.cs b/src/System.Private.TypeLoader/src/Internal/Runtime/DebuggerSupport/DebugFuncEval.cs index 5f46def12..c7f5f9b87 100644 --- a/src/System.Private.TypeLoader/src/Internal/Runtime/DebuggerSupport/DebugFuncEval.cs +++ b/src/System.Private.TypeLoader/src/Internal/Runtime/DebuggerSupport/DebugFuncEval.cs @@ -223,7 +223,7 @@ namespace Internal.Runtime.DebuggerSupport if (isConstructor) { - typesAndValues.thisObj = CreateObject(typesAndValues.types[1]); + typesAndValues.thisObj = RuntimeAugments.RawNewObject(typesAndValues.types[1]); } LocalVariableSet.SetupArbitraryLocalVariableSet<TypesAndValues>(HighLevelDebugFuncEvalHelperWithVariables, ref typesAndValues, argumentTypes); @@ -249,7 +249,7 @@ namespace Internal.Runtime.DebuggerSupport TypeSystemContextFactory.Recycle(typeSystemContext); RuntimeTypeHandle objectTypeHandle = objectTypeDesc.GetRuntimeTypeHandle(); - object returnValue = CreateObject(objectTypeHandle); + object returnValue = RuntimeAugments.RawNewObject(objectTypeHandle); GCHandle returnValueHandle = GCHandle.Alloc(returnValue); IntPtr returnValueHandlePointer = GCHandle.ToIntPtr(returnValueHandle); @@ -374,25 +374,6 @@ namespace Internal.Runtime.DebuggerSupport // debugger magic will make sure this function never returns, instead control will be transferred back to the point where the FuncEval begins } - private static unsafe object CreateObject(RuntimeTypeHandle objectTypeHandle) - { - object returnValue = null; - if (objectTypeHandle.Equals(typeof(IntPtr))) - { - returnValue = new IntPtr(); - } - else if (objectTypeHandle.Equals(typeof(UIntPtr))) - { - returnValue = new UIntPtr(); - } - else - { - returnValue = RuntimeAugments.NewObject(objectTypeHandle); - } - - return returnValue; - } - public static void Initialize() { // We needed this function only because the McgIntrinsics attribute cannot be applied on the static constructor |