Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
a131c518
R
Rust
项目概览
int
/
Rust
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
a131c518
编写于
4月 26, 2018
作者:
I
Irina Popa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed tidy errors.
上级
04fa0e7b
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
39 addition
and
37 deletion
+39
-37
src/librustc/ty/context.rs
src/librustc/ty/context.rs
+1
-1
src/librustc/ty/layout.rs
src/librustc/ty/layout.rs
+1
-1
src/librustc_target/abi/call/aarch64.rs
src/librustc_target/abi/call/aarch64.rs
+4
-4
src/librustc_target/abi/call/arm.rs
src/librustc_target/abi/call/arm.rs
+3
-3
src/librustc_target/abi/call/asmjs.rs
src/librustc_target/abi/call/asmjs.rs
+2
-2
src/librustc_target/abi/call/mips.rs
src/librustc_target/abi/call/mips.rs
+1
-1
src/librustc_target/abi/call/mips64.rs
src/librustc_target/abi/call/mips64.rs
+4
-4
src/librustc_target/abi/call/mod.rs
src/librustc_target/abi/call/mod.rs
+1
-1
src/librustc_target/abi/call/powerpc64.rs
src/librustc_target/abi/call/powerpc64.rs
+2
-2
src/librustc_target/abi/call/s390x.rs
src/librustc_target/abi/call/s390x.rs
+3
-3
src/librustc_target/abi/call/sparc.rs
src/librustc_target/abi/call/sparc.rs
+1
-1
src/librustc_target/abi/call/sparc64.rs
src/librustc_target/abi/call/sparc64.rs
+7
-7
src/librustc_target/abi/call/x86.rs
src/librustc_target/abi/call/x86.rs
+1
-1
src/librustc_target/abi/call/x86_64.rs
src/librustc_target/abi/call/x86_64.rs
+3
-3
src/librustc_target/abi/mod.rs
src/librustc_target/abi/mod.rs
+2
-2
src/libsyntax/test.rs
src/libsyntax/test.rs
+3
-1
未找到文件。
src/librustc/ty/context.rs
浏览文件 @
a131c518
...
...
@@ -1204,7 +1204,7 @@ pub fn create_and_enter<F, R>(s: &'tcx Session,
f
:
F
)
->
R
where
F
:
for
<
'b
>
FnOnce
(
TyCtxt
<
'b
,
'tcx
,
'tcx
>
)
->
R
{
let
data_layout
=
TargetDataLayout
::
parse
(
&
s
.target.target
)
.unwrap_or_else
(|
err
|
{
let
data_layout
=
TargetDataLayout
::
parse
(
&
s
.target.target
)
.unwrap_or_else
(|
err
|
{
s
.fatal
(
&
err
);
});
let
interners
=
CtxtInterners
::
new
(
&
arenas
.interner
);
...
...
src/librustc/ty/layout.rs
浏览文件 @
a131c518
...
...
@@ -1440,7 +1440,7 @@ pub fn layout_of(self, param_env_and_ty: ty::ParamEnvAnd<'tcx, Ty<'tcx>>)
}
}
impl
<
'a
,
'tcx
,
C
>
TyLayoutMethods
<
'tcx
,
C
>
for
Ty
<
'tcx
>
impl
<
'a
,
'tcx
,
C
>
TyLayoutMethods
<
'tcx
,
C
>
for
Ty
<
'tcx
>
where
C
:
LayoutOf
<
Ty
=
Ty
<
'tcx
>>
+
HasTyCtxt
<
'tcx
>
,
C
::
TyLayout
:
MaybeResult
<
TyLayout
<
'tcx
>>
{
...
...
src/librustc_target/abi/call/aarch64.rs
浏览文件 @
a131c518
...
...
@@ -12,7 +12,7 @@
use
abi
::{
HasDataLayout
,
LayoutOf
,
TyLayout
,
TyLayoutMethods
};
fn
is_homogeneous_aggregate
<
'a
,
Ty
,
C
>
(
cx
:
C
,
arg
:
&
mut
ArgType
<
'a
,
Ty
>
)
->
Option
<
Uniform
>
->
Option
<
Uniform
>
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
...
...
@@ -41,7 +41,7 @@ fn is_homogeneous_aggregate<'a, Ty, C>(cx: C, arg: &mut ArgType<'a, Ty>)
})
}
fn
classify_ret_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
ret
:
&
mut
ArgType
<
'a
,
Ty
>
)
fn
classify_ret_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
ret
:
&
mut
ArgType
<
'a
,
Ty
>
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
...
...
@@ -75,7 +75,7 @@ fn classify_ret_ty<'a, Ty, C>(cx: C, ret: &mut ArgType<'a, Ty>)
ret
.make_indirect
();
}
fn
classify_arg_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
arg
:
&
mut
ArgType
<
'a
,
Ty
>
)
fn
classify_arg_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
arg
:
&
mut
ArgType
<
'a
,
Ty
>
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
...
...
@@ -109,7 +109,7 @@ fn classify_arg_ty<'a, Ty, C>(cx: C, arg: &mut ArgType<'a, Ty>)
arg
.make_indirect
();
}
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
C
,
fty
:
&
mut
FnType
<
'a
,
Ty
>
)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
C
,
fty
:
&
mut
FnType
<
'a
,
Ty
>
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
...
...
src/librustc_target/abi/call/arm.rs
浏览文件 @
a131c518
...
...
@@ -13,7 +13,7 @@
use
spec
::
HasTargetSpec
;
fn
is_homogeneous_aggregate
<
'a
,
Ty
,
C
>
(
cx
:
C
,
arg
:
&
mut
ArgType
<
'a
,
Ty
>
)
->
Option
<
Uniform
>
->
Option
<
Uniform
>
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
...
...
@@ -77,7 +77,7 @@ fn classify_ret_ty<'a, Ty, C>(cx: C, ret: &mut ArgType<'a, Ty>, vfp: bool)
ret
.make_indirect
();
}
fn
classify_arg_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
arg
:
&
mut
ArgType
<
'a
,
Ty
>
,
vfp
:
bool
)
fn
classify_arg_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
arg
:
&
mut
ArgType
<
'a
,
Ty
>
,
vfp
:
bool
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
...
...
@@ -101,7 +101,7 @@ fn classify_arg_ty<'a, Ty, C>(cx: C, arg: &mut ArgType<'a, Ty>, vfp: bool)
});
}
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
C
,
fty
:
&
mut
FnType
<
'a
,
Ty
>
)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
C
,
fty
:
&
mut
FnType
<
'a
,
Ty
>
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
+
HasTargetSpec
{
...
...
src/librustc_target/abi/call/asmjs.rs
浏览文件 @
a131c518
...
...
@@ -16,7 +16,7 @@
// See the https://github.com/kripken/emscripten-fastcomp-clang repository.
// The class `EmscriptenABIInfo` in `/lib/CodeGen/TargetInfo.cpp` contains the ABI definitions.
fn
classify_ret_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
ret
:
&
mut
ArgType
<
'a
,
Ty
>
)
fn
classify_ret_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
ret
:
&
mut
ArgType
<
'a
,
Ty
>
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
...
...
@@ -42,7 +42,7 @@ fn classify_arg_ty<Ty>(arg: &mut ArgType<Ty>) {
}
}
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
C
,
fty
:
&
mut
FnType
<
'a
,
Ty
>
)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
C
,
fty
:
&
mut
FnType
<
'a
,
Ty
>
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
...
...
src/librustc_target/abi/call/mips.rs
浏览文件 @
a131c518
...
...
@@ -44,7 +44,7 @@ fn classify_arg_ty<'a, Ty, C>(cx: C, arg: &mut ArgType<Ty>, offset: &mut Size)
*
offset
=
offset
.abi_align
(
align
)
+
size
.abi_align
(
align
);
}
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
C
,
fty
:
&
mut
FnType
<
Ty
>
)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
C
,
fty
:
&
mut
FnType
<
Ty
>
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
,
C
:
LayoutOf
<
Ty
=
Ty
>
+
HasDataLayout
{
let
mut
offset
=
Size
::
from_bytes
(
0
);
...
...
src/librustc_target/abi/call/mips64.rs
浏览文件 @
a131c518
...
...
@@ -27,7 +27,7 @@ fn extend_integer_width_mips<Ty>(arg: &mut ArgType<Ty>, bits: u64) {
arg
.extend_integer_width_to
(
bits
);
}
fn
float_reg
<
'a
,
Ty
,
C
>
(
cx
:
C
,
ret
:
&
ArgType
<
'a
,
Ty
>
,
i
:
usize
)
->
Option
<
Reg
>
fn
float_reg
<
'a
,
Ty
,
C
>
(
cx
:
C
,
ret
:
&
ArgType
<
'a
,
Ty
>
,
i
:
usize
)
->
Option
<
Reg
>
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
...
...
@@ -41,7 +41,7 @@ fn float_reg<'a, Ty, C>(cx: C, ret: &ArgType<'a, Ty>, i: usize) -> Option<Reg>
}
}
fn
classify_ret_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
ret
:
&
mut
ArgType
<
'a
,
Ty
>
)
fn
classify_ret_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
ret
:
&
mut
ArgType
<
'a
,
Ty
>
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
...
...
@@ -83,7 +83,7 @@ fn classify_ret_ty<'a, Ty, C>(cx: C, ret: &mut ArgType<'a, Ty>)
}
}
fn
classify_arg_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
arg
:
&
mut
ArgType
<
'a
,
Ty
>
)
fn
classify_arg_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
arg
:
&
mut
ArgType
<
'a
,
Ty
>
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
...
...
@@ -151,7 +151,7 @@ fn classify_arg_ty<'a, Ty, C>(cx: C, arg: &mut ArgType<'a, Ty>)
});
}
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
C
,
fty
:
&
mut
FnType
<
'a
,
Ty
>
)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
C
,
fty
:
&
mut
FnType
<
'a
,
Ty
>
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
...
...
src/librustc_target/abi/call/mod.rs
浏览文件 @
a131c518
...
...
@@ -245,7 +245,7 @@ fn is_aggregate(&self) -> bool {
}
}
fn
homogeneous_aggregate
<
C
>
(
&
self
,
cx
:
C
)
->
Option
<
Reg
>
fn
homogeneous_aggregate
<
C
>
(
&
self
,
cx
:
C
)
->
Option
<
Reg
>
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
Self
>
+
Copy
{
match
self
.abi
{
...
...
src/librustc_target/abi/call/powerpc64.rs
浏览文件 @
a131c518
...
...
@@ -22,11 +22,11 @@ enum ABI {
}
use
self
::
ABI
::
*
;
fn
is_homogeneous_aggregate
<
'a
,
Ty
,
C
>
(
cx
:
C
,
arg
:
&
mut
ArgType
<
'a
,
Ty
>
,
abi
:
ABI
)
fn
is_homogeneous_aggregate
<
'a
,
Ty
,
C
>
(
cx
:
C
,
arg
:
&
mut
ArgType
<
'a
,
Ty
>
,
abi
:
ABI
)
->
Option
<
Uniform
>
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
{
arg
.layout
.homogeneous_aggregate
(
cx
)
.and_then
(|
unit
|
{
// ELFv1 only passes one-member aggregates transparently.
// ELFv2 passes up to eight uniquely addressable members.
...
...
src/librustc_target/abi/call/s390x.rs
浏览文件 @
a131c518
...
...
@@ -14,7 +14,7 @@
use
abi
::
call
::{
FnType
,
ArgType
,
Reg
};
use
abi
::{
self
,
HasDataLayout
,
LayoutOf
,
TyLayout
,
TyLayoutMethods
};
fn
classify_ret_ty
<
'a
,
Ty
,
C
>
(
ret
:
&
mut
ArgType
<
Ty
>
)
fn
classify_ret_ty
<
'a
,
Ty
,
C
>
(
ret
:
&
mut
ArgType
<
Ty
>
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
,
C
:
LayoutOf
<
Ty
=
Ty
>
+
HasDataLayout
{
if
!
ret
.layout
.is_aggregate
()
&&
ret
.layout.size
.bits
()
<=
64
{
...
...
@@ -46,7 +46,7 @@ fn is_single_fp_element<'a, Ty, C>(cx: C, layout: TyLayout<'a, Ty>) -> bool
}
}
fn
classify_arg_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
arg
:
&
mut
ArgType
<
'a
,
Ty
>
)
fn
classify_arg_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
arg
:
&
mut
ArgType
<
'a
,
Ty
>
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
...
...
@@ -72,7 +72,7 @@ fn classify_arg_ty<'a, Ty, C>(cx: C, arg: &mut ArgType<'a, Ty>)
}
}
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
C
,
fty
:
&
mut
FnType
<
'a
,
Ty
>
)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
C
,
fty
:
&
mut
FnType
<
'a
,
Ty
>
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
...
...
src/librustc_target/abi/call/sparc.rs
浏览文件 @
a131c518
...
...
@@ -11,7 +11,7 @@
use
abi
::
call
::{
ArgType
,
FnType
,
Reg
,
Uniform
};
use
abi
::{
HasDataLayout
,
LayoutOf
,
Size
,
TyLayoutMethods
};
fn
classify_ret_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
ret
:
&
mut
ArgType
<
Ty
>
,
offset
:
&
mut
Size
)
fn
classify_ret_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
ret
:
&
mut
ArgType
<
Ty
>
,
offset
:
&
mut
Size
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
,
C
:
LayoutOf
<
Ty
=
Ty
>
+
HasDataLayout
{
if
!
ret
.layout
.is_aggregate
()
{
...
...
src/librustc_target/abi/call/sparc64.rs
浏览文件 @
a131c518
...
...
@@ -16,7 +16,7 @@
fn
is_homogeneous_aggregate
<
'a
,
Ty
,
C
>
(
cx
:
C
,
arg
:
&
mut
ArgType
<
'a
,
Ty
>
)
->
Option
<
Uniform
>
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
arg
.layout
.homogeneous_aggregate
(
cx
)
.and_then
(|
unit
|
{
// Ensure we have at most eight uniquely addressable members.
...
...
@@ -41,9 +41,9 @@ fn is_homogeneous_aggregate<'a, Ty, C>(cx: C, arg: &mut ArgType<'a, Ty>)
})
}
fn
classify_ret_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
ret
:
&
mut
ArgType
<
'a
,
Ty
>
)
fn
classify_ret_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
ret
:
&
mut
ArgType
<
'a
,
Ty
>
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
if
!
ret
.layout
.is_aggregate
()
{
ret
.extend_integer_width_to
(
64
);
...
...
@@ -78,9 +78,9 @@ fn classify_ret_ty<'a, Ty, C>(cx: C, ret: &mut ArgType<'a, Ty>)
ret
.make_indirect
();
}
fn
classify_arg_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
arg
:
&
mut
ArgType
<
'a
,
Ty
>
)
fn
classify_arg_ty
<
'a
,
Ty
,
C
>
(
cx
:
C
,
arg
:
&
mut
ArgType
<
'a
,
Ty
>
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
if
!
arg
.layout
.is_aggregate
()
{
arg
.extend_integer_width_to
(
64
);
...
...
@@ -104,9 +104,9 @@ fn classify_arg_ty<'a, Ty, C>(cx: C, arg: &mut ArgType<'a, Ty>)
});
}
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
C
,
fty
:
&
mut
FnType
<
'a
,
Ty
>
)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
C
,
fty
:
&
mut
FnType
<
'a
,
Ty
>
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
if
!
fty
.ret
.is_ignore
()
{
classify_ret_ty
(
cx
,
&
mut
fty
.ret
);
...
...
src/librustc_target/abi/call/x86.rs
浏览文件 @
a131c518
...
...
@@ -40,7 +40,7 @@ fn is_single_fp_element<'a, Ty, C>(cx: C, layout: TyLayout<'a, Ty>) -> bool
}
}
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
C
,
fty
:
&
mut
FnType
<
'a
,
Ty
>
,
flavor
:
Flavor
)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
C
,
fty
:
&
mut
FnType
<
'a
,
Ty
>
,
flavor
:
Flavor
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
+
HasTargetSpec
{
...
...
src/librustc_target/abi/call/x86_64.rs
浏览文件 @
a131c518
...
...
@@ -32,12 +32,12 @@ enum Class {
const
MAX_EIGHTBYTES
:
usize
=
LARGEST_VECTOR_SIZE
/
64
;
fn
classify_arg
<
'a
,
Ty
,
C
>
(
cx
:
C
,
arg
:
&
ArgType
<
'a
,
Ty
>
)
->
Result
<
[
Option
<
Class
>
;
MAX_EIGHTBYTES
],
Memory
>
->
Result
<
[
Option
<
Class
>
;
MAX_EIGHTBYTES
],
Memory
>
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
fn
classify
<
'a
,
Ty
,
C
>
(
cx
:
C
,
layout
:
TyLayout
<
'a
,
Ty
>
,
cls
:
&
mut
[
Option
<
Class
>
],
off
:
Size
)
->
Result
<
(),
Memory
>
cls
:
&
mut
[
Option
<
Class
>
],
off
:
Size
)
->
Result
<
(),
Memory
>
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
...
...
@@ -179,7 +179,7 @@ fn cast_target(cls: &[Option<Class>], size: Size) -> CastTarget {
target
}
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
C
,
fty
:
&
mut
FnType
<
'a
,
Ty
>
)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
C
,
fty
:
&
mut
FnType
<
'a
,
Ty
>
)
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyLayout
=
TyLayout
<
'a
,
Ty
>>
+
HasDataLayout
{
...
...
src/librustc_target/abi/mod.rs
浏览文件 @
a131c518
...
...
@@ -794,7 +794,7 @@ pub fn for_variant<C>(self, cx: C, variant_index: usize) -> Self
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
,
C
:
LayoutOf
<
Ty
=
Ty
>
{
Ty
::
for_variant
(
self
,
cx
,
variant_index
)
}
pub
fn
field
<
C
>
(
self
,
cx
:
C
,
i
:
usize
)
->
C
::
TyLayout
pub
fn
field
<
C
>
(
self
,
cx
:
C
,
i
:
usize
)
->
C
::
TyLayout
where
Ty
:
TyLayoutMethods
<
'a
,
C
>
,
C
:
LayoutOf
<
Ty
=
Ty
>
{
Ty
::
field
(
self
,
cx
,
i
)
}
...
...
@@ -820,4 +820,4 @@ pub fn is_zst(&self) -> bool {
pub
fn
size_and_align
(
&
self
)
->
(
Size
,
Align
)
{
(
self
.size
,
self
.align
)
}
}
\ No newline at end of file
}
src/libsyntax/test.rs
浏览文件 @
a131c518
...
...
@@ -563,7 +563,9 @@ fn mk_main(cx: &mut TestCtxt) -> P<ast::Item> {
let
main
=
ast
::
ItemKind
::
Fn
(
ecx
.fn_decl
(
vec!
[],
ast
::
FunctionRetTy
::
Ty
(
main_ret_ty
)),
ast
::
Unsafety
::
Normal
,
dummy_spanned
(
ast
::
Constness
::
NotConst
),
::
rustc_target
::
spec
::
abi
::
Abi
::
Rust
,
ast
::
Generics
::
default
(),
main_body
);
::
rustc_target
::
spec
::
abi
::
Abi
::
Rust
,
ast
::
Generics
::
default
(),
main_body
);
P
(
ast
::
Item
{
ident
:
Ident
::
from_str
(
"main"
),
attrs
:
vec!
[
main_attr
],
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录