Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
83d986aa
R
Rust
项目概览
int
/
Rust
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
83d986aa
编写于
8月 25, 2021
作者:
E
Eduard-Mihai Burtescu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rustc_target: add lifetime parameter to `LayoutOf`.
上级
dfd6306d
变更
24
隐藏空白更改
内联
并排
Showing
24 changed file
with
88 addition
and
102 deletion
+88
-102
compiler/rustc_codegen_cranelift/src/common.rs
compiler/rustc_codegen_cranelift/src/common.rs
+2
-2
compiler/rustc_codegen_llvm/src/builder.rs
compiler/rustc_codegen_llvm/src/builder.rs
+1
-1
compiler/rustc_codegen_llvm/src/context.rs
compiler/rustc_codegen_llvm/src/context.rs
+1
-1
compiler/rustc_codegen_ssa/src/traits/backend.rs
compiler/rustc_codegen_ssa/src/traits/backend.rs
+7
-2
compiler/rustc_lint/src/context.rs
compiler/rustc_lint/src/context.rs
+1
-1
compiler/rustc_middle/src/ty/layout.rs
compiler/rustc_middle/src/ty/layout.rs
+9
-13
compiler/rustc_mir/src/interpret/eval_context.rs
compiler/rustc_mir/src/interpret/eval_context.rs
+1
-1
compiler/rustc_mir/src/transform/const_prop.rs
compiler/rustc_mir/src/transform/const_prop.rs
+1
-1
compiler/rustc_passes/src/layout_test.rs
compiler/rustc_passes/src/layout_test.rs
+1
-1
compiler/rustc_target/src/abi/call/aarch64.rs
compiler/rustc_target/src/abi/call/aarch64.rs
+4
-4
compiler/rustc_target/src/abi/call/amdgpu.rs
compiler/rustc_target/src/abi/call/amdgpu.rs
+3
-3
compiler/rustc_target/src/abi/call/arm.rs
compiler/rustc_target/src/abi/call/arm.rs
+4
-4
compiler/rustc_target/src/abi/call/mips.rs
compiler/rustc_target/src/abi/call/mips.rs
+7
-10
compiler/rustc_target/src/abi/call/mips64.rs
compiler/rustc_target/src/abi/call/mips64.rs
+4
-4
compiler/rustc_target/src/abi/call/mod.rs
compiler/rustc_target/src/abi/call/mod.rs
+2
-2
compiler/rustc_target/src/abi/call/powerpc64.rs
compiler/rustc_target/src/abi/call/powerpc64.rs
+4
-4
compiler/rustc_target/src/abi/call/riscv.rs
compiler/rustc_target/src/abi/call/riscv.rs
+5
-5
compiler/rustc_target/src/abi/call/s390x.rs
compiler/rustc_target/src/abi/call/s390x.rs
+4
-8
compiler/rustc_target/src/abi/call/sparc.rs
compiler/rustc_target/src/abi/call/sparc.rs
+7
-10
compiler/rustc_target/src/abi/call/sparc64.rs
compiler/rustc_target/src/abi/call/sparc64.rs
+4
-4
compiler/rustc_target/src/abi/call/wasm.rs
compiler/rustc_target/src/abi/call/wasm.rs
+4
-4
compiler/rustc_target/src/abi/call/x86.rs
compiler/rustc_target/src/abi/call/x86.rs
+2
-2
compiler/rustc_target/src/abi/call/x86_64.rs
compiler/rustc_target/src/abi/call/x86_64.rs
+3
-3
compiler/rustc_target/src/abi/mod.rs
compiler/rustc_target/src/abi/mod.rs
+7
-12
未找到文件。
compiler/rustc_codegen_cranelift/src/common.rs
浏览文件 @
83d986aa
...
@@ -256,7 +256,7 @@ pub(crate) struct FunctionCx<'m, 'clif, 'tcx: 'm> {
...
@@ -256,7 +256,7 @@ pub(crate) struct FunctionCx<'m, 'clif, 'tcx: 'm> {
pub
(
crate
)
inline_asm_index
:
u32
,
pub
(
crate
)
inline_asm_index
:
u32
,
}
}
impl
<
'tcx
>
LayoutOf
for
FunctionCx
<
'_
,
'_
,
'tcx
>
{
impl
<
'tcx
>
LayoutOf
<
'tcx
>
for
FunctionCx
<
'_
,
'_
,
'tcx
>
{
type
Ty
=
Ty
<
'tcx
>
;
type
Ty
=
Ty
<
'tcx
>
;
type
TyAndLayout
=
TyAndLayout
<
'tcx
>
;
type
TyAndLayout
=
TyAndLayout
<
'tcx
>
;
...
@@ -364,7 +364,7 @@ pub(crate) fn anonymous_str(&mut self, msg: &str) -> Value {
...
@@ -364,7 +364,7 @@ pub(crate) fn anonymous_str(&mut self, msg: &str) -> Value {
pub
(
crate
)
struct
RevealAllLayoutCx
<
'tcx
>
(
pub
(
crate
)
TyCtxt
<
'tcx
>
);
pub
(
crate
)
struct
RevealAllLayoutCx
<
'tcx
>
(
pub
(
crate
)
TyCtxt
<
'tcx
>
);
impl
<
'tcx
>
LayoutOf
for
RevealAllLayoutCx
<
'tcx
>
{
impl
<
'tcx
>
LayoutOf
<
'tcx
>
for
RevealAllLayoutCx
<
'tcx
>
{
type
Ty
=
Ty
<
'tcx
>
;
type
Ty
=
Ty
<
'tcx
>
;
type
TyAndLayout
=
TyAndLayout
<
'tcx
>
;
type
TyAndLayout
=
TyAndLayout
<
'tcx
>
;
...
...
compiler/rustc_codegen_llvm/src/builder.rs
浏览文件 @
83d986aa
...
@@ -88,7 +88,7 @@ fn target_spec(&self) -> &Target {
...
@@ -88,7 +88,7 @@ fn target_spec(&self) -> &Target {
}
}
}
}
impl
abi
::
LayoutOf
for
Builder
<
'_
,
'_
,
'tcx
>
{
impl
abi
::
LayoutOf
<
'tcx
>
for
Builder
<
'_
,
'_
,
'tcx
>
{
type
Ty
=
Ty
<
'tcx
>
;
type
Ty
=
Ty
<
'tcx
>
;
type
TyAndLayout
=
TyAndLayout
<
'tcx
>
;
type
TyAndLayout
=
TyAndLayout
<
'tcx
>
;
...
...
compiler/rustc_codegen_llvm/src/context.rs
浏览文件 @
83d986aa
...
@@ -835,7 +835,7 @@ fn tcx(&self) -> TyCtxt<'tcx> {
...
@@ -835,7 +835,7 @@ fn tcx(&self) -> TyCtxt<'tcx> {
}
}
}
}
impl
LayoutOf
for
CodegenCx
<
'll
,
'tcx
>
{
impl
LayoutOf
<
'tcx
>
for
CodegenCx
<
'll
,
'tcx
>
{
type
Ty
=
Ty
<
'tcx
>
;
type
Ty
=
Ty
<
'tcx
>
;
type
TyAndLayout
=
TyAndLayout
<
'tcx
>
;
type
TyAndLayout
=
TyAndLayout
<
'tcx
>
;
...
...
compiler/rustc_codegen_ssa/src/traits/backend.rs
浏览文件 @
83d986aa
...
@@ -39,12 +39,17 @@ pub trait BackendTypes {
...
@@ -39,12 +39,17 @@ pub trait BackendTypes {
}
}
pub
trait
Backend
<
'tcx
>
:
pub
trait
Backend
<
'tcx
>
:
Sized
+
BackendTypes
+
HasTyCtxt
<
'tcx
>
+
LayoutOf
<
Ty
=
Ty
<
'tcx
>
,
TyAndLayout
=
TyAndLayout
<
'tcx
>>
Sized
+
BackendTypes
+
HasTyCtxt
<
'tcx
>
+
LayoutOf
<
'tcx
,
Ty
=
Ty
<
'tcx
>
,
TyAndLayout
=
TyAndLayout
<
'tcx
>>
{
{
}
}
impl
<
'tcx
,
T
>
Backend
<
'tcx
>
for
T
where
impl
<
'tcx
,
T
>
Backend
<
'tcx
>
for
T
where
Self
:
BackendTypes
+
HasTyCtxt
<
'tcx
>
+
LayoutOf
<
Ty
=
Ty
<
'tcx
>
,
TyAndLayout
=
TyAndLayout
<
'tcx
>>
Self
:
BackendTypes
+
HasTyCtxt
<
'tcx
>
+
LayoutOf
<
'tcx
,
Ty
=
Ty
<
'tcx
>
,
TyAndLayout
=
TyAndLayout
<
'tcx
>>
{
{
}
}
...
...
compiler/rustc_lint/src/context.rs
浏览文件 @
83d986aa
...
@@ -1059,7 +1059,7 @@ fn path_generic_args(
...
@@ -1059,7 +1059,7 @@ fn path_generic_args(
}
}
}
}
impl
<
'tcx
>
LayoutOf
for
LateContext
<
'tcx
>
{
impl
<
'tcx
>
LayoutOf
<
'tcx
>
for
LateContext
<
'tcx
>
{
type
Ty
=
Ty
<
'tcx
>
;
type
Ty
=
Ty
<
'tcx
>
;
type
TyAndLayout
=
Result
<
TyAndLayout
<
'tcx
>
,
LayoutError
<
'tcx
>>
;
type
TyAndLayout
=
Result
<
TyAndLayout
<
'tcx
>
,
LayoutError
<
'tcx
>>
;
...
...
compiler/rustc_middle/src/ty/layout.rs
浏览文件 @
83d986aa
...
@@ -2054,7 +2054,7 @@ fn tcx(&self) -> TyCtxt<'tcx> {
...
@@ -2054,7 +2054,7 @@ fn tcx(&self) -> TyCtxt<'tcx> {
pub
type
TyAndLayout
<
'tcx
>
=
rustc_target
::
abi
::
TyAndLayout
<
'tcx
,
Ty
<
'tcx
>>
;
pub
type
TyAndLayout
<
'tcx
>
=
rustc_target
::
abi
::
TyAndLayout
<
'tcx
,
Ty
<
'tcx
>>
;
impl
<
'tcx
>
LayoutOf
for
LayoutCx
<
'tcx
,
TyCtxt
<
'tcx
>>
{
impl
LayoutOf
<
'tcx
>
for
LayoutCx
<
'tcx
,
TyCtxt
<
'tcx
>>
{
type
Ty
=
Ty
<
'tcx
>
;
type
Ty
=
Ty
<
'tcx
>
;
type
TyAndLayout
=
Result
<
TyAndLayout
<
'tcx
>
,
LayoutError
<
'tcx
>>
;
type
TyAndLayout
=
Result
<
TyAndLayout
<
'tcx
>
,
LayoutError
<
'tcx
>>
;
...
@@ -2066,7 +2066,7 @@ fn layout_of(&self, ty: Ty<'tcx>) -> Self::TyAndLayout {
...
@@ -2066,7 +2066,7 @@ fn layout_of(&self, ty: Ty<'tcx>) -> Self::TyAndLayout {
}
}
}
}
impl
LayoutOf
for
LayoutCx
<
'tcx
,
ty
::
query
::
TyCtxtAt
<
'tcx
>>
{
impl
LayoutOf
<
'tcx
>
for
LayoutCx
<
'tcx
,
ty
::
query
::
TyCtxtAt
<
'tcx
>>
{
type
Ty
=
Ty
<
'tcx
>
;
type
Ty
=
Ty
<
'tcx
>
;
type
TyAndLayout
=
Result
<
TyAndLayout
<
'tcx
>
,
LayoutError
<
'tcx
>>
;
type
TyAndLayout
=
Result
<
TyAndLayout
<
'tcx
>
,
LayoutError
<
'tcx
>>
;
...
@@ -2080,9 +2080,7 @@ fn layout_of(&self, ty: Ty<'tcx>) -> Self::TyAndLayout {
...
@@ -2080,9 +2080,7 @@ fn layout_of(&self, ty: Ty<'tcx>) -> Self::TyAndLayout {
impl
<
'tcx
,
C
>
TyAndLayoutMethods
<
'tcx
,
C
>
for
Ty
<
'tcx
>
impl
<
'tcx
,
C
>
TyAndLayoutMethods
<
'tcx
,
C
>
for
Ty
<
'tcx
>
where
where
C
:
LayoutOf
<
Ty
=
Ty
<
'tcx
>
,
TyAndLayout
:
MaybeResult
<
TyAndLayout
<
'tcx
>>>
C
:
LayoutOf
<
'tcx
,
Ty
=
Ty
<
'tcx
>>
+
HasTyCtxt
<
'tcx
>
+
HasParamEnv
<
'tcx
>
,
+
HasTyCtxt
<
'tcx
>
+
HasParamEnv
<
'tcx
>
,
{
{
fn
for_variant
(
fn
for_variant
(
this
:
TyAndLayout
<
'tcx
>
,
this
:
TyAndLayout
<
'tcx
>
,
...
@@ -2135,21 +2133,19 @@ fn for_variant(
...
@@ -2135,21 +2133,19 @@ fn for_variant(
}
}
fn
field
(
this
:
TyAndLayout
<
'tcx
>
,
cx
:
&
C
,
i
:
usize
)
->
C
::
TyAndLayout
{
fn
field
(
this
:
TyAndLayout
<
'tcx
>
,
cx
:
&
C
,
i
:
usize
)
->
C
::
TyAndLayout
{
enum
TyMaybeWithLayout
<
C
:
LayoutOf
>
{
enum
TyMaybeWithLayout
<
'tcx
,
C
:
LayoutOf
<
'tcx
>
>
{
Ty
(
C
::
Ty
),
Ty
(
C
::
Ty
),
TyAndLayout
(
C
::
TyAndLayout
),
TyAndLayout
(
C
::
TyAndLayout
),
}
}
fn
ty_and_layout_kind
<
fn
ty_and_layout_kind
<
C
:
LayoutOf
<
Ty
=
Ty
<
'tcx
>
,
TyAndLayout
:
MaybeResult
<
TyAndLayout
<
'tcx
>>>
C
:
LayoutOf
<
'tcx
,
Ty
=
Ty
<
'tcx
>>
+
HasTyCtxt
<
'tcx
>
+
HasParamEnv
<
'tcx
>
,
+
HasTyCtxt
<
'tcx
>
+
HasParamEnv
<
'tcx
>
,
>
(
>
(
this
:
TyAndLayout
<
'tcx
>
,
this
:
TyAndLayout
<
'tcx
>
,
cx
:
&
C
,
cx
:
&
C
,
i
:
usize
,
i
:
usize
,
ty
:
C
::
Ty
,
ty
:
C
::
Ty
,
)
->
TyMaybeWithLayout
<
C
>
{
)
->
TyMaybeWithLayout
<
'tcx
,
C
>
{
let
tcx
=
cx
.tcx
();
let
tcx
=
cx
.tcx
();
let
tag_layout
=
|
tag
:
&
Scalar
|
->
C
::
TyAndLayout
{
let
tag_layout
=
|
tag
:
&
Scalar
|
->
C
::
TyAndLayout
{
let
layout
=
Layout
::
scalar
(
cx
,
tag
.clone
());
let
layout
=
Layout
::
scalar
(
cx
,
tag
.clone
());
...
@@ -2538,7 +2534,7 @@ fn fn_sig_for_fn_abi(&self, tcx: TyCtxt<'tcx>) -> ty::PolyFnSig<'tcx> {
...
@@ -2538,7 +2534,7 @@ fn fn_sig_for_fn_abi(&self, tcx: TyCtxt<'tcx>) -> ty::PolyFnSig<'tcx> {
pub
trait
FnAbiExt
<
'tcx
,
C
>
pub
trait
FnAbiExt
<
'tcx
,
C
>
where
where
C
:
LayoutOf
<
Ty
=
Ty
<
'tcx
>
,
TyAndLayout
=
TyAndLayout
<
'tcx
>>
C
:
LayoutOf
<
'tcx
,
Ty
=
Ty
<
'tcx
>
,
TyAndLayout
=
TyAndLayout
<
'tcx
>>
+
HasDataLayout
+
HasDataLayout
+
HasTargetSpec
+
HasTargetSpec
+
HasTyCtxt
<
'tcx
>
+
HasTyCtxt
<
'tcx
>
...
@@ -2725,7 +2721,7 @@ pub fn conv_from_spec_abi(tcx: TyCtxt<'_>, abi: SpecAbi) -> Conv {
...
@@ -2725,7 +2721,7 @@ pub fn conv_from_spec_abi(tcx: TyCtxt<'_>, abi: SpecAbi) -> Conv {
impl
<
'tcx
,
C
>
FnAbiExt
<
'tcx
,
C
>
for
call
::
FnAbi
<
'tcx
,
Ty
<
'tcx
>>
impl
<
'tcx
,
C
>
FnAbiExt
<
'tcx
,
C
>
for
call
::
FnAbi
<
'tcx
,
Ty
<
'tcx
>>
where
where
C
:
LayoutOf
<
Ty
=
Ty
<
'tcx
>
,
TyAndLayout
=
TyAndLayout
<
'tcx
>>
C
:
LayoutOf
<
'tcx
,
Ty
=
Ty
<
'tcx
>
,
TyAndLayout
=
TyAndLayout
<
'tcx
>>
+
HasDataLayout
+
HasDataLayout
+
HasTargetSpec
+
HasTargetSpec
+
HasTyCtxt
<
'tcx
>
+
HasTyCtxt
<
'tcx
>
...
@@ -3006,7 +3002,7 @@ fn adjust_for_abi(&mut self, cx: &C, abi: SpecAbi) {
...
@@ -3006,7 +3002,7 @@ fn adjust_for_abi(&mut self, cx: &C, abi: SpecAbi) {
fn
make_thin_self_ptr
<
'tcx
,
C
>
(
cx
:
&
C
,
mut
layout
:
TyAndLayout
<
'tcx
>
)
->
TyAndLayout
<
'tcx
>
fn
make_thin_self_ptr
<
'tcx
,
C
>
(
cx
:
&
C
,
mut
layout
:
TyAndLayout
<
'tcx
>
)
->
TyAndLayout
<
'tcx
>
where
where
C
:
LayoutOf
<
Ty
=
Ty
<
'tcx
>
,
TyAndLayout
=
TyAndLayout
<
'tcx
>>
C
:
LayoutOf
<
'tcx
,
Ty
=
Ty
<
'tcx
>
,
TyAndLayout
=
TyAndLayout
<
'tcx
>>
+
HasTyCtxt
<
'tcx
>
+
HasTyCtxt
<
'tcx
>
+
HasParamEnv
<
'tcx
>
,
+
HasParamEnv
<
'tcx
>
,
{
{
...
...
compiler/rustc_mir/src/interpret/eval_context.rs
浏览文件 @
83d986aa
...
@@ -312,7 +312,7 @@ fn param_env(&self) -> ty::ParamEnv<'tcx> {
...
@@ -312,7 +312,7 @@ fn param_env(&self) -> ty::ParamEnv<'tcx> {
}
}
}
}
impl
<
'mir
,
'tcx
:
'mir
,
M
:
Machine
<
'mir
,
'tcx
>>
LayoutOf
for
InterpCx
<
'mir
,
'tcx
,
M
>
{
impl
<
'mir
,
'tcx
:
'mir
,
M
:
Machine
<
'mir
,
'tcx
>>
LayoutOf
<
'tcx
>
for
InterpCx
<
'mir
,
'tcx
,
M
>
{
type
Ty
=
Ty
<
'tcx
>
;
type
Ty
=
Ty
<
'tcx
>
;
type
TyAndLayout
=
InterpResult
<
'tcx
,
TyAndLayout
<
'tcx
>>
;
type
TyAndLayout
=
InterpResult
<
'tcx
,
TyAndLayout
<
'tcx
>>
;
...
...
compiler/rustc_mir/src/transform/const_prop.rs
浏览文件 @
83d986aa
...
@@ -330,7 +330,7 @@ struct ConstPropagator<'mir, 'tcx> {
...
@@ -330,7 +330,7 @@ struct ConstPropagator<'mir, 'tcx> {
source_info
:
Option
<
SourceInfo
>
,
source_info
:
Option
<
SourceInfo
>
,
}
}
impl
<
'mir
,
'tcx
>
LayoutOf
for
ConstPropagator
<
'mir
,
'tcx
>
{
impl
<
'mir
,
'tcx
>
LayoutOf
<
'tcx
>
for
ConstPropagator
<
'mir
,
'tcx
>
{
type
Ty
=
Ty
<
'tcx
>
;
type
Ty
=
Ty
<
'tcx
>
;
type
TyAndLayout
=
Result
<
TyAndLayout
<
'tcx
>
,
LayoutError
<
'tcx
>>
;
type
TyAndLayout
=
Result
<
TyAndLayout
<
'tcx
>
,
LayoutError
<
'tcx
>>
;
...
...
compiler/rustc_passes/src/layout_test.rs
浏览文件 @
83d986aa
...
@@ -113,7 +113,7 @@ struct UnwrapLayoutCx<'tcx> {
...
@@ -113,7 +113,7 @@ struct UnwrapLayoutCx<'tcx> {
param_env
:
ParamEnv
<
'tcx
>
,
param_env
:
ParamEnv
<
'tcx
>
,
}
}
impl
LayoutOf
for
UnwrapLayoutCx
<
'tcx
>
{
impl
LayoutOf
<
'tcx
>
for
UnwrapLayoutCx
<
'tcx
>
{
type
Ty
=
Ty
<
'tcx
>
;
type
Ty
=
Ty
<
'tcx
>
;
type
TyAndLayout
=
TyAndLayout
<
'tcx
>
;
type
TyAndLayout
=
TyAndLayout
<
'tcx
>
;
...
...
compiler/rustc_target/src/abi/call/aarch64.rs
浏览文件 @
83d986aa
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
fn
is_homogeneous_aggregate
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
->
Option
<
Uniform
>
fn
is_homogeneous_aggregate
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
->
Option
<
Uniform
>
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
arg
.layout
.homogeneous_aggregate
(
cx
)
.ok
()
.and_then
(|
ha
|
ha
.unit
())
.and_then
(|
unit
|
{
arg
.layout
.homogeneous_aggregate
(
cx
)
.ok
()
.and_then
(|
ha
|
ha
.unit
())
.and_then
(|
unit
|
{
let
size
=
arg
.layout.size
;
let
size
=
arg
.layout.size
;
...
@@ -27,7 +27,7 @@ fn is_homogeneous_aggregate<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>) -> Opti
...
@@ -27,7 +27,7 @@ fn is_homogeneous_aggregate<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>) -> Opti
fn
classify_ret
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
ret
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
fn
classify_ret
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
ret
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
if
!
ret
.layout
.is_aggregate
()
{
if
!
ret
.layout
.is_aggregate
()
{
ret
.extend_integer_width_to
(
32
);
ret
.extend_integer_width_to
(
32
);
...
@@ -49,7 +49,7 @@ fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'a, Ty>)
...
@@ -49,7 +49,7 @@ fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'a, Ty>)
fn
classify_arg
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
fn
classify_arg
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
if
!
arg
.layout
.is_aggregate
()
{
if
!
arg
.layout
.is_aggregate
()
{
arg
.extend_integer_width_to
(
32
);
arg
.extend_integer_width_to
(
32
);
...
@@ -71,7 +71,7 @@ fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>)
...
@@ -71,7 +71,7 @@ fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
if
!
fn_abi
.ret
.is_ignore
()
{
if
!
fn_abi
.ret
.is_ignore
()
{
classify_ret
(
cx
,
&
mut
fn_abi
.ret
);
classify_ret
(
cx
,
&
mut
fn_abi
.ret
);
...
...
compiler/rustc_target/src/abi/call/amdgpu.rs
浏览文件 @
83d986aa
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
fn
classify_ret
<
'a
,
Ty
,
C
>
(
_
cx
:
&
C
,
ret
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
fn
classify_ret
<
'a
,
Ty
,
C
>
(
_
cx
:
&
C
,
ret
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
ret
.extend_integer_width_to
(
32
);
ret
.extend_integer_width_to
(
32
);
}
}
...
@@ -12,7 +12,7 @@ fn classify_ret<'a, Ty, C>(_cx: &C, ret: &mut ArgAbi<'a, Ty>)
...
@@ -12,7 +12,7 @@ fn classify_ret<'a, Ty, C>(_cx: &C, ret: &mut ArgAbi<'a, Ty>)
fn
classify_arg
<
'a
,
Ty
,
C
>
(
_
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
fn
classify_arg
<
'a
,
Ty
,
C
>
(
_
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
arg
.extend_integer_width_to
(
32
);
arg
.extend_integer_width_to
(
32
);
}
}
...
@@ -20,7 +20,7 @@ fn classify_arg<'a, Ty, C>(_cx: &C, arg: &mut ArgAbi<'a, Ty>)
...
@@ -20,7 +20,7 @@ fn classify_arg<'a, Ty, C>(_cx: &C, arg: &mut ArgAbi<'a, Ty>)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
if
!
fn_abi
.ret
.is_ignore
()
{
if
!
fn_abi
.ret
.is_ignore
()
{
classify_ret
(
cx
,
&
mut
fn_abi
.ret
);
classify_ret
(
cx
,
&
mut
fn_abi
.ret
);
...
...
compiler/rustc_target/src/abi/call/arm.rs
浏览文件 @
83d986aa
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
fn
is_homogeneous_aggregate
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
->
Option
<
Uniform
>
fn
is_homogeneous_aggregate
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
->
Option
<
Uniform
>
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
arg
.layout
.homogeneous_aggregate
(
cx
)
.ok
()
.and_then
(|
ha
|
ha
.unit
())
.and_then
(|
unit
|
{
arg
.layout
.homogeneous_aggregate
(
cx
)
.ok
()
.and_then
(|
ha
|
ha
.unit
())
.and_then
(|
unit
|
{
let
size
=
arg
.layout.size
;
let
size
=
arg
.layout.size
;
...
@@ -28,7 +28,7 @@ fn is_homogeneous_aggregate<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>) -> Opti
...
@@ -28,7 +28,7 @@ fn is_homogeneous_aggregate<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>) -> Opti
fn
classify_ret
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
ret
:
&
mut
ArgAbi
<
'a
,
Ty
>
,
vfp
:
bool
)
fn
classify_ret
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
ret
:
&
mut
ArgAbi
<
'a
,
Ty
>
,
vfp
:
bool
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
if
!
ret
.layout
.is_aggregate
()
{
if
!
ret
.layout
.is_aggregate
()
{
ret
.extend_integer_width_to
(
32
);
ret
.extend_integer_width_to
(
32
);
...
@@ -54,7 +54,7 @@ fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'a, Ty>, vfp: bool)
...
@@ -54,7 +54,7 @@ fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'a, Ty>, vfp: bool)
fn
classify_arg
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
,
vfp
:
bool
)
fn
classify_arg
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
,
vfp
:
bool
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
if
!
arg
.layout
.is_aggregate
()
{
if
!
arg
.layout
.is_aggregate
()
{
arg
.extend_integer_width_to
(
32
);
arg
.extend_integer_width_to
(
32
);
...
@@ -76,7 +76,7 @@ fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>, vfp: bool)
...
@@ -76,7 +76,7 @@ fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>, vfp: bool)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
+
HasTargetSpec
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
+
HasTargetSpec
,
{
{
// If this is a target with a hard-float ABI, and the function is not explicitly
// If this is a target with a hard-float ABI, and the function is not explicitly
// `extern "aapcs"`, then we must use the VFP registers for homogeneous aggregates.
// `extern "aapcs"`, then we must use the VFP registers for homogeneous aggregates.
...
...
compiler/rustc_target/src/abi/call/mips.rs
浏览文件 @
83d986aa
use
crate
::
abi
::
call
::{
ArgAbi
,
FnAbi
,
Reg
,
Uniform
};
use
crate
::
abi
::
call
::{
ArgAbi
,
FnAbi
,
Reg
,
Uniform
};
use
crate
::
abi
::{
HasDataLayout
,
LayoutOf
,
Size
,
TyAndLayoutMethods
};
use
crate
::
abi
::{
HasDataLayout
,
Size
};
fn
classify_ret
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
ret
:
&
mut
ArgAbi
<
'_
,
Ty
>
,
offset
:
&
mut
Size
)
fn
classify_ret
<
Ty
,
C
>
(
cx
:
&
C
,
ret
:
&
mut
ArgAbi
<
'_
,
Ty
>
,
offset
:
&
mut
Size
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
,
C
:
HasDataLayout
,
C
:
LayoutOf
<
Ty
=
Ty
>
+
HasDataLayout
,
{
{
if
!
ret
.layout
.is_aggregate
()
{
if
!
ret
.layout
.is_aggregate
()
{
ret
.extend_integer_width_to
(
32
);
ret
.extend_integer_width_to
(
32
);
...
@@ -14,10 +13,9 @@ fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'_, Ty>, offset: &mut Size)
...
@@ -14,10 +13,9 @@ fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'_, Ty>, offset: &mut Size)
}
}
}
}
fn
classify_arg
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'_
,
Ty
>
,
offset
:
&
mut
Size
)
fn
classify_arg
<
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'_
,
Ty
>
,
offset
:
&
mut
Size
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
,
C
:
HasDataLayout
,
C
:
LayoutOf
<
Ty
=
Ty
>
+
HasDataLayout
,
{
{
let
dl
=
cx
.data_layout
();
let
dl
=
cx
.data_layout
();
let
size
=
arg
.layout.size
;
let
size
=
arg
.layout.size
;
...
@@ -35,10 +33,9 @@ fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'_, Ty>, offset: &mut Size)
...
@@ -35,10 +33,9 @@ fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'_, Ty>, offset: &mut Size)
*
offset
=
offset
.align_to
(
align
)
+
size
.align_to
(
align
);
*
offset
=
offset
.align_to
(
align
)
+
size
.align_to
(
align
);
}
}
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'_
,
Ty
>
)
pub
fn
compute_abi_info
<
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'_
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
,
C
:
HasDataLayout
,
C
:
LayoutOf
<
Ty
=
Ty
>
+
HasDataLayout
,
{
{
let
mut
offset
=
Size
::
ZERO
;
let
mut
offset
=
Size
::
ZERO
;
if
!
fn_abi
.ret
.is_ignore
()
{
if
!
fn_abi
.ret
.is_ignore
()
{
...
...
compiler/rustc_target/src/abi/call/mips64.rs
浏览文件 @
83d986aa
...
@@ -20,7 +20,7 @@ fn extend_integer_width_mips<Ty>(arg: &mut ArgAbi<'_, Ty>, bits: u64) {
...
@@ -20,7 +20,7 @@ fn extend_integer_width_mips<Ty>(arg: &mut ArgAbi<'_, Ty>, bits: u64) {
fn
float_reg
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
ret
:
&
ArgAbi
<
'a
,
Ty
>
,
i
:
usize
)
->
Option
<
Reg
>
fn
float_reg
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
ret
:
&
ArgAbi
<
'a
,
Ty
>
,
i
:
usize
)
->
Option
<
Reg
>
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
match
ret
.layout
.field
(
cx
,
i
)
.abi
{
match
ret
.layout
.field
(
cx
,
i
)
.abi
{
abi
::
Abi
::
Scalar
(
ref
scalar
)
=>
match
scalar
.value
{
abi
::
Abi
::
Scalar
(
ref
scalar
)
=>
match
scalar
.value
{
...
@@ -35,7 +35,7 @@ fn float_reg<'a, Ty, C>(cx: &C, ret: &ArgAbi<'a, Ty>, i: usize) -> Option<Reg>
...
@@ -35,7 +35,7 @@ fn float_reg<'a, Ty, C>(cx: &C, ret: &ArgAbi<'a, Ty>, i: usize) -> Option<Reg>
fn
classify_ret
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
ret
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
fn
classify_ret
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
ret
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
if
!
ret
.layout
.is_aggregate
()
{
if
!
ret
.layout
.is_aggregate
()
{
extend_integer_width_mips
(
ret
,
64
);
extend_integer_width_mips
(
ret
,
64
);
...
@@ -75,7 +75,7 @@ fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'a, Ty>)
...
@@ -75,7 +75,7 @@ fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'a, Ty>)
fn
classify_arg
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
fn
classify_arg
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
if
!
arg
.layout
.is_aggregate
()
{
if
!
arg
.layout
.is_aggregate
()
{
extend_integer_width_mips
(
arg
,
64
);
extend_integer_width_mips
(
arg
,
64
);
...
@@ -145,7 +145,7 @@ fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>)
...
@@ -145,7 +145,7 @@ fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
if
!
fn_abi
.ret
.is_ignore
()
{
if
!
fn_abi
.ret
.is_ignore
()
{
classify_ret
(
cx
,
&
mut
fn_abi
.ret
);
classify_ret
(
cx
,
&
mut
fn_abi
.ret
);
...
...
compiler/rustc_target/src/abi/call/mod.rs
浏览文件 @
83d986aa
...
@@ -317,7 +317,7 @@ fn is_aggregate(&self) -> bool {
...
@@ -317,7 +317,7 @@ fn is_aggregate(&self) -> bool {
pub
fn
homogeneous_aggregate
<
C
>
(
&
self
,
cx
:
&
C
)
->
Result
<
HomogeneousAggregate
,
Heterogeneous
>
pub
fn
homogeneous_aggregate
<
C
>
(
&
self
,
cx
:
&
C
)
->
Result
<
HomogeneousAggregate
,
Heterogeneous
>
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
Self
>
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
Self
>
,
{
{
match
self
.abi
{
match
self
.abi
{
Abi
::
Uninhabited
=>
Err
(
Heterogeneous
),
Abi
::
Uninhabited
=>
Err
(
Heterogeneous
),
...
@@ -604,7 +604,7 @@ impl<'a, Ty> FnAbi<'a, Ty> {
...
@@ -604,7 +604,7 @@ impl<'a, Ty> FnAbi<'a, Ty> {
pub
fn
adjust_for_cabi
<
C
>
(
&
mut
self
,
cx
:
&
C
,
abi
:
spec
::
abi
::
Abi
)
->
Result
<
(),
String
>
pub
fn
adjust_for_cabi
<
C
>
(
&
mut
self
,
cx
:
&
C
,
abi
:
spec
::
abi
::
Abi
)
->
Result
<
(),
String
>
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
+
HasTargetSpec
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
+
HasTargetSpec
,
{
{
if
abi
==
spec
::
abi
::
Abi
::
X86Interrupt
{
if
abi
==
spec
::
abi
::
Abi
::
X86Interrupt
{
if
let
Some
(
arg
)
=
self
.args
.first_mut
()
{
if
let
Some
(
arg
)
=
self
.args
.first_mut
()
{
...
...
compiler/rustc_target/src/abi/call/powerpc64.rs
浏览文件 @
83d986aa
...
@@ -20,7 +20,7 @@ fn is_homogeneous_aggregate<'a, Ty, C>(
...
@@ -20,7 +20,7 @@ fn is_homogeneous_aggregate<'a, Ty, C>(
)
->
Option
<
Uniform
>
)
->
Option
<
Uniform
>
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
arg
.layout
.homogeneous_aggregate
(
cx
)
.ok
()
.and_then
(|
ha
|
ha
.unit
())
.and_then
(|
unit
|
{
arg
.layout
.homogeneous_aggregate
(
cx
)
.ok
()
.and_then
(|
ha
|
ha
.unit
())
.and_then
(|
unit
|
{
// ELFv1 only passes one-member aggregates transparently.
// ELFv1 only passes one-member aggregates transparently.
...
@@ -44,7 +44,7 @@ fn is_homogeneous_aggregate<'a, Ty, C>(
...
@@ -44,7 +44,7 @@ fn is_homogeneous_aggregate<'a, Ty, C>(
fn
classify_ret
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
ret
:
&
mut
ArgAbi
<
'a
,
Ty
>
,
abi
:
ABI
)
fn
classify_ret
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
ret
:
&
mut
ArgAbi
<
'a
,
Ty
>
,
abi
:
ABI
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
if
!
ret
.layout
.is_aggregate
()
{
if
!
ret
.layout
.is_aggregate
()
{
ret
.extend_integer_width_to
(
64
);
ret
.extend_integer_width_to
(
64
);
...
@@ -87,7 +87,7 @@ fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'a, Ty>, abi: ABI)
...
@@ -87,7 +87,7 @@ fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'a, Ty>, abi: ABI)
fn
classify_arg
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
,
abi
:
ABI
)
fn
classify_arg
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
,
abi
:
ABI
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
if
!
arg
.layout
.is_aggregate
()
{
if
!
arg
.layout
.is_aggregate
()
{
arg
.extend_integer_width_to
(
64
);
arg
.extend_integer_width_to
(
64
);
...
@@ -117,7 +117,7 @@ fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>, abi: ABI)
...
@@ -117,7 +117,7 @@ fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>, abi: ABI)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
+
HasTargetSpec
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
+
HasTargetSpec
,
{
{
let
abi
=
if
cx
.target_spec
()
.env
==
"musl"
{
let
abi
=
if
cx
.target_spec
()
.env
==
"musl"
{
ELFv2
ELFv2
...
...
compiler/rustc_target/src/abi/call/riscv.rs
浏览文件 @
83d986aa
...
@@ -44,7 +44,7 @@ fn should_use_fp_conv_helper<'a, Ty, C>(
...
@@ -44,7 +44,7 @@ fn should_use_fp_conv_helper<'a, Ty, C>(
)
->
Result
<
(),
CannotUseFpConv
>
)
->
Result
<
(),
CannotUseFpConv
>
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
,
{
{
match
arg_layout
.abi
{
match
arg_layout
.abi
{
Abi
::
Scalar
(
ref
scalar
)
=>
match
scalar
.value
{
Abi
::
Scalar
(
ref
scalar
)
=>
match
scalar
.value
{
...
@@ -131,7 +131,7 @@ fn should_use_fp_conv<'a, Ty, C>(
...
@@ -131,7 +131,7 @@ fn should_use_fp_conv<'a, Ty, C>(
)
->
Option
<
FloatConv
>
)
->
Option
<
FloatConv
>
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
,
{
{
let
mut
field1_kind
=
RegPassKind
::
Unknown
;
let
mut
field1_kind
=
RegPassKind
::
Unknown
;
let
mut
field2_kind
=
RegPassKind
::
Unknown
;
let
mut
field2_kind
=
RegPassKind
::
Unknown
;
...
@@ -150,7 +150,7 @@ fn should_use_fp_conv<'a, Ty, C>(
...
@@ -150,7 +150,7 @@ fn should_use_fp_conv<'a, Ty, C>(
fn
classify_ret
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
,
xlen
:
u64
,
flen
:
u64
)
->
bool
fn
classify_ret
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
,
xlen
:
u64
,
flen
:
u64
)
->
bool
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
,
{
{
if
let
Some
(
conv
)
=
should_use_fp_conv
(
cx
,
&
arg
.layout
,
xlen
,
flen
)
{
if
let
Some
(
conv
)
=
should_use_fp_conv
(
cx
,
&
arg
.layout
,
xlen
,
flen
)
{
match
conv
{
match
conv
{
...
@@ -213,7 +213,7 @@ fn classify_arg<'a, Ty, C>(
...
@@ -213,7 +213,7 @@ fn classify_arg<'a, Ty, C>(
avail_fprs
:
&
mut
u64
,
avail_fprs
:
&
mut
u64
,
)
where
)
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
,
{
{
if
!
is_vararg
{
if
!
is_vararg
{
match
should_use_fp_conv
(
cx
,
&
arg
.layout
,
xlen
,
flen
)
{
match
should_use_fp_conv
(
cx
,
&
arg
.layout
,
xlen
,
flen
)
{
...
@@ -321,7 +321,7 @@ fn extend_integer_width<'a, Ty>(arg: &mut ArgAbi<'a, Ty>, xlen: u64) {
...
@@ -321,7 +321,7 @@ fn extend_integer_width<'a, Ty>(arg: &mut ArgAbi<'a, Ty>, xlen: u64) {
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
+
HasTargetSpec
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
+
HasTargetSpec
,
{
{
let
flen
=
match
&
cx
.target_spec
()
.llvm_abiname
[
..
]
{
let
flen
=
match
&
cx
.target_spec
()
.llvm_abiname
[
..
]
{
"ilp32f"
|
"lp64f"
=>
32
,
"ilp32f"
|
"lp64f"
=>
32
,
...
...
compiler/rustc_target/src/abi/call/s390x.rs
浏览文件 @
83d986aa
...
@@ -4,11 +4,7 @@
...
@@ -4,11 +4,7 @@
use
crate
::
abi
::
call
::{
ArgAbi
,
FnAbi
,
Reg
};
use
crate
::
abi
::
call
::{
ArgAbi
,
FnAbi
,
Reg
};
use
crate
::
abi
::{
self
,
HasDataLayout
,
LayoutOf
,
TyAndLayout
,
TyAndLayoutMethods
};
use
crate
::
abi
::{
self
,
HasDataLayout
,
LayoutOf
,
TyAndLayout
,
TyAndLayoutMethods
};
fn
classify_ret
<
'a
,
Ty
,
C
>
(
ret
:
&
mut
ArgAbi
<
'_
,
Ty
>
)
fn
classify_ret
<
Ty
>
(
ret
:
&
mut
ArgAbi
<
'_
,
Ty
>
)
{
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
,
C
:
LayoutOf
<
Ty
=
Ty
>
+
HasDataLayout
,
{
if
!
ret
.layout
.is_aggregate
()
&&
ret
.layout.size
.bits
()
<=
64
{
if
!
ret
.layout
.is_aggregate
()
&&
ret
.layout.size
.bits
()
<=
64
{
ret
.extend_integer_width_to
(
64
);
ret
.extend_integer_width_to
(
64
);
}
else
{
}
else
{
...
@@ -19,7 +15,7 @@ fn classify_ret<'a, Ty, C>(ret: &mut ArgAbi<'_, Ty>)
...
@@ -19,7 +15,7 @@ fn classify_ret<'a, Ty, C>(ret: &mut ArgAbi<'_, Ty>)
fn
is_single_fp_element
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
layout
:
TyAndLayout
<
'a
,
Ty
>
)
->
bool
fn
is_single_fp_element
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
layout
:
TyAndLayout
<
'a
,
Ty
>
)
->
bool
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
match
layout
.abi
{
match
layout
.abi
{
abi
::
Abi
::
Scalar
(
ref
scalar
)
=>
scalar
.value
.is_float
(),
abi
::
Abi
::
Scalar
(
ref
scalar
)
=>
scalar
.value
.is_float
(),
...
@@ -37,7 +33,7 @@ fn is_single_fp_element<'a, Ty, C>(cx: &C, layout: TyAndLayout<'a, Ty>) -> bool
...
@@ -37,7 +33,7 @@ fn is_single_fp_element<'a, Ty, C>(cx: &C, layout: TyAndLayout<'a, Ty>) -> bool
fn
classify_arg
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
fn
classify_arg
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
if
!
arg
.layout
.is_aggregate
()
&&
arg
.layout.size
.bits
()
<=
64
{
if
!
arg
.layout
.is_aggregate
()
&&
arg
.layout.size
.bits
()
<=
64
{
arg
.extend_integer_width_to
(
64
);
arg
.extend_integer_width_to
(
64
);
...
@@ -64,7 +60,7 @@ fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>)
...
@@ -64,7 +60,7 @@ fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
if
!
fn_abi
.ret
.is_ignore
()
{
if
!
fn_abi
.ret
.is_ignore
()
{
classify_ret
(
&
mut
fn_abi
.ret
);
classify_ret
(
&
mut
fn_abi
.ret
);
...
...
compiler/rustc_target/src/abi/call/sparc.rs
浏览文件 @
83d986aa
use
crate
::
abi
::
call
::{
ArgAbi
,
FnAbi
,
Reg
,
Uniform
};
use
crate
::
abi
::
call
::{
ArgAbi
,
FnAbi
,
Reg
,
Uniform
};
use
crate
::
abi
::{
HasDataLayout
,
LayoutOf
,
Size
,
TyAndLayoutMethods
};
use
crate
::
abi
::{
HasDataLayout
,
Size
};
fn
classify_ret
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
ret
:
&
mut
ArgAbi
<
'_
,
Ty
>
,
offset
:
&
mut
Size
)
fn
classify_ret
<
Ty
,
C
>
(
cx
:
&
C
,
ret
:
&
mut
ArgAbi
<
'_
,
Ty
>
,
offset
:
&
mut
Size
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
,
C
:
HasDataLayout
,
C
:
LayoutOf
<
Ty
=
Ty
>
+
HasDataLayout
,
{
{
if
!
ret
.layout
.is_aggregate
()
{
if
!
ret
.layout
.is_aggregate
()
{
ret
.extend_integer_width_to
(
32
);
ret
.extend_integer_width_to
(
32
);
...
@@ -14,10 +13,9 @@ fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'_, Ty>, offset: &mut Size)
...
@@ -14,10 +13,9 @@ fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'_, Ty>, offset: &mut Size)
}
}
}
}
fn
classify_arg
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'_
,
Ty
>
,
offset
:
&
mut
Size
)
fn
classify_arg
<
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'_
,
Ty
>
,
offset
:
&
mut
Size
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
,
C
:
HasDataLayout
,
C
:
LayoutOf
<
Ty
=
Ty
>
+
HasDataLayout
,
{
{
let
dl
=
cx
.data_layout
();
let
dl
=
cx
.data_layout
();
let
size
=
arg
.layout.size
;
let
size
=
arg
.layout.size
;
...
@@ -35,10 +33,9 @@ fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'_, Ty>, offset: &mut Size)
...
@@ -35,10 +33,9 @@ fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'_, Ty>, offset: &mut Size)
*
offset
=
offset
.align_to
(
align
)
+
size
.align_to
(
align
);
*
offset
=
offset
.align_to
(
align
)
+
size
.align_to
(
align
);
}
}
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'_
,
Ty
>
)
pub
fn
compute_abi_info
<
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'_
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
,
C
:
HasDataLayout
,
C
:
LayoutOf
<
Ty
=
Ty
>
+
HasDataLayout
,
{
{
let
mut
offset
=
Size
::
ZERO
;
let
mut
offset
=
Size
::
ZERO
;
if
!
fn_abi
.ret
.is_ignore
()
{
if
!
fn_abi
.ret
.is_ignore
()
{
...
...
compiler/rustc_target/src/abi/call/sparc64.rs
浏览文件 @
83d986aa
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
fn
is_homogeneous_aggregate
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
->
Option
<
Uniform
>
fn
is_homogeneous_aggregate
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
->
Option
<
Uniform
>
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
arg
.layout
.homogeneous_aggregate
(
cx
)
.ok
()
.and_then
(|
ha
|
ha
.unit
())
.and_then
(|
unit
|
{
arg
.layout
.homogeneous_aggregate
(
cx
)
.ok
()
.and_then
(|
ha
|
ha
.unit
())
.and_then
(|
unit
|
{
// Ensure we have at most eight uniquely addressable members.
// Ensure we have at most eight uniquely addressable members.
...
@@ -27,7 +27,7 @@ fn is_homogeneous_aggregate<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>) -> Opti
...
@@ -27,7 +27,7 @@ fn is_homogeneous_aggregate<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>) -> Opti
fn
classify_ret
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
ret
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
fn
classify_ret
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
ret
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
if
!
ret
.layout
.is_aggregate
()
{
if
!
ret
.layout
.is_aggregate
()
{
ret
.extend_integer_width_to
(
64
);
ret
.extend_integer_width_to
(
64
);
...
@@ -53,7 +53,7 @@ fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'a, Ty>)
...
@@ -53,7 +53,7 @@ fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'a, Ty>)
fn
classify_arg
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
fn
classify_arg
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
if
!
arg
.layout
.is_aggregate
()
{
if
!
arg
.layout
.is_aggregate
()
{
arg
.extend_integer_width_to
(
64
);
arg
.extend_integer_width_to
(
64
);
...
@@ -77,7 +77,7 @@ fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>)
...
@@ -77,7 +77,7 @@ fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
if
!
fn_abi
.ret
.is_ignore
()
{
if
!
fn_abi
.ret
.is_ignore
()
{
classify_ret
(
cx
,
&
mut
fn_abi
.ret
);
classify_ret
(
cx
,
&
mut
fn_abi
.ret
);
...
...
compiler/rustc_target/src/abi/call/wasm.rs
浏览文件 @
83d986aa
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
fn
unwrap_trivial_aggregate
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
val
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
->
bool
fn
unwrap_trivial_aggregate
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
val
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
->
bool
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
if
val
.layout
.is_aggregate
()
{
if
val
.layout
.is_aggregate
()
{
if
let
Some
(
unit
)
=
val
.layout
.homogeneous_aggregate
(
cx
)
.ok
()
.and_then
(|
ha
|
ha
.unit
())
{
if
let
Some
(
unit
)
=
val
.layout
.homogeneous_aggregate
(
cx
)
.ok
()
.and_then
(|
ha
|
ha
.unit
())
{
...
@@ -21,7 +21,7 @@ fn unwrap_trivial_aggregate<'a, Ty, C>(cx: &C, val: &mut ArgAbi<'a, Ty>) -> bool
...
@@ -21,7 +21,7 @@ fn unwrap_trivial_aggregate<'a, Ty, C>(cx: &C, val: &mut ArgAbi<'a, Ty>) -> bool
fn
classify_ret
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
ret
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
fn
classify_ret
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
ret
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
ret
.extend_integer_width_to
(
32
);
ret
.extend_integer_width_to
(
32
);
if
ret
.layout
.is_aggregate
()
&&
!
unwrap_trivial_aggregate
(
cx
,
ret
)
{
if
ret
.layout
.is_aggregate
()
&&
!
unwrap_trivial_aggregate
(
cx
,
ret
)
{
...
@@ -32,7 +32,7 @@ fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'a, Ty>)
...
@@ -32,7 +32,7 @@ fn classify_ret<'a, Ty, C>(cx: &C, ret: &mut ArgAbi<'a, Ty>)
fn
classify_arg
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
fn
classify_arg
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
arg
:
&
mut
ArgAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
arg
.extend_integer_width_to
(
32
);
arg
.extend_integer_width_to
(
32
);
if
arg
.layout
.is_aggregate
()
&&
!
unwrap_trivial_aggregate
(
cx
,
arg
)
{
if
arg
.layout
.is_aggregate
()
&&
!
unwrap_trivial_aggregate
(
cx
,
arg
)
{
...
@@ -44,7 +44,7 @@ fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>)
...
@@ -44,7 +44,7 @@ fn classify_arg<'a, Ty, C>(cx: &C, arg: &mut ArgAbi<'a, Ty>)
pub
fn
compute_c_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
pub
fn
compute_c_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
if
!
fn_abi
.ret
.is_ignore
()
{
if
!
fn_abi
.ret
.is_ignore
()
{
classify_ret
(
cx
,
&
mut
fn_abi
.ret
);
classify_ret
(
cx
,
&
mut
fn_abi
.ret
);
...
...
compiler/rustc_target/src/abi/call/x86.rs
浏览文件 @
83d986aa
...
@@ -11,7 +11,7 @@ pub enum Flavor {
...
@@ -11,7 +11,7 @@ pub enum Flavor {
fn
is_single_fp_element
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
layout
:
TyAndLayout
<
'a
,
Ty
>
)
->
bool
fn
is_single_fp_element
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
layout
:
TyAndLayout
<
'a
,
Ty
>
)
->
bool
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
match
layout
.abi
{
match
layout
.abi
{
abi
::
Abi
::
Scalar
(
ref
scalar
)
=>
scalar
.value
.is_float
(),
abi
::
Abi
::
Scalar
(
ref
scalar
)
=>
scalar
.value
.is_float
(),
...
@@ -29,7 +29,7 @@ fn is_single_fp_element<'a, Ty, C>(cx: &C, layout: TyAndLayout<'a, Ty>) -> bool
...
@@ -29,7 +29,7 @@ fn is_single_fp_element<'a, Ty, C>(cx: &C, layout: TyAndLayout<'a, Ty>) -> bool
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
,
flavor
:
Flavor
)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
,
flavor
:
Flavor
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
+
HasTargetSpec
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
+
HasTargetSpec
,
{
{
if
!
fn_abi
.ret
.is_ignore
()
{
if
!
fn_abi
.ret
.is_ignore
()
{
if
fn_abi
.ret.layout
.is_aggregate
()
{
if
fn_abi
.ret.layout
.is_aggregate
()
{
...
...
compiler/rustc_target/src/abi/call/x86_64.rs
浏览文件 @
83d986aa
...
@@ -27,7 +27,7 @@ fn classify_arg<'a, Ty, C>(
...
@@ -27,7 +27,7 @@ fn classify_arg<'a, Ty, C>(
)
->
Result
<
[
Option
<
Class
>
;
MAX_EIGHTBYTES
],
Memory
>
)
->
Result
<
[
Option
<
Class
>
;
MAX_EIGHTBYTES
],
Memory
>
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
fn
classify
<
'a
,
Ty
,
C
>
(
fn
classify
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
cx
:
&
C
,
...
@@ -37,7 +37,7 @@ fn classify<'a, Ty, C>(
...
@@ -37,7 +37,7 @@ fn classify<'a, Ty, C>(
)
->
Result
<
(),
Memory
>
)
->
Result
<
(),
Memory
>
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
if
!
off
.is_aligned
(
layout
.align.abi
)
{
if
!
off
.is_aligned
(
layout
.align.abi
)
{
if
!
layout
.is_zst
()
{
if
!
layout
.is_zst
()
{
...
@@ -173,7 +173,7 @@ fn cast_target(cls: &[Option<Class>], size: Size) -> CastTarget {
...
@@ -173,7 +173,7 @@ fn cast_target(cls: &[Option<Class>], size: Size) -> CastTarget {
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
pub
fn
compute_abi_info
<
'a
,
Ty
,
C
>
(
cx
:
&
C
,
fn_abi
:
&
mut
FnAbi
<
'a
,
Ty
>
)
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
+
Copy
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
=
TyAndLayout
<
'a
,
Ty
>>
+
HasDataLayout
,
{
{
let
mut
int_regs
=
MAX_INT_REGS
;
let
mut
int_regs
=
MAX_INT_REGS
;
let
mut
sse_regs
=
MAX_SSE_REGS
;
let
mut
sse_regs
=
MAX_SSE_REGS
;
...
...
compiler/rustc_target/src/abi/mod.rs
浏览文件 @
83d986aa
...
@@ -1174,9 +1174,9 @@ fn deref(&self) -> &&'a Layout {
...
@@ -1174,9 +1174,9 @@ fn deref(&self) -> &&'a Layout {
}
}
/// Trait for context types that can compute layouts of things.
/// Trait for context types that can compute layouts of things.
pub
trait
LayoutOf
{
pub
trait
LayoutOf
<
'a
>
{
type
Ty
;
type
Ty
;
type
TyAndLayout
;
type
TyAndLayout
:
MaybeResult
<
TyAndLayout
<
'a
,
Self
::
Ty
>>
;
fn
layout_of
(
&
self
,
ty
:
Self
::
Ty
)
->
Self
::
TyAndLayout
;
fn
layout_of
(
&
self
,
ty
:
Self
::
Ty
)
->
Self
::
TyAndLayout
;
fn
spanned_layout_of
(
&
self
,
ty
:
Self
::
Ty
,
_
span
:
Span
)
->
Self
::
TyAndLayout
{
fn
spanned_layout_of
(
&
self
,
ty
:
Self
::
Ty
,
_
span
:
Span
)
->
Self
::
TyAndLayout
{
...
@@ -1184,9 +1184,6 @@ fn spanned_layout_of(&self, ty: Self::Ty, _span: Span) -> Self::TyAndLayout {
...
@@ -1184,9 +1184,6 @@ fn spanned_layout_of(&self, ty: Self::Ty, _span: Span) -> Self::TyAndLayout {
}
}
}
}
/// The `TyAndLayout` above will always be a `MaybeResult<TyAndLayout<'_, Self>>`.
/// We can't add the bound due to the lifetime, but this trait is still useful when
/// writing code that's generic over the `LayoutOf` impl.
pub
trait
MaybeResult
<
T
>
{
pub
trait
MaybeResult
<
T
>
{
type
Error
;
type
Error
;
...
@@ -1239,7 +1236,7 @@ pub struct PointeeInfo {
...
@@ -1239,7 +1236,7 @@ pub struct PointeeInfo {
pub
address_space
:
AddressSpace
,
pub
address_space
:
AddressSpace
,
}
}
pub
trait
TyAndLayoutMethods
<
'a
,
C
:
LayoutOf
<
Ty
=
Self
>>
:
Sized
{
pub
trait
TyAndLayoutMethods
<
'a
,
C
:
LayoutOf
<
'a
,
Ty
=
Self
>>
:
Sized
{
fn
for_variant
(
fn
for_variant
(
this
:
TyAndLayout
<
'a
,
Self
>
,
this
:
TyAndLayout
<
'a
,
Self
>
,
cx
:
&
C
,
cx
:
&
C
,
...
@@ -1253,17 +1250,15 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
...
@@ -1253,17 +1250,15 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
pub
fn
for_variant
<
C
>
(
self
,
cx
:
&
C
,
variant_index
:
VariantIdx
)
->
Self
pub
fn
for_variant
<
C
>
(
self
,
cx
:
&
C
,
variant_index
:
VariantIdx
)
->
Self
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
,
C
:
LayoutOf
<
Ty
=
Ty
>
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
>
,
{
{
Ty
::
for_variant
(
self
,
cx
,
variant_index
)
Ty
::
for_variant
(
self
,
cx
,
variant_index
)
}
}
/// Callers might want to use `C: LayoutOf<Ty=Ty, TyAndLayout: MaybeResult<Self>>`
/// to allow recursion (see `might_permit_zero_init` below for an example).
pub
fn
field
<
C
>
(
self
,
cx
:
&
C
,
i
:
usize
)
->
C
::
TyAndLayout
pub
fn
field
<
C
>
(
self
,
cx
:
&
C
,
i
:
usize
)
->
C
::
TyAndLayout
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
,
C
:
LayoutOf
<
Ty
=
Ty
>
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
>
,
{
{
Ty
::
field
(
self
,
cx
,
i
)
Ty
::
field
(
self
,
cx
,
i
)
}
}
...
@@ -1271,7 +1266,7 @@ pub fn field<C>(self, cx: &C, i: usize) -> C::TyAndLayout
...
@@ -1271,7 +1266,7 @@ pub fn field<C>(self, cx: &C, i: usize) -> C::TyAndLayout
pub
fn
pointee_info_at
<
C
>
(
self
,
cx
:
&
C
,
offset
:
Size
)
->
Option
<
PointeeInfo
>
pub
fn
pointee_info_at
<
C
>
(
self
,
cx
:
&
C
,
offset
:
Size
)
->
Option
<
PointeeInfo
>
where
where
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
,
C
:
LayoutOf
<
Ty
=
Ty
>
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
>
,
{
{
Ty
::
pointee_info_at
(
self
,
cx
,
offset
)
Ty
::
pointee_info_at
(
self
,
cx
,
offset
)
}
}
...
@@ -1305,7 +1300,7 @@ pub fn might_permit_raw_init<C, E>(self, cx: &C, zero: bool) -> Result<bool, E>
...
@@ -1305,7 +1300,7 @@ pub fn might_permit_raw_init<C, E>(self, cx: &C, zero: bool) -> Result<bool, E>
where
where
Self
:
Copy
,
Self
:
Copy
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
,
Ty
:
TyAndLayoutMethods
<
'a
,
C
>
,
C
:
LayoutOf
<
Ty
=
Ty
,
TyAndLayout
:
MaybeResult
<
Self
,
Error
=
E
>>
+
HasDataLayout
,
C
:
LayoutOf
<
'a
,
Ty
=
Ty
,
TyAndLayout
:
MaybeResult
<
Self
,
Error
=
E
>>
+
HasDataLayout
,
{
{
let
scalar_allows_raw_init
=
move
|
s
:
&
Scalar
|
->
bool
{
let
scalar_allows_raw_init
=
move
|
s
:
&
Scalar
|
->
bool
{
if
zero
{
if
zero
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录