Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
runtime
提交
3874c65f
R
runtime
项目概览
dotNET Platform
/
runtime
12 个月 前同步成功
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
runtime
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
3874c65f
编写于
6月 16, 2022
作者:
J
Jan Kotas
提交者:
GitHub
6月 16, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Delete redundant aliases for primitive types (#70805)
上级
1b6f76d1
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
42 addition
and
58 deletion
+42
-58
src/coreclr/vm/debugdebugger.cpp
src/coreclr/vm/debugdebugger.cpp
+13
-13
src/coreclr/vm/interoputil.cpp
src/coreclr/vm/interoputil.cpp
+1
-1
src/coreclr/vm/invokeutil.cpp
src/coreclr/vm/invokeutil.cpp
+10
-10
src/coreclr/vm/methodtable.cpp
src/coreclr/vm/methodtable.cpp
+1
-1
src/coreclr/vm/object.h
src/coreclr/vm/object.h
+15
-15
src/coreclr/vm/olevariant.cpp
src/coreclr/vm/olevariant.cpp
+2
-2
src/coreclr/vm/util.hpp
src/coreclr/vm/util.hpp
+0
-16
未找到文件。
src/coreclr/vm/debugdebugger.cpp
浏览文件 @
3874c65f
...
...
@@ -474,11 +474,11 @@ FCIMPL4(void, DebugStackTrace::GetStackFramesInternal,
pElem
[
iNumValidFrames
]
=
(
size_t
)
pFunc
;
// Native offset
I4
*
pI4
=
(
I4
*
)((
I4ARRAYREF
)
pStackFrameHelper
->
rgiOffset
)
->
GetDirectPointerToNonObjectElements
();
CLR_I4
*
pI4
=
(
CLR_
I4
*
)((
I4ARRAYREF
)
pStackFrameHelper
->
rgiOffset
)
->
GetDirectPointerToNonObjectElements
();
pI4
[
iNumValidFrames
]
=
data
.
pElements
[
i
].
dwOffset
;
// IL offset
I4
*
pILI4
=
(
I4
*
)((
I4ARRAYREF
)
pStackFrameHelper
->
rgiILOffset
)
->
GetDirectPointerToNonObjectElements
();
CLR_I4
*
pILI4
=
(
CLR_
I4
*
)((
I4ARRAYREF
)
pStackFrameHelper
->
rgiILOffset
)
->
GetDirectPointerToNonObjectElements
();
pILI4
[
iNumValidFrames
]
=
data
.
pElements
[
i
].
dwILOffset
;
// Assembly
...
...
@@ -488,9 +488,9 @@ FCIMPL4(void, DebugStackTrace::GetStackFramesInternal,
if
(
data
.
fDoWeHaveAnyFramesFromForeignStackTrace
)
{
// Set the BOOL indicating if the frame represents the last frame from a foreign exception stack trace.
U1
*
pIsLastFrameFromForeignExceptionStackTraceU1
=
(
U1
*
)((
BOOLARRAYREF
)
pStackFrameHelper
->
rgiLastFrameFromForeignExceptionStackTrace
)
CLR_U1
*
pIsLastFrameFromForeignExceptionStackTraceU1
=
(
CLR_
U1
*
)((
BOOLARRAYREF
)
pStackFrameHelper
->
rgiLastFrameFromForeignExceptionStackTrace
)
->
GetDirectPointerToNonObjectElements
();
pIsLastFrameFromForeignExceptionStackTraceU1
[
iNumValidFrames
]
=
(
U1
)(
data
.
pElements
[
i
].
flags
&
STEF_LAST_FRAME_FROM_FOREIGN_STACK_TRACE
);
pIsLastFrameFromForeignExceptionStackTraceU1
[
iNumValidFrames
]
=
(
CLR_
U1
)(
data
.
pElements
[
i
].
flags
&
STEF_LAST_FRAME_FROM_FOREIGN_STACK_TRACE
);
}
MethodDesc
*
pMethod
=
data
.
pElements
[
i
].
pFunc
;
...
...
@@ -727,10 +727,10 @@ FCIMPL4(void, DebugStackTrace::GetStackFramesInternal,
if
(
fFileInfoSet
)
{
// Set the line and column numbers
I4
*
pI4Line
=
(
I4
*
)((
I4ARRAYREF
)
pStackFrameHelper
->
rgiLineNumber
)
->
GetDirectPointerToNonObjectElements
();
CLR_I4
*
pI4Line
=
(
CLR_
I4
*
)((
I4ARRAYREF
)
pStackFrameHelper
->
rgiLineNumber
)
->
GetDirectPointerToNonObjectElements
();
pI4Line
[
iNumValidFrames
]
=
sourceLine
;
I4
*
pI4Column
=
(
I4
*
)((
I4ARRAYREF
)
pStackFrameHelper
->
rgiColumnNumber
)
->
GetDirectPointerToNonObjectElements
();
CLR_I4
*
pI4Column
=
(
CLR_
I4
*
)((
I4ARRAYREF
)
pStackFrameHelper
->
rgiColumnNumber
)
->
GetDirectPointerToNonObjectElements
();
pI4Column
[
iNumValidFrames
]
=
sourceColumn
;
// Set the file name
...
...
@@ -745,7 +745,7 @@ FCIMPL4(void, DebugStackTrace::GetStackFramesInternal,
#endif // FEATURE_ISYM_READER
{
// Save MethodToken for the function
I4
*
pMethodToken
=
(
I4
*
)((
I4ARRAYREF
)
pStackFrameHelper
->
rgiMethodToken
)
->
GetDirectPointerToNonObjectElements
();
CLR_I4
*
pMethodToken
=
(
CLR_
I4
*
)((
I4ARRAYREF
)
pStackFrameHelper
->
rgiMethodToken
)
->
GetDirectPointerToNonObjectElements
();
pMethodToken
[
iNumValidFrames
]
=
pMethod
->
GetMemberDef
();
PEAssembly
*
pPEAssembly
=
pModule
->
GetPEAssembly
();
...
...
@@ -758,15 +758,15 @@ FCIMPL4(void, DebugStackTrace::GetStackFramesInternal,
PTR_CVOID
*
pLoadedPeAddress
=
(
PTR_CVOID
*
)
pStackFrameHelper
->
rgLoadedPeAddress
->
GetDataPtr
();
pLoadedPeAddress
[
iNumValidFrames
]
=
peAddress
;
I4
*
pLoadedPeSize
=
(
I4
*
)((
I4ARRAYREF
)
pStackFrameHelper
->
rgiLoadedPeSize
)
->
GetDirectPointerToNonObjectElements
();
pLoadedPeSize
[
iNumValidFrames
]
=
(
I4
)
peSize
;
CLR_I4
*
pLoadedPeSize
=
(
CLR_
I4
*
)((
I4ARRAYREF
)
pStackFrameHelper
->
rgiLoadedPeSize
)
->
GetDirectPointerToNonObjectElements
();
pLoadedPeSize
[
iNumValidFrames
]
=
(
CLR_
I4
)
peSize
;
// Set flag indicating PE file in memory has the on disk layout
if
(
!
pPEAssembly
->
IsDynamic
())
{
// This flag is only available for non-dynamic assemblies.
U1
*
pIsFileLayout
=
(
U1
*
)((
BOOLARRAYREF
)
pStackFrameHelper
->
rgiIsFileLayout
)
->
GetDirectPointerToNonObjectElements
();
pIsFileLayout
[
iNumValidFrames
]
=
(
U1
)
pPEAssembly
->
GetLoadedLayout
()
->
IsFlat
();
CLR_U1
*
pIsFileLayout
=
(
CLR_
U1
*
)((
BOOLARRAYREF
)
pStackFrameHelper
->
rgiIsFileLayout
)
->
GetDirectPointerToNonObjectElements
();
pIsFileLayout
[
iNumValidFrames
]
=
(
CLR_
U1
)
pPEAssembly
->
GetLoadedLayout
()
->
IsFlat
();
}
// If there is a in memory symbol stream
...
...
@@ -779,8 +779,8 @@ FCIMPL4(void, DebugStackTrace::GetStackFramesInternal,
PTR_VOID
*
pInMemoryPdbAddress
=
(
PTR_VOID
*
)
pStackFrameHelper
->
rgInMemoryPdbAddress
->
GetDataPtr
();
pInMemoryPdbAddress
[
iNumValidFrames
]
=
range
.
StartAddress
();
I4
*
pInMemoryPdbSize
=
(
I4
*
)((
I4ARRAYREF
)
pStackFrameHelper
->
rgiInMemoryPdbSize
)
->
GetDirectPointerToNonObjectElements
();
pInMemoryPdbSize
[
iNumValidFrames
]
=
(
I4
)
range
.
Size
();
CLR_I4
*
pInMemoryPdbSize
=
(
CLR_
I4
*
)((
I4ARRAYREF
)
pStackFrameHelper
->
rgiInMemoryPdbSize
)
->
GetDirectPointerToNonObjectElements
();
pInMemoryPdbSize
[
iNumValidFrames
]
=
(
CLR_
I4
)
range
.
Size
();
}
else
{
...
...
src/coreclr/vm/interoputil.cpp
浏览文件 @
3874c65f
...
...
@@ -1018,7 +1018,7 @@ namespace
if
(
FAILED
(
cap
.
ValidateProlog
()))
return
COR_E_BADIMAGEFORMAT
;
U
1
u1
;
U
INT8
u1
;
if
(
FAILED
(
cap
.
GetU1
(
&
u1
)))
return
COR_E_BADIMAGEFORMAT
;
...
...
src/coreclr/vm/invokeutil.cpp
浏览文件 @
3874c65f
...
...
@@ -338,10 +338,10 @@ void InvokeUtil::CreatePrimitiveValue(CorElementType dstType,
*
pDst
=
data
;
break
;
case
ELEMENT_TYPE_R4
:
*
pDst
=
(
I8
)(
*
(
R4
*
)
pSrc
);
*
pDst
=
(
CLR_I8
)(
*
(
CLR_
R4
*
)
pSrc
);
break
;
case
ELEMENT_TYPE_R8
:
*
pDst
=
(
I8
)(
*
(
R8
*
)
pSrc
);
*
pDst
=
(
CLR_I8
)(
*
(
CLR_
R8
*
)
pSrc
);
break
;
default:
_ASSERTE
(
!
"Unknown conversion"
);
...
...
@@ -352,35 +352,35 @@ void InvokeUtil::CreatePrimitiveValue(CorElementType dstType,
case
ELEMENT_TYPE_R4
:
case
ELEMENT_TYPE_R8
:
{
R8
r8
=
0
;
CLR_
R8
r8
=
0
;
switch
(
srcType
)
{
case
ELEMENT_TYPE_BOOLEAN
:
case
ELEMENT_TYPE_I1
:
case
ELEMENT_TYPE_I2
:
case
ELEMENT_TYPE_I4
:
IN_TARGET_32BIT
(
case
ELEMENT_TYPE_I
:)
r8
=
(
R8
)((
INT32
)
data
);
r8
=
(
CLR_
R8
)((
INT32
)
data
);
break
;
case
ELEMENT_TYPE_U1
:
case
ELEMENT_TYPE_CHAR
:
case
ELEMENT_TYPE_U2
:
case
ELEMENT_TYPE_U4
:
IN_TARGET_32BIT
(
case
ELEMENT_TYPE_U
:)
r8
=
(
R8
)((
UINT32
)
data
);
r8
=
(
CLR_
R8
)((
UINT32
)
data
);
break
;
case
ELEMENT_TYPE_U8
:
IN_TARGET_64BIT
(
case
ELEMENT_TYPE_U
:)
r8
=
(
R8
)((
UINT64
)
data
);
r8
=
(
CLR_
R8
)((
UINT64
)
data
);
break
;
case
ELEMENT_TYPE_I8
:
IN_TARGET_64BIT
(
case
ELEMENT_TYPE_I
:)
r8
=
(
R8
)((
INT64
)
data
);
r8
=
(
CLR_
R8
)((
INT64
)
data
);
break
;
case
ELEMENT_TYPE_R4
:
r8
=
*
(
R4
*
)
pSrc
;
r8
=
*
(
CLR_
R4
*
)
pSrc
;
break
;
case
ELEMENT_TYPE_R8
:
r8
=
*
(
R8
*
)
pSrc
;
r8
=
*
(
CLR_
R8
*
)
pSrc
;
break
;
default:
_ASSERTE
(
!
"Unknown R4 or R8 conversion"
);
...
...
@@ -389,7 +389,7 @@ void InvokeUtil::CreatePrimitiveValue(CorElementType dstType,
}
if
(
dstType
==
ELEMENT_TYPE_R4
)
{
R4
r4
=
(
R4
)
r8
;
CLR_R4
r4
=
(
CLR_
R4
)
r8
;
*
pDst
=
(
UINT32
&
)
r4
;
}
else
{
...
...
src/coreclr/vm/methodtable.cpp
浏览文件 @
3874c65f
...
...
@@ -6454,7 +6454,7 @@ void MethodTable::SetCl(mdTypeDef token)
}
else
{
_ASSERTE
(
FitsIn
<
U2
>
(
rid
));
_ASSERTE
(
FitsIn
<
WORD
>
(
rid
));
m_wToken
=
(
WORD
)
rid
;
}
...
...
src/coreclr/vm/object.h
浏览文件 @
3874c65f
...
...
@@ -785,18 +785,18 @@ public:
typedef
DPTR
(
TypedByRef
)
PTR_TypedByRef
;
typedef
Array
<
I1
>
I1Array
;
typedef
Array
<
I2
>
I2Array
;
typedef
Array
<
I4
>
I4Array
;
typedef
Array
<
I8
>
I8Array
;
typedef
Array
<
R4
>
R4Array
;
typedef
Array
<
R8
>
R8Array
;
typedef
Array
<
U1
>
U1Array
;
typedef
Array
<
U1
>
BOOLArray
;
typedef
Array
<
U2
>
U2Array
;
typedef
Array
<
WCHAR
>
CHARArray
;
typedef
Array
<
U4
>
U4Array
;
typedef
Array
<
U8
>
U8Array
;
typedef
Array
<
CLR_
I1
>
I1Array
;
typedef
Array
<
CLR_
I2
>
I2Array
;
typedef
Array
<
CLR_
I4
>
I4Array
;
typedef
Array
<
CLR_
I8
>
I8Array
;
typedef
Array
<
CLR_
R4
>
R4Array
;
typedef
Array
<
CLR_
R8
>
R8Array
;
typedef
Array
<
CLR_
U1
>
U1Array
;
typedef
Array
<
CLR_
U1
>
BOOLArray
;
typedef
Array
<
CLR_
U2
>
U2Array
;
typedef
Array
<
CLR_CHAR
>
CHARArray
;
typedef
Array
<
CLR_
U4
>
U4Array
;
typedef
Array
<
CLR_
U8
>
U8Array
;
typedef
Array
<
UPTR
>
UPTRArray
;
typedef
PtrArray
PTRArray
;
...
...
@@ -2184,7 +2184,7 @@ private:
return
dac_cast
<
PTR_StackTraceElement
>
(
GetRaw
()
+
sizeof
(
ArrayHeader
));
}
I1
const
*
GetRaw
()
const
CLR_
I1
const
*
GetRaw
()
const
{
WRAPPER_NO_CONTRACT
;
assert
(
!!
m_array
);
...
...
@@ -2192,13 +2192,13 @@ private:
return
const_cast
<
I1ARRAYREF
&>
(
m_array
)
->
GetDirectPointerToNonObjectElements
();
}
PTR_I
1
GetRaw
()
PTR_I
NT8
GetRaw
()
{
WRAPPER_NO_CONTRACT
;
SUPPORTS_DAC
;
assert
(
!!
m_array
);
return
dac_cast
<
PTR_I
1
>
(
m_array
->
GetDirectPointerToNonObjectElements
());
return
dac_cast
<
PTR_I
NT8
>
(
m_array
->
GetDirectPointerToNonObjectElements
());
}
ArrayHeader
const
*
GetHeader
()
const
...
...
src/coreclr/vm/olevariant.cpp
浏览文件 @
3874c65f
...
...
@@ -2812,7 +2812,7 @@ void OleVariant::MarshalOleVariantForObject(OBJECTREF * const & pObj, VARIANT *p
}
else
if
(
pMT
==
CoreLibBinder
::
GetElementType
(
ELEMENT_TYPE_BOOLEAN
))
{
V_BOOL
(
pOle
)
=
*
(
U1
*
)(
(
*
pObj
)
->
GetData
()
)
?
VARIANT_TRUE
:
VARIANT_FALSE
;
V_BOOL
(
pOle
)
=
*
(
CLR_BOOL
*
)(
(
*
pObj
)
->
GetData
()
)
?
VARIANT_TRUE
:
VARIANT_FALSE
;
V_VT
(
pOle
)
=
VT_BOOL
;
}
else
if
(
pMT
==
CoreLibBinder
::
GetElementType
(
ELEMENT_TYPE_I
))
...
...
@@ -2985,7 +2985,7 @@ HRESULT OleVariant::MarshalCommonOleRefVariantForObject(OBJECTREF *pObj, VARIANT
// deallocation of old value optimized away since there's nothing to
// deallocate for this vartype.
*
(
V_BOOLREF
(
pOle
))
=
(
*
(
U1
*
)(
(
*
pObj
)
->
GetData
()
)
)
?
VARIANT_TRUE
:
VARIANT_FALSE
;
*
(
V_BOOLREF
(
pOle
))
=
(
*
(
CLR_BOOL
*
)(
(
*
pObj
)
->
GetData
()
)
)
?
VARIANT_TRUE
:
VARIANT_FALSE
;
}
else
if
(
(
V_VT
(
pOle
)
==
(
VT_BYREF
|
VT_INT
)
||
V_VT
(
pOle
)
==
(
VT_BYREF
|
VT_UINT
))
&&
(
pMT
==
CoreLibBinder
::
GetElementType
(
ELEMENT_TYPE_I4
)
||
pMT
==
CoreLibBinder
::
GetElementType
(
ELEMENT_TYPE_U4
))
)
{
...
...
src/coreclr/vm/util.hpp
浏览文件 @
3874c65f
...
...
@@ -25,22 +25,6 @@
#define MAX_CACHE_LINE_SIZE 64
#endif
//========================================================================
// More convenient names for integer types of a guaranteed size.
//========================================================================
typedef
__int8
I1
;
typedef
ArrayDPTR
(
I1
)
PTR_I1
;
typedef
unsigned
__int8
U1
;
typedef
__int16
I2
;
typedef
unsigned
__int16
U2
;
typedef
__int32
I4
;
typedef
unsigned
__int32
U4
;
typedef
__int64
I8
;
typedef
unsigned
__int64
U8
;
typedef
float
R4
;
typedef
double
R8
;
#ifndef TARGET_UNIX
// Copied from malloc.h: don't want to bring in the whole header file.
void
*
__cdecl
_alloca
(
size_t
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录