Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
c3fe2590
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,发现更多精彩内容 >>
提交
c3fe2590
编写于
1月 02, 2017
作者:
M
Mark Simulacrum
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Inline and remove Builder::entry_block
上级
ba37c918
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
7 addition
and
11 deletion
+7
-11
src/librustc_trans/base.rs
src/librustc_trans/base.rs
+1
-1
src/librustc_trans/builder.rs
src/librustc_trans/builder.rs
+0
-4
src/librustc_trans/callee.rs
src/librustc_trans/callee.rs
+2
-2
src/librustc_trans/glue.rs
src/librustc_trans/glue.rs
+1
-1
src/librustc_trans/intrinsic.rs
src/librustc_trans/intrinsic.rs
+1
-1
src/librustc_trans/meth.rs
src/librustc_trans/meth.rs
+1
-1
src/librustc_trans/mir/mod.rs
src/librustc_trans/mir/mod.rs
+1
-1
未找到文件。
src/librustc_trans/base.rs
浏览文件 @
c3fe2590
...
...
@@ -610,7 +610,7 @@ pub fn trans_ctor_shim<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
let
sig
=
ccx
.tcx
()
.erase_late_bound_regions_and_normalize
(
&
ctor_ty
.fn_sig
());
let
fn_ty
=
FnType
::
new
(
ccx
,
Abi
::
Rust
,
&
sig
,
&
[]);
let
bcx
=
Builder
::
entry_block
(
ccx
,
llfn
);
let
bcx
=
Builder
::
new_block
(
ccx
,
llfn
,
"entry-block"
);
if
!
fn_ty
.ret
.is_ignore
()
{
// But if there are no nested returns, we skip the indirection
// and have a single retslot
...
...
src/librustc_trans/builder.rs
浏览文件 @
c3fe2590
...
...
@@ -51,10 +51,6 @@ fn noname() -> *const c_char {
}
impl
<
'a
,
'tcx
>
Builder
<
'a
,
'tcx
>
{
pub
fn
entry_block
(
ccx
:
&
'a
CrateContext
<
'a
,
'tcx
>
,
llfn
:
ValueRef
)
->
Self
{
Builder
::
new_block
(
ccx
,
llfn
,
"entry-block"
)
}
pub
fn
new_block
<
'b
>
(
ccx
:
&
'a
CrateContext
<
'a
,
'tcx
>
,
llfn
:
ValueRef
,
name
:
&
'b
str
)
->
Self
{
let
builder
=
Builder
::
with_ccx
(
ccx
);
let
llbb
=
unsafe
{
...
...
src/librustc_trans/callee.rs
浏览文件 @
c3fe2590
...
...
@@ -329,7 +329,7 @@ fn trans_fn_once_adapter_shim<'a, 'tcx>(
attributes
::
set_frame_pointer_elimination
(
ccx
,
lloncefn
);
let
orig_fn_ty
=
fn_ty
;
let
mut
bcx
=
Builder
::
entry_block
(
ccx
,
lloncefn
);
let
mut
bcx
=
Builder
::
new_block
(
ccx
,
lloncefn
,
"entry-block"
);
let
callee
=
Callee
{
data
:
Fn
(
llreffn
),
...
...
@@ -489,7 +489,7 @@ fn trans_fn_pointer_shim<'a, 'tcx>(
let
llfn
=
declare
::
define_internal_fn
(
ccx
,
&
function_name
,
tuple_fn_ty
);
attributes
::
set_frame_pointer_elimination
(
ccx
,
llfn
);
//
let
bcx
=
Builder
::
entry_block
(
ccx
,
llfn
);
let
bcx
=
Builder
::
new_block
(
ccx
,
llfn
,
"entry-block"
);
let
mut
llargs
=
get_params
(
llfn
);
...
...
src/librustc_trans/glue.rs
浏览文件 @
c3fe2590
...
...
@@ -173,7 +173,7 @@ pub fn implement_drop_glue<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, g: DropGlueKi
assert_eq!
(
g
.ty
(),
get_drop_glue_type
(
ccx
.shared
(),
g
.ty
()));
let
(
llfn
,
_
)
=
ccx
.drop_glues
()
.borrow
()
.get
(
&
g
)
.unwrap
()
.clone
();
let
mut
bcx
=
Builder
::
entry_block
(
ccx
,
llfn
);
let
mut
bcx
=
Builder
::
new_block
(
ccx
,
llfn
,
"entry-block"
);
ccx
.stats
()
.n_glues_created
.set
(
ccx
.stats
()
.n_glues_created
.get
()
+
1
);
// All glue functions take values passed *by alias*; this is a
...
...
src/librustc_trans/intrinsic.rs
浏览文件 @
c3fe2590
...
...
@@ -883,7 +883,7 @@ fn gen_fn<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
sig
:
ty
::
Binder
(
sig
)
}));
let
llfn
=
declare
::
define_internal_fn
(
ccx
,
name
,
rust_fn_ty
);
let
bcx
=
Builder
::
entry_block
(
ccx
,
llfn
);
let
bcx
=
Builder
::
new_block
(
ccx
,
llfn
,
"entry-block"
);
trans
(
bcx
);
llfn
}
...
...
src/librustc_trans/meth.rs
浏览文件 @
c3fe2590
...
...
@@ -76,7 +76,7 @@ pub fn trans_object_shim<'a, 'tcx>(ccx: &'a CrateContext<'a, 'tcx>,
let
llfn
=
declare
::
define_internal_fn
(
ccx
,
&
function_name
,
callee
.ty
);
attributes
::
set_frame_pointer_elimination
(
ccx
,
llfn
);
let
bcx
=
Builder
::
entry_block
(
ccx
,
llfn
);
let
bcx
=
Builder
::
new_block
(
ccx
,
llfn
,
"entry-block"
);
let
mut
llargs
=
get_params
(
llfn
);
let
fn_ret
=
callee
.ty
.fn_ret
();
...
...
src/librustc_trans/mir/mod.rs
浏览文件 @
c3fe2590
...
...
@@ -210,7 +210,7 @@ pub fn trans_mir<'a, 'tcx: 'a>(
debug!
(
"fn_ty: {:?}"
,
fn_ty
);
let
debug_context
=
debuginfo
::
create_function_debug_context
(
ccx
,
instance
,
sig
,
abi
,
llfn
,
mir
);
let
bcx
=
Builder
::
entry_block
(
ccx
,
llfn
);
let
bcx
=
Builder
::
new_block
(
ccx
,
llfn
,
"entry-block"
);
let
cleanup_kinds
=
analyze
::
cleanup_kinds
(
&
mir
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录