Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
runtime
提交
0bd58320
R
runtime
项目概览
dotNET Platform
/
runtime
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
未验证
提交
0bd58320
编写于
11月 22, 2019
作者:
J
Jan Kotas
提交者:
GitHub
11月 22, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Delete unnecessary intrinsic attributes (#216)
These are left-over from .NET Native. Not needed for RyuJIT or Mono.
上级
d996a917
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
0 addition
and
34 deletion
+0
-34
src/libraries/System.Private.CoreLib/src/System/IntPtr.cs
src/libraries/System.Private.CoreLib/src/System/IntPtr.cs
+0
-17
src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs
src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs
+0
-17
未找到文件。
src/libraries/System.Private.CoreLib/src/System/IntPtr.cs
浏览文件 @
0bd58320
...
@@ -29,14 +29,12 @@ namespace System
...
@@ -29,14 +29,12 @@ namespace System
[
Intrinsic
]
[
Intrinsic
]
public
static
readonly
IntPtr
Zero
;
public
static
readonly
IntPtr
Zero
;
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
unsafe
IntPtr
(
int
value
)
public
unsafe
IntPtr
(
int
value
)
{
{
_value
=
(
void
*)
value
;
_value
=
(
void
*)
value
;
}
}
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
unsafe
IntPtr
(
long
value
)
public
unsafe
IntPtr
(
long
value
)
{
{
...
@@ -48,7 +46,6 @@ public unsafe IntPtr(long value)
...
@@ -48,7 +46,6 @@ public unsafe IntPtr(long value)
}
}
[
CLSCompliant
(
false
)]
[
CLSCompliant
(
false
)]
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
unsafe
IntPtr
(
void
*
value
)
public
unsafe
IntPtr
(
void
*
value
)
{
{
...
@@ -90,7 +87,6 @@ public override unsafe int GetHashCode()
...
@@ -90,7 +87,6 @@ public override unsafe int GetHashCode()
#endif
#endif
}
}
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
unsafe
int
ToInt32
()
public
unsafe
int
ToInt32
()
{
{
...
@@ -102,34 +98,28 @@ public unsafe int ToInt32()
...
@@ -102,34 +98,28 @@ public unsafe int ToInt32()
#endif
#endif
}
}
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
unsafe
long
ToInt64
()
=>
public
unsafe
long
ToInt64
()
=>
(
nint
)
_value
;
(
nint
)
_value
;
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
unsafe
explicit
operator
IntPtr
(
int
value
)
=>
public
static
unsafe
explicit
operator
IntPtr
(
int
value
)
=>
new
IntPtr
(
value
);
new
IntPtr
(
value
);
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
unsafe
explicit
operator
IntPtr
(
long
value
)
=>
public
static
unsafe
explicit
operator
IntPtr
(
long
value
)
=>
new
IntPtr
(
value
);
new
IntPtr
(
value
);
[
CLSCompliant
(
false
)]
[
CLSCompliant
(
false
)]
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
unsafe
explicit
operator
IntPtr
(
void
*
value
)
=>
public
static
unsafe
explicit
operator
IntPtr
(
void
*
value
)
=>
new
IntPtr
(
value
);
new
IntPtr
(
value
);
[
CLSCompliant
(
false
)]
[
CLSCompliant
(
false
)]
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
unsafe
explicit
operator
void
*(
IntPtr
value
)
=>
public
static
unsafe
explicit
operator
void
*(
IntPtr
value
)
=>
value
.
_value
;
value
.
_value
;
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
unsafe
explicit
operator
int
(
IntPtr
value
)
public
static
unsafe
explicit
operator
int
(
IntPtr
value
)
{
{
...
@@ -141,17 +131,14 @@ public unsafe int ToInt32()
...
@@ -141,17 +131,14 @@ public unsafe int ToInt32()
#endif
#endif
}
}
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
unsafe
explicit
operator
long
(
IntPtr
value
)
=>
public
static
unsafe
explicit
operator
long
(
IntPtr
value
)
=>
(
nint
)
value
.
_value
;
(
nint
)
value
.
_value
;
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
unsafe
bool
operator
==(
IntPtr
value1
,
IntPtr
value2
)
=>
public
static
unsafe
bool
operator
==(
IntPtr
value1
,
IntPtr
value2
)
=>
value1
.
_value
==
value2
.
_value
;
value1
.
_value
==
value2
.
_value
;
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
unsafe
bool
operator
!=(
IntPtr
value1
,
IntPtr
value2
)
=>
public
static
unsafe
bool
operator
!=(
IntPtr
value1
,
IntPtr
value2
)
=>
value1
.
_value
!=
value2
.
_value
;
value1
.
_value
!=
value2
.
_value
;
...
@@ -160,7 +147,6 @@ public unsafe int ToInt32()
...
@@ -160,7 +147,6 @@ public unsafe int ToInt32()
public
static
IntPtr
Add
(
IntPtr
pointer
,
int
offset
)
=>
public
static
IntPtr
Add
(
IntPtr
pointer
,
int
offset
)
=>
pointer
+
offset
;
pointer
+
offset
;
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
unsafe
IntPtr
operator
+(
IntPtr
pointer
,
int
offset
)
=>
public
static
unsafe
IntPtr
operator
+(
IntPtr
pointer
,
int
offset
)
=>
new
IntPtr
((
nint
)
pointer
.
_value
+
offset
);
new
IntPtr
((
nint
)
pointer
.
_value
+
offset
);
...
@@ -169,20 +155,17 @@ public unsafe int ToInt32()
...
@@ -169,20 +155,17 @@ public unsafe int ToInt32()
public
static
IntPtr
Subtract
(
IntPtr
pointer
,
int
offset
)
=>
public
static
IntPtr
Subtract
(
IntPtr
pointer
,
int
offset
)
=>
pointer
-
offset
;
pointer
-
offset
;
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
unsafe
IntPtr
operator
-(
IntPtr
pointer
,
int
offset
)
=>
public
static
unsafe
IntPtr
operator
-(
IntPtr
pointer
,
int
offset
)
=>
new
IntPtr
((
nint
)
pointer
.
_value
-
offset
);
new
IntPtr
((
nint
)
pointer
.
_value
-
offset
);
public
static
int
Size
public
static
int
Size
{
{
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
get
=>
sizeof
(
nint
);
get
=>
sizeof
(
nint
);
}
}
[
CLSCompliant
(
false
)]
[
CLSCompliant
(
false
)]
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
unsafe
void
*
ToPointer
()
=>
_value
;
public
unsafe
void
*
ToPointer
()
=>
_value
;
...
...
src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs
浏览文件 @
0bd58320
...
@@ -26,14 +26,12 @@ namespace System
...
@@ -26,14 +26,12 @@ namespace System
[
Intrinsic
]
[
Intrinsic
]
public
static
readonly
UIntPtr
Zero
;
public
static
readonly
UIntPtr
Zero
;
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
unsafe
UIntPtr
(
uint
value
)
public
unsafe
UIntPtr
(
uint
value
)
{
{
_value
=
(
void
*)
value
;
_value
=
(
void
*)
value
;
}
}
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
unsafe
UIntPtr
(
ulong
value
)
public
unsafe
UIntPtr
(
ulong
value
)
{
{
...
@@ -44,7 +42,6 @@ public unsafe UIntPtr(ulong value)
...
@@ -44,7 +42,6 @@ public unsafe UIntPtr(ulong value)
#endif
#endif
}
}
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
unsafe
UIntPtr
(
void
*
value
)
public
unsafe
UIntPtr
(
void
*
value
)
{
{
...
@@ -91,7 +88,6 @@ public override unsafe int GetHashCode()
...
@@ -91,7 +88,6 @@ public override unsafe int GetHashCode()
#endif
#endif
}
}
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
unsafe
uint
ToUInt32
()
public
unsafe
uint
ToUInt32
()
{
{
...
@@ -102,31 +98,25 @@ public unsafe uint ToUInt32()
...
@@ -102,31 +98,25 @@ public unsafe uint ToUInt32()
#endif
#endif
}
}
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
unsafe
ulong
ToUInt64
()
=>
(
ulong
)
_value
;
public
unsafe
ulong
ToUInt64
()
=>
(
ulong
)
_value
;
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
explicit
operator
UIntPtr
(
uint
value
)
=>
public
static
explicit
operator
UIntPtr
(
uint
value
)
=>
new
UIntPtr
(
value
);
new
UIntPtr
(
value
);
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
explicit
operator
UIntPtr
(
ulong
value
)
=>
public
static
explicit
operator
UIntPtr
(
ulong
value
)
=>
new
UIntPtr
(
value
);
new
UIntPtr
(
value
);
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
unsafe
explicit
operator
UIntPtr
(
void
*
value
)
=>
public
static
unsafe
explicit
operator
UIntPtr
(
void
*
value
)
=>
new
UIntPtr
(
value
);
new
UIntPtr
(
value
);
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
unsafe
explicit
operator
void
*(
UIntPtr
value
)
=>
public
static
unsafe
explicit
operator
void
*(
UIntPtr
value
)
=>
value
.
_value
;
value
.
_value
;
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
unsafe
explicit
operator
uint
(
UIntPtr
value
)
=>
public
static
unsafe
explicit
operator
uint
(
UIntPtr
value
)
=>
#if BIT64
#if BIT64
...
@@ -135,17 +125,14 @@ public unsafe uint ToUInt32()
...
@@ -135,17 +125,14 @@ public unsafe uint ToUInt32()
(
uint
)
value
.
_value
;
(
uint
)
value
.
_value
;
#endif
#endif
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
unsafe
explicit
operator
ulong
(
UIntPtr
value
)
=>
public
static
unsafe
explicit
operator
ulong
(
UIntPtr
value
)
=>
(
ulong
)
value
.
_value
;
(
ulong
)
value
.
_value
;
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
unsafe
bool
operator
==(
UIntPtr
value1
,
UIntPtr
value2
)
=>
public
static
unsafe
bool
operator
==(
UIntPtr
value1
,
UIntPtr
value2
)
=>
value1
.
_value
==
value2
.
_value
;
value1
.
_value
==
value2
.
_value
;
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
unsafe
bool
operator
!=(
UIntPtr
value1
,
UIntPtr
value2
)
=>
public
static
unsafe
bool
operator
!=(
UIntPtr
value1
,
UIntPtr
value2
)
=>
value1
.
_value
!=
value2
.
_value
;
value1
.
_value
!=
value2
.
_value
;
...
@@ -154,7 +141,6 @@ public unsafe uint ToUInt32()
...
@@ -154,7 +141,6 @@ public unsafe uint ToUInt32()
public
static
UIntPtr
Add
(
UIntPtr
pointer
,
int
offset
)
=>
public
static
UIntPtr
Add
(
UIntPtr
pointer
,
int
offset
)
=>
pointer
+
offset
;
pointer
+
offset
;
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
unsafe
UIntPtr
operator
+(
UIntPtr
pointer
,
int
offset
)
=>
public
static
unsafe
UIntPtr
operator
+(
UIntPtr
pointer
,
int
offset
)
=>
new
UIntPtr
((
nuint
)
pointer
.
_value
+
(
nuint
)
offset
);
new
UIntPtr
((
nuint
)
pointer
.
_value
+
(
nuint
)
offset
);
...
@@ -163,19 +149,16 @@ public unsafe uint ToUInt32()
...
@@ -163,19 +149,16 @@ public unsafe uint ToUInt32()
public
static
UIntPtr
Subtract
(
UIntPtr
pointer
,
int
offset
)
=>
public
static
UIntPtr
Subtract
(
UIntPtr
pointer
,
int
offset
)
=>
pointer
-
offset
;
pointer
-
offset
;
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
static
unsafe
UIntPtr
operator
-(
UIntPtr
pointer
,
int
offset
)
=>
public
static
unsafe
UIntPtr
operator
-(
UIntPtr
pointer
,
int
offset
)
=>
new
UIntPtr
((
nuint
)
pointer
.
_value
-
(
nuint
)
offset
);
new
UIntPtr
((
nuint
)
pointer
.
_value
-
(
nuint
)
offset
);
public
static
int
Size
public
static
int
Size
{
{
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
get
=>
sizeof
(
nuint
);
get
=>
sizeof
(
nuint
);
}
}
[
Intrinsic
]
[
NonVersionable
]
[
NonVersionable
]
public
unsafe
void
*
ToPointer
()
=>
_value
;
public
unsafe
void
*
ToPointer
()
=>
_value
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录