Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
6e311e7a
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,发现更多精彩内容 >>
提交
6e311e7a
编写于
8月 05, 2015
作者:
B
Björn Steinbrink
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make C_u8 take a u8 instead of a usize value
上级
8228240c
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
8 addition
and
8 deletion
+8
-8
src/librustc_trans/trans/_match.rs
src/librustc_trans/trans/_match.rs
+1
-1
src/librustc_trans/trans/adt.rs
src/librustc_trans/trans/adt.rs
+2
-2
src/librustc_trans/trans/base.rs
src/librustc_trans/trans/base.rs
+2
-2
src/librustc_trans/trans/common.rs
src/librustc_trans/trans/common.rs
+1
-1
src/librustc_trans/trans/datum.rs
src/librustc_trans/trans/datum.rs
+1
-1
src/librustc_trans/trans/expr.rs
src/librustc_trans/trans/expr.rs
+1
-1
未找到文件。
src/librustc_trans/trans/_match.rs
浏览文件 @
6e311e7a
...
...
@@ -1670,7 +1670,7 @@ fn create_dummy_locals<'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
// Dummy-locals start out uninitialized, so set their
// drop-flag hints (if any) to "moved."
if
let
Some
(
hint
)
=
kind
.dropflag_hint
(
bcx
)
{
let
moved_hint
=
adt
::
DTOR_MOVED_HINT
as
usize
;
let
moved_hint
=
adt
::
DTOR_MOVED_HINT
;
debug!
(
"store moved_hint={} for hint={:?}, uninitialized dummy"
,
moved_hint
,
hint
);
Store
(
bcx
,
C_u8
(
bcx
.fcx.ccx
,
moved_hint
),
hint
.to_value
()
.value
());
...
...
src/librustc_trans/trans/adt.rs
浏览文件 @
6e311e7a
...
...
@@ -983,7 +983,7 @@ pub fn trans_set_discr<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, r: &Repr<'tcx>,
if
dtor_active
(
dtor
)
{
let
ptr
=
trans_field_ptr
(
bcx
,
r
,
val
,
discr
,
cases
[
discr
as
usize
]
.fields
.len
()
-
2
);
Store
(
bcx
,
C_u8
(
bcx
.ccx
(),
DTOR_NEEDED
as
usize
),
ptr
);
Store
(
bcx
,
C_u8
(
bcx
.ccx
(),
DTOR_NEEDED
),
ptr
);
}
Store
(
bcx
,
C_integral
(
ll_inttype
(
bcx
.ccx
(),
ity
),
discr
as
u64
,
true
),
GEPi
(
bcx
,
val
,
&
[
0
,
0
]));
...
...
@@ -991,7 +991,7 @@ pub fn trans_set_discr<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, r: &Repr<'tcx>,
Univariant
(
ref
st
,
dtor
)
=>
{
assert_eq!
(
discr
,
0
);
if
dtor_active
(
dtor
)
{
Store
(
bcx
,
C_u8
(
bcx
.ccx
(),
DTOR_NEEDED
as
usize
),
Store
(
bcx
,
C_u8
(
bcx
.ccx
(),
DTOR_NEEDED
),
GEPi
(
bcx
,
val
,
&
[
0
,
st
.fields
.len
()
-
1
]));
}
}
...
...
src/librustc_trans/trans/base.rs
浏览文件 @
6e311e7a
...
...
@@ -999,7 +999,7 @@ fn memfill<'a, 'tcx>(b: &Builder<'a, 'tcx>, llptr: ValueRef, ty: Ty<'tcx>, byte:
let
llintrinsicfn
=
ccx
.get_intrinsic
(
&
intrinsic_key
);
let
llptr
=
b
.pointercast
(
llptr
,
Type
::
i8
(
ccx
)
.ptr_to
());
let
llzeroval
=
C_u8
(
ccx
,
byte
as
usize
);
let
llzeroval
=
C_u8
(
ccx
,
byte
);
let
size
=
machine
::
llsize_of
(
ccx
,
llty
);
let
align
=
C_i32
(
ccx
,
type_of
::
align_of
(
ccx
,
ty
)
as
i32
);
let
volatile
=
C_bool
(
ccx
,
false
);
...
...
@@ -1296,7 +1296,7 @@ pub fn init_function<'a, 'tcx>(fcx: &'a FunctionContext<'a, 'tcx>,
for
&
info
in
fragment_infos
{
let
make_datum
=
|
id
|
{
let
init_val
=
C_u8
(
fcx
.ccx
,
adt
::
DTOR_NEEDED_HINT
as
usize
);
let
init_val
=
C_u8
(
fcx
.ccx
,
adt
::
DTOR_NEEDED_HINT
);
let
llname
=
&
format!
(
"dropflag_hint_{}"
,
id
);
debug!
(
"adding hint {}"
,
llname
);
let
ptr
=
alloc_ty
(
entry_bcx
,
tcx
.types.u8
,
llname
);
...
...
src/librustc_trans/trans/common.rs
浏览文件 @
6e311e7a
...
...
@@ -807,7 +807,7 @@ impl AsU64 for u64 { fn as_u64(self) -> u64 { self as u64 }}
impl
AsU64
for
u32
{
fn
as_u64
(
self
)
->
u64
{
self
as
u64
}}
impl
AsU64
for
usize
{
fn
as_u64
(
self
)
->
u64
{
self
as
u64
}}
pub
fn
C_u8
(
ccx
:
&
CrateContext
,
i
:
u
size
)
->
ValueRef
{
pub
fn
C_u8
(
ccx
:
&
CrateContext
,
i
:
u
8
)
->
ValueRef
{
C_integral
(
Type
::
i8
(
ccx
),
i
as
u64
,
false
)
}
...
...
src/librustc_trans/trans/datum.rs
浏览文件 @
6e311e7a
...
...
@@ -409,7 +409,7 @@ fn post_store<'blk, 'tcx>(&self,
// aware of drop-hint won't bother calling the
// drop-glue itself.
if
let
Some
(
hint_datum
)
=
self
.drop_flag_info
.hint_datum
(
bcx
)
{
let
moved_hint_byte
=
adt
::
DTOR_MOVED_HINT
as
usize
;
let
moved_hint_byte
=
adt
::
DTOR_MOVED_HINT
;
let
hint_llval
=
hint_datum
.to_value
()
.value
();
Store
(
bcx
,
C_u8
(
bcx
.fcx.ccx
,
moved_hint_byte
),
hint_llval
);
}
...
...
src/librustc_trans/trans/expr.rs
浏览文件 @
6e311e7a
...
...
@@ -1021,7 +1021,7 @@ fn trans_rvalue_stmt_unadjusted<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
// its drop-hint (if any) says "initialized."
if
let
Some
(
hint_val
)
=
opt_hint_val
{
let
hint_llval
=
hint_val
.value
();
let
drop_needed
=
C_u8
(
bcx
.fcx.ccx
,
adt
::
DTOR_NEEDED_HINT
as
usize
);
let
drop_needed
=
C_u8
(
bcx
.fcx.ccx
,
adt
::
DTOR_NEEDED_HINT
);
Store
(
bcx
,
drop_needed
,
hint_llval
);
}
src_datum
.store_to
(
bcx
,
dst_datum
.val
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录