Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
a2ff845f
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,发现更多精彩内容 >>
提交
a2ff845f
编写于
8月 18, 2018
作者:
D
Donato Sciarra
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mv CachingCodemapView CachingSourceMapView
上级
062bfbf3
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
13 deletion
+13
-13
src/librustc/ich/caching_codemap_view.rs
src/librustc/ich/caching_codemap_view.rs
+4
-4
src/librustc/ich/hcx.rs
src/librustc/ich/hcx.rs
+5
-5
src/librustc/ich/mod.rs
src/librustc/ich/mod.rs
+1
-1
src/librustc/ty/query/on_disk_cache.rs
src/librustc/ty/query/on_disk_cache.rs
+3
-3
未找到文件。
src/librustc/ich/caching_codemap_view.rs
浏览文件 @
a2ff845f
...
...
@@ -23,14 +23,14 @@ struct CacheEntry {
}
#[derive(Clone)]
pub
struct
Caching
Codem
apView
<
'cm
>
{
pub
struct
Caching
SourceM
apView
<
'cm
>
{
source_map
:
&
'cm
SourceMap
,
line_cache
:
[
CacheEntry
;
3
],
time_stamp
:
usize
,
}
impl
<
'cm
>
Caching
Codem
apView
<
'cm
>
{
pub
fn
new
(
source_map
:
&
'cm
SourceMap
)
->
Caching
Codem
apView
<
'cm
>
{
impl
<
'cm
>
Caching
SourceM
apView
<
'cm
>
{
pub
fn
new
(
source_map
:
&
'cm
SourceMap
)
->
Caching
SourceM
apView
<
'cm
>
{
let
files
=
source_map
.files
();
let
first_file
=
files
[
0
]
.clone
();
let
entry
=
CacheEntry
{
...
...
@@ -42,7 +42,7 @@ pub fn new(source_map: &'cm SourceMap) -> CachingCodemapView<'cm> {
file_index
:
0
,
};
Caching
Codem
apView
{
Caching
SourceM
apView
{
source_map
,
line_cache
:
[
entry
.clone
(),
entry
.clone
(),
entry
.clone
()],
time_stamp
:
0
,
...
...
src/librustc/ich/hcx.rs
浏览文件 @
a2ff845f
...
...
@@ -12,7 +12,7 @@
use
hir
::
def_id
::{
DefId
,
DefIndex
};
use
hir
::
map
::
DefPathHash
;
use
hir
::
map
::
definitions
::
Definitions
;
use
ich
::{
self
,
Caching
Codem
apView
,
Fingerprint
};
use
ich
::{
self
,
Caching
SourceM
apView
,
Fingerprint
};
use
middle
::
cstore
::
CrateStore
;
use
ty
::{
TyCtxt
,
fast_reject
};
use
mir
::
interpret
::
AllocId
;
...
...
@@ -57,9 +57,9 @@ pub struct StableHashingContext<'a> {
node_id_hashing_mode
:
NodeIdHashingMode
,
// Very often, we are hashing something that does not need the
// Caching
Codem
apView, so we initialize it lazily.
// Caching
SourceM
apView, so we initialize it lazily.
raw_source_map
:
&
'a
SourceMap
,
caching_source_map
:
Option
<
Caching
Codem
apView
<
'a
>>
,
caching_source_map
:
Option
<
Caching
SourceM
apView
<
'a
>>
,
pub
(
super
)
alloc_id_recursion_tracker
:
FxHashSet
<
AllocId
>
,
}
...
...
@@ -169,13 +169,13 @@ pub fn hash_bodies(&self) -> bool {
}
#[inline]
pub
fn
source_map
(
&
mut
self
)
->
&
mut
Caching
Codem
apView
<
'a
>
{
pub
fn
source_map
(
&
mut
self
)
->
&
mut
Caching
SourceM
apView
<
'a
>
{
match
self
.caching_source_map
{
Some
(
ref
mut
cm
)
=>
{
cm
}
ref
mut
none
=>
{
*
none
=
Some
(
Caching
Codem
apView
::
new
(
self
.raw_source_map
));
*
none
=
Some
(
Caching
SourceM
apView
::
new
(
self
.raw_source_map
));
none
.as_mut
()
.unwrap
()
}
}
...
...
src/librustc/ich/mod.rs
浏览文件 @
a2ff845f
...
...
@@ -11,7 +11,7 @@
//! ICH - Incremental Compilation Hash
crate
use
rustc_data_structures
::
fingerprint
::
Fingerprint
;
pub
use
self
::
caching_codemap_view
::
Caching
Codem
apView
;
pub
use
self
::
caching_codemap_view
::
Caching
SourceM
apView
;
pub
use
self
::
hcx
::{
StableHashingContextProvider
,
StableHashingContext
,
NodeIdHashingMode
,
hash_stable_trait_impls
};
mod
caching_codemap_view
;
...
...
src/librustc/ty/query/on_disk_cache.rs
浏览文件 @
a2ff845f
...
...
@@ -14,7 +14,7 @@
use
hir
::
def_id
::{
CrateNum
,
DefIndex
,
DefId
,
LocalDefId
,
RESERVED_FOR_INCR_COMP_CACHE
,
LOCAL_CRATE
};
use
hir
::
map
::
definitions
::
DefPathHash
;
use
ich
::{
Caching
Codem
apView
,
Fingerprint
};
use
ich
::{
Caching
SourceM
apView
,
Fingerprint
};
use
mir
::{
self
,
interpret
};
use
mir
::
interpret
::{
AllocDecodingSession
,
AllocDecodingState
};
use
rustc_data_structures
::
fx
::
FxHashMap
;
...
...
@@ -196,7 +196,7 @@ pub fn serialize<'a, 'tcx, E>(&self,
expn_info_shorthands
:
FxHashMap
(),
interpret_allocs
:
FxHashMap
(),
interpret_allocs_inverse
:
Vec
::
new
(),
source_map
:
Caching
Codem
apView
::
new
(
tcx
.sess
.source_map
()),
source_map
:
Caching
SourceM
apView
::
new
(
tcx
.sess
.source_map
()),
file_to_file_index
,
};
...
...
@@ -770,7 +770,7 @@ struct CacheEncoder<'enc, 'a, 'tcx, E>
expn_info_shorthands
:
FxHashMap
<
Mark
,
AbsoluteBytePos
>
,
interpret_allocs
:
FxHashMap
<
interpret
::
AllocId
,
usize
>
,
interpret_allocs_inverse
:
Vec
<
interpret
::
AllocId
>
,
source_map
:
Caching
Codem
apView
<
'tcx
>
,
source_map
:
Caching
SourceM
apView
<
'tcx
>
,
file_to_file_index
:
FxHashMap
<*
const
SourceFile
,
SourceFileIndex
>
,
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录