Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
10e289e1
R
Rust
项目概览
int
/
Rust
接近 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
10e289e1
编写于
10月 16, 2017
作者:
M
Michael Woerister
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make debuginfo::UniqueTypeId use 128 bit hash.
上级
74ebad4b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
3 addition
and
35 deletion
+3
-35
src/librustc_data_structures/stable_hasher.rs
src/librustc_data_structures/stable_hasher.rs
+0
-31
src/librustc_trans/debuginfo/metadata.rs
src/librustc_trans/debuginfo/metadata.rs
+3
-4
未找到文件。
src/librustc_data_structures/stable_hasher.rs
浏览文件 @
10e289e1
...
...
@@ -61,37 +61,6 @@ pub fn finish(self) -> W {
}
}
impl
StableHasherResult
for
[
u8
;
20
]
{
fn
finish
(
hasher
:
StableHasher
<
Self
>
)
->
Self
{
let
(
_0
,
_1
)
=
hasher
.finalize
();
[
(
_0
>>
0
)
as
u8
,
(
_0
>>
8
)
as
u8
,
(
_0
>>
16
)
as
u8
,
(
_0
>>
24
)
as
u8
,
(
_0
>>
32
)
as
u8
,
(
_0
>>
40
)
as
u8
,
(
_0
>>
48
)
as
u8
,
(
_0
>>
56
)
as
u8
,
17
,
33
,
47
,
3
,
(
_1
>>
0
)
as
u8
,
(
_1
>>
8
)
as
u8
,
(
_1
>>
16
)
as
u8
,
(
_1
>>
24
)
as
u8
,
(
_1
>>
32
)
as
u8
,
(
_1
>>
40
)
as
u8
,
(
_1
>>
48
)
as
u8
,
(
_1
>>
56
)
as
u8
,
]
}
}
impl
StableHasherResult
for
u128
{
fn
finish
(
hasher
:
StableHasher
<
Self
>
)
->
Self
{
let
(
_0
,
_1
)
=
hasher
.finalize
();
...
...
src/librustc_trans/debuginfo/metadata.rs
浏览文件 @
10e289e1
...
...
@@ -30,7 +30,7 @@
use
rustc
::
ty
::
subst
::
Substs
;
use
rustc
::
ty
::
util
::
TypeIdHasher
;
use
rustc
::
hir
;
use
rustc
_data_structures
::
ToHex
;
use
rustc
::
ich
::
Fingerprint
;
use
{
type_of
,
machine
,
monomorphize
};
use
common
::{
self
,
CrateContext
};
use
type_
::
Type
;
...
...
@@ -146,11 +146,10 @@ fn get_unique_type_id_of_type<'a>(&mut self, cx: &CrateContext<'a, 'tcx>,
// The hasher we are using to generate the UniqueTypeId. We want
// something that provides more than the 64 bits of the DefaultHasher.
let
mut
type_id_hasher
=
TypeIdHasher
::
<
[
u8
;
20
]
>
::
new
(
cx
.tcx
());
let
mut
type_id_hasher
=
TypeIdHasher
::
<
Fingerprint
>
::
new
(
cx
.tcx
());
type_id_hasher
.visit_ty
(
type_
);
let
unique_type_id
=
type_id_hasher
.finish
()
.to_hex
();
let
key
=
self
.unique_id_interner
.intern
(
&
unique_type_id
);
self
.type_to_unique_id
.insert
(
type_
,
UniqueTypeId
(
key
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录