Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
da66431d
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,发现更多精彩内容 >>
提交
da66431d
编写于
2月 23, 2016
作者:
E
Eduard Burtescu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
trans: Combine cabi and back::abi into abi.
上级
cdfad407
变更
33
隐藏空白更改
内联
并排
Showing
33 changed file
with
45 addition
and
68 deletion
+45
-68
src/librustc/lib.rs
src/librustc/lib.rs
+0
-1
src/librustc_back/abi.rs
src/librustc_back/abi.rs
+0
-24
src/librustc_back/lib.rs
src/librustc_back/lib.rs
+0
-1
src/librustc_trans/lib.rs
src/librustc_trans/lib.rs
+0
-1
src/librustc_trans/trans/abi.rs
src/librustc_trans/trans/abi.rs
+15
-3
src/librustc_trans/trans/adt.rs
src/librustc_trans/trans/adt.rs
+1
-1
src/librustc_trans/trans/attributes.rs
src/librustc_trans/trans/attributes.rs
+1
-1
src/librustc_trans/trans/base.rs
src/librustc_trans/trans/base.rs
+2
-2
src/librustc_trans/trans/cabi_aarch64.rs
src/librustc_trans/trans/cabi_aarch64.rs
+1
-1
src/librustc_trans/trans/cabi_arm.rs
src/librustc_trans/trans/cabi_arm.rs
+1
-1
src/librustc_trans/trans/cabi_asmjs.rs
src/librustc_trans/trans/cabi_asmjs.rs
+1
-1
src/librustc_trans/trans/cabi_mips.rs
src/librustc_trans/trans/cabi_mips.rs
+1
-1
src/librustc_trans/trans/cabi_powerpc.rs
src/librustc_trans/trans/cabi_powerpc.rs
+1
-1
src/librustc_trans/trans/cabi_powerpc64.rs
src/librustc_trans/trans/cabi_powerpc64.rs
+1
-1
src/librustc_trans/trans/cabi_x86.rs
src/librustc_trans/trans/cabi_x86.rs
+1
-1
src/librustc_trans/trans/cabi_x86_64.rs
src/librustc_trans/trans/cabi_x86_64.rs
+1
-1
src/librustc_trans/trans/cabi_x86_win64.rs
src/librustc_trans/trans/cabi_x86_win64.rs
+1
-1
src/librustc_trans/trans/callee.rs
src/librustc_trans/trans/callee.rs
+1
-1
src/librustc_trans/trans/closure.rs
src/librustc_trans/trans/closure.rs
+1
-1
src/librustc_trans/trans/collector.rs
src/librustc_trans/trans/collector.rs
+1
-1
src/librustc_trans/trans/common.rs
src/librustc_trans/trans/common.rs
+1
-1
src/librustc_trans/trans/consts.rs
src/librustc_trans/trans/consts.rs
+1
-2
src/librustc_trans/trans/debuginfo/mod.rs
src/librustc_trans/trans/debuginfo/mod.rs
+1
-1
src/librustc_trans/trans/debuginfo/type_names.rs
src/librustc_trans/trans/debuginfo/type_names.rs
+1
-1
src/librustc_trans/trans/declare.rs
src/librustc_trans/trans/declare.rs
+1
-2
src/librustc_trans/trans/expr.rs
src/librustc_trans/trans/expr.rs
+1
-2
src/librustc_trans/trans/foreign.rs
src/librustc_trans/trans/foreign.rs
+2
-6
src/librustc_trans/trans/intrinsic.rs
src/librustc_trans/trans/intrinsic.rs
+1
-1
src/librustc_trans/trans/mir/block.rs
src/librustc_trans/trans/mir/block.rs
+1
-1
src/librustc_trans/trans/mir/constant.rs
src/librustc_trans/trans/mir/constant.rs
+1
-1
src/librustc_trans/trans/mod.rs
src/librustc_trans/trans/mod.rs
+1
-1
src/librustc_trans/trans/monomorphize.rs
src/librustc_trans/trans/monomorphize.rs
+1
-1
src/librustc_trans/trans/type_of.rs
src/librustc_trans/trans/type_of.rs
+1
-2
未找到文件。
src/librustc/lib.rs
浏览文件 @
da66431d
...
@@ -73,7 +73,6 @@
...
@@ -73,7 +73,6 @@
pub
mod
diagnostics
;
pub
mod
diagnostics
;
pub
mod
back
{
pub
mod
back
{
pub
use
rustc_back
::
abi
;
pub
use
rustc_back
::
rpath
;
pub
use
rustc_back
::
rpath
;
pub
use
rustc_back
::
svh
;
pub
use
rustc_back
::
svh
;
}
}
...
...
src/librustc_back/abi.rs
已删除
100644 → 0
浏览文件 @
cdfad407
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
pub
const
BOX_FIELD_DROP_GLUE
:
usize
=
1
;
pub
const
BOX_FIELD_BODY
:
usize
=
4
;
/// The first half of a fat pointer.
/// - For a closure, this is the code address.
/// - For an object or trait instance, this is the address of the box.
/// - For a slice, this is the base address.
pub
const
FAT_PTR_ADDR
:
usize
=
0
;
/// The second half of a fat pointer.
/// - For a closure, this is the address of the environment.
/// - For an object or trait instance, this is the address of the vtable.
/// - For a slice, this is the length.
pub
const
FAT_PTR_EXTRA
:
usize
=
1
;
src/librustc_back/lib.rs
浏览文件 @
da66431d
...
@@ -48,7 +48,6 @@
...
@@ -48,7 +48,6 @@
extern
crate
rustc_front
;
extern
crate
rustc_front
;
#[macro_use]
extern
crate
log
;
#[macro_use]
extern
crate
log
;
pub
mod
abi
;
pub
mod
tempdir
;
pub
mod
tempdir
;
pub
mod
rpath
;
pub
mod
rpath
;
pub
mod
sha2
;
pub
mod
sha2
;
...
...
src/librustc_trans/lib.rs
浏览文件 @
da66431d
...
@@ -61,7 +61,6 @@
...
@@ -61,7 +61,6 @@
pub
use
rustc
::
util
;
pub
use
rustc
::
util
;
pub
mod
back
{
pub
mod
back
{
pub
use
rustc_back
::
abi
;
pub
use
rustc_back
::
rpath
;
pub
use
rustc_back
::
rpath
;
pub
use
rustc_back
::
svh
;
pub
use
rustc_back
::
svh
;
...
...
src/librustc_trans/trans/
c
abi.rs
→
src/librustc_trans/trans/abi.rs
浏览文件 @
da66431d
// Copyright 2012-201
5
The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-201
6
The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
// http://rust-lang.org/COPYRIGHT.
//
//
...
@@ -28,7 +28,19 @@
...
@@ -28,7 +28,19 @@
use
middle
::
ty
::{
self
,
Ty
};
use
middle
::
ty
::{
self
,
Ty
};
use
syntax
::
abi
::
Abi
;
pub
use
syntax
::
abi
::
Abi
;
/// The first half of a fat pointer.
/// - For a closure, this is the code address.
/// - For an object or trait instance, this is the address of the box.
/// - For a slice, this is the base address.
pub
const
FAT_PTR_ADDR
:
usize
=
0
;
/// The second half of a fat pointer.
/// - For a closure, this is the address of the environment.
/// - For an object or trait instance, this is the address of the vtable.
/// - For a slice, this is the length.
pub
const
FAT_PTR_EXTRA
:
usize
=
1
;
#[derive(Clone,
Copy,
PartialEq,
Debug)]
#[derive(Clone,
Copy,
PartialEq,
Debug)]
pub
enum
ArgKind
{
pub
enum
ArgKind
{
...
@@ -130,7 +142,7 @@ pub fn new<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
...
@@ -130,7 +142,7 @@ pub fn new<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
abi
:
Abi
,
abi
:
Abi
,
sig
:
&
ty
::
FnSig
<
'tcx
>
,
sig
:
&
ty
::
FnSig
<
'tcx
>
,
extra_args
:
&
[
Ty
<
'tcx
>
])
->
FnType
{
extra_args
:
&
[
Ty
<
'tcx
>
])
->
FnType
{
use
s
yntax
::
abi
::
Abi
::
*
;
use
s
elf
::
Abi
::
*
;
let
cconv
=
match
ccx
.sess
()
.target.target
.adjust_abi
(
abi
)
{
let
cconv
=
match
ccx
.sess
()
.target.target
.adjust_abi
(
abi
)
{
RustIntrinsic
=>
{
RustIntrinsic
=>
{
// Intrinsics are emitted at the call site
// Intrinsics are emitted at the call site
...
...
src/librustc_trans/trans/adt.rs
浏览文件 @
da66431d
...
@@ -48,13 +48,13 @@
...
@@ -48,13 +48,13 @@
use
std
::
rc
::
Rc
;
use
std
::
rc
::
Rc
;
use
llvm
::{
ValueRef
,
True
,
IntEQ
,
IntNE
};
use
llvm
::{
ValueRef
,
True
,
IntEQ
,
IntNE
};
use
back
::
abi
::
FAT_PTR_ADDR
;
use
middle
::
subst
;
use
middle
::
subst
;
use
middle
::
ty
::{
self
,
Ty
,
TyCtxt
};
use
middle
::
ty
::{
self
,
Ty
,
TyCtxt
};
use
syntax
::
ast
;
use
syntax
::
ast
;
use
syntax
::
attr
;
use
syntax
::
attr
;
use
syntax
::
attr
::
IntType
;
use
syntax
::
attr
::
IntType
;
use
trans
::
_
match
;
use
trans
::
_
match
;
use
trans
::
abi
::
FAT_PTR_ADDR
;
use
trans
::
base
::
InitAlloca
;
use
trans
::
base
::
InitAlloca
;
use
trans
::
build
::
*
;
use
trans
::
build
::
*
;
use
trans
::
cleanup
;
use
trans
::
cleanup
;
...
...
src/librustc_trans/trans/attributes.rs
浏览文件 @
da66431d
...
@@ -15,10 +15,10 @@
...
@@ -15,10 +15,10 @@
use
middle
::
infer
;
use
middle
::
infer
;
use
middle
::
traits
::
ProjectionMode
;
use
middle
::
traits
::
ProjectionMode
;
use
session
::
config
::
NoDebugInfo
;
use
session
::
config
::
NoDebugInfo
;
use
syntax
::
abi
::
Abi
;
pub
use
syntax
::
attr
::
InlineAttr
;
pub
use
syntax
::
attr
::
InlineAttr
;
use
syntax
::
ast
;
use
syntax
::
ast
;
use
rustc_front
::
hir
;
use
rustc_front
::
hir
;
use
trans
::
abi
::
Abi
;
use
trans
::
base
;
use
trans
::
base
;
use
trans
::
common
;
use
trans
::
common
;
use
trans
::
context
::
CrateContext
;
use
trans
::
context
::
CrateContext
;
...
...
src/librustc_trans/trans/base.rs
浏览文件 @
da66431d
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
use
super
::
ModuleTranslation
;
use
super
::
ModuleTranslation
;
use
back
::
link
::
mangle_exported_name
;
use
back
::
link
::
mangle_exported_name
;
use
back
::
{
link
,
abi
}
;
use
back
::
link
;
use
lint
;
use
lint
;
use
llvm
::{
BasicBlockRef
,
Linkage
,
ValueRef
,
Vector
,
get_param
};
use
llvm
::{
BasicBlockRef
,
Linkage
,
ValueRef
,
Vector
,
get_param
};
use
llvm
;
use
llvm
;
...
@@ -52,6 +52,7 @@
...
@@ -52,6 +52,7 @@
use
session
::
config
::{
self
,
NoDebugInfo
,
FullDebugInfo
};
use
session
::
config
::{
self
,
NoDebugInfo
,
FullDebugInfo
};
use
session
::
Session
;
use
session
::
Session
;
use
trans
::
_
match
;
use
trans
::
_
match
;
use
trans
::
abi
::{
self
,
Abi
};
use
trans
::
adt
;
use
trans
::
adt
;
use
trans
::
assert_dep_graph
;
use
trans
::
assert_dep_graph
;
use
trans
::
attributes
;
use
trans
::
attributes
;
...
@@ -100,7 +101,6 @@
...
@@ -100,7 +101,6 @@
use
std
::
collections
::{
HashMap
,
HashSet
};
use
std
::
collections
::{
HashMap
,
HashSet
};
use
std
::
str
;
use
std
::
str
;
use
std
::{
i8
,
i16
,
i32
,
i64
};
use
std
::{
i8
,
i16
,
i32
,
i64
};
use
syntax
::
abi
::
Abi
;
use
syntax
::
codemap
::{
Span
,
DUMMY_SP
};
use
syntax
::
codemap
::{
Span
,
DUMMY_SP
};
use
syntax
::
parse
::
token
::
InternedString
;
use
syntax
::
parse
::
token
::
InternedString
;
use
syntax
::
attr
::
AttrMetaMethods
;
use
syntax
::
attr
::
AttrMetaMethods
;
...
...
src/librustc_trans/trans/cabi_aarch64.rs
浏览文件 @
da66431d
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#![allow(non_upper_case_globals)]
#![allow(non_upper_case_globals)]
use
llvm
::{
Integer
,
Pointer
,
Float
,
Double
,
Struct
,
Array
,
Vector
,
Attribute
};
use
llvm
::{
Integer
,
Pointer
,
Float
,
Double
,
Struct
,
Array
,
Vector
,
Attribute
};
use
trans
::
c
abi
::{
FnType
,
ArgType
};
use
trans
::
abi
::{
FnType
,
ArgType
};
use
trans
::
context
::
CrateContext
;
use
trans
::
context
::
CrateContext
;
use
trans
::
type_
::
Type
;
use
trans
::
type_
::
Type
;
...
...
src/librustc_trans/trans/cabi_arm.rs
浏览文件 @
da66431d
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#![allow(non_upper_case_globals)]
#![allow(non_upper_case_globals)]
use
llvm
::{
Integer
,
Pointer
,
Float
,
Double
,
Struct
,
Array
,
Vector
,
Attribute
};
use
llvm
::{
Integer
,
Pointer
,
Float
,
Double
,
Struct
,
Array
,
Vector
,
Attribute
};
use
trans
::
c
abi
::{
FnType
,
ArgType
};
use
trans
::
abi
::{
FnType
,
ArgType
};
use
trans
::
context
::
CrateContext
;
use
trans
::
context
::
CrateContext
;
use
trans
::
type_
::
Type
;
use
trans
::
type_
::
Type
;
...
...
src/librustc_trans/trans/cabi_asmjs.rs
浏览文件 @
da66431d
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#![allow(non_upper_case_globals)]
#![allow(non_upper_case_globals)]
use
llvm
::{
Struct
,
Array
,
Attribute
};
use
llvm
::{
Struct
,
Array
,
Attribute
};
use
trans
::
c
abi
::{
FnType
,
ArgType
};
use
trans
::
abi
::{
FnType
,
ArgType
};
use
trans
::
context
::
CrateContext
;
use
trans
::
context
::
CrateContext
;
use
trans
::
type_
::
Type
;
use
trans
::
type_
::
Type
;
...
...
src/librustc_trans/trans/cabi_mips.rs
浏览文件 @
da66431d
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
use
std
::
cmp
;
use
std
::
cmp
;
use
llvm
;
use
llvm
;
use
llvm
::{
Integer
,
Pointer
,
Float
,
Double
,
Struct
,
Array
,
Vector
,
Attribute
};
use
llvm
::{
Integer
,
Pointer
,
Float
,
Double
,
Struct
,
Array
,
Vector
,
Attribute
};
use
trans
::
c
abi
::{
ArgType
,
FnType
};
use
trans
::
abi
::{
ArgType
,
FnType
};
use
trans
::
context
::
CrateContext
;
use
trans
::
context
::
CrateContext
;
use
trans
::
type_
::
Type
;
use
trans
::
type_
::
Type
;
...
...
src/librustc_trans/trans/cabi_powerpc.rs
浏览文件 @
da66431d
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
use
libc
::
c_uint
;
use
libc
::
c_uint
;
use
llvm
;
use
llvm
;
use
llvm
::{
Integer
,
Pointer
,
Float
,
Double
,
Struct
,
Array
,
Attribute
};
use
llvm
::{
Integer
,
Pointer
,
Float
,
Double
,
Struct
,
Array
,
Attribute
};
use
trans
::
c
abi
::{
FnType
,
ArgType
};
use
trans
::
abi
::{
FnType
,
ArgType
};
use
trans
::
context
::
CrateContext
;
use
trans
::
context
::
CrateContext
;
use
trans
::
type_
::
Type
;
use
trans
::
type_
::
Type
;
...
...
src/librustc_trans/trans/cabi_powerpc64.rs
浏览文件 @
da66431d
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
// need to be fixed when PowerPC vector support is added.
// need to be fixed when PowerPC vector support is added.
use
llvm
::{
Integer
,
Pointer
,
Float
,
Double
,
Struct
,
Array
,
Attribute
};
use
llvm
::{
Integer
,
Pointer
,
Float
,
Double
,
Struct
,
Array
,
Attribute
};
use
trans
::
c
abi
::{
FnType
,
ArgType
};
use
trans
::
abi
::{
FnType
,
ArgType
};
use
trans
::
context
::
CrateContext
;
use
trans
::
context
::
CrateContext
;
use
trans
::
type_
::
Type
;
use
trans
::
type_
::
Type
;
...
...
src/librustc_trans/trans/cabi_x86.rs
浏览文件 @
da66431d
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
// except according to those terms.
// except according to those terms.
use
llvm
::
*
;
use
llvm
::
*
;
use
trans
::
c
abi
::{
ArgType
,
FnType
};
use
trans
::
abi
::{
ArgType
,
FnType
};
use
trans
::
type_
::
Type
;
use
trans
::
type_
::
Type
;
use
super
::
common
::
*
;
use
super
::
common
::
*
;
use
super
::
machine
::
*
;
use
super
::
machine
::
*
;
...
...
src/librustc_trans/trans/cabi_x86_64.rs
浏览文件 @
da66431d
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
use
llvm
::{
Integer
,
Pointer
,
Float
,
Double
};
use
llvm
::{
Integer
,
Pointer
,
Float
,
Double
};
use
llvm
::{
Struct
,
Array
,
Attribute
,
Vector
};
use
llvm
::{
Struct
,
Array
,
Attribute
,
Vector
};
use
trans
::
c
abi
::{
ArgType
,
FnType
};
use
trans
::
abi
::{
ArgType
,
FnType
};
use
trans
::
context
::
CrateContext
;
use
trans
::
context
::
CrateContext
;
use
trans
::
type_
::
Type
;
use
trans
::
type_
::
Type
;
...
...
src/librustc_trans/trans/cabi_x86_win64.rs
浏览文件 @
da66431d
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
use
llvm
::
*
;
use
llvm
::
*
;
use
super
::
common
::
*
;
use
super
::
common
::
*
;
use
super
::
machine
::
*
;
use
super
::
machine
::
*
;
use
trans
::
c
abi
::{
ArgType
,
FnType
};
use
trans
::
abi
::{
ArgType
,
FnType
};
use
trans
::
type_
::
Type
;
use
trans
::
type_
::
Type
;
// Win64 ABI: http://msdn.microsoft.com/en-us/library/zthk2dkh.aspx
// Win64 ABI: http://msdn.microsoft.com/en-us/library/zthk2dkh.aspx
...
...
src/librustc_trans/trans/callee.rs
浏览文件 @
da66431d
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
use
middle
::
subst
::{
Substs
};
use
middle
::
subst
::{
Substs
};
use
middle
::
traits
;
use
middle
::
traits
;
use
rustc
::
front
::
map
as
hir_map
;
use
rustc
::
front
::
map
as
hir_map
;
use
trans
::
abi
::
Abi
;
use
trans
::
adt
;
use
trans
::
adt
;
use
trans
::
attributes
;
use
trans
::
attributes
;
use
trans
::
base
;
use
trans
::
base
;
...
@@ -54,7 +55,6 @@
...
@@ -54,7 +55,6 @@
use
middle
::
ty
::{
self
,
Ty
,
TyCtxt
,
TypeFoldable
};
use
middle
::
ty
::{
self
,
Ty
,
TyCtxt
,
TypeFoldable
};
use
rustc_front
::
hir
;
use
rustc_front
::
hir
;
use
syntax
::
abi
::
Abi
;
use
syntax
::
ast
;
use
syntax
::
ast
;
use
syntax
::
codemap
::
DUMMY_SP
;
use
syntax
::
codemap
::
DUMMY_SP
;
use
syntax
::
errors
;
use
syntax
::
errors
;
...
...
src/librustc_trans/trans/closure.rs
浏览文件 @
da66431d
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
use
middle
::
def_id
::
DefId
;
use
middle
::
def_id
::
DefId
;
use
middle
::
infer
;
use
middle
::
infer
;
use
middle
::
traits
::
ProjectionMode
;
use
middle
::
traits
::
ProjectionMode
;
use
trans
::
abi
::
Abi
::
RustCall
;
use
trans
::
adt
;
use
trans
::
adt
;
use
trans
::
attributes
;
use
trans
::
attributes
;
use
trans
::
base
::
*
;
use
trans
::
base
::
*
;
...
@@ -32,7 +33,6 @@
...
@@ -32,7 +33,6 @@
use
middle
::
ty
;
use
middle
::
ty
;
use
session
::
config
::
FullDebugInfo
;
use
session
::
config
::
FullDebugInfo
;
use
syntax
::
abi
::
Abi
::
RustCall
;
use
syntax
::
ast
;
use
syntax
::
ast
;
use
syntax
::
attr
::{
ThinAttributes
,
ThinAttributesExt
};
use
syntax
::
attr
::{
ThinAttributes
,
ThinAttributesExt
};
...
...
src/librustc_trans/trans/collector.rs
浏览文件 @
da66431d
...
@@ -1261,7 +1261,7 @@ pub fn push_unique_type_name<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
...
@@ -1261,7 +1261,7 @@ pub fn push_unique_type_name<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
output
.push_str
(
"unsafe "
);
output
.push_str
(
"unsafe "
);
}
}
if
abi
!=
::
syntax
::
abi
::
Abi
::
Rust
{
if
abi
!=
::
trans
::
abi
::
Abi
::
Rust
{
output
.push_str
(
"extern
\"
"
);
output
.push_str
(
"extern
\"
"
);
output
.push_str
(
abi
.name
());
output
.push_str
(
abi
.name
());
output
.push_str
(
"
\"
"
);
output
.push_str
(
"
\"
"
);
...
...
src/librustc_trans/trans/common.rs
浏览文件 @
da66431d
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
use
middle
::
infer
;
use
middle
::
infer
;
use
middle
::
lang_items
::
LangItem
;
use
middle
::
lang_items
::
LangItem
;
use
middle
::
subst
::
Substs
;
use
middle
::
subst
::
Substs
;
use
trans
::
abi
::
Abi
;
use
trans
::
base
;
use
trans
::
base
;
use
trans
::
build
;
use
trans
::
build
;
use
trans
::
builder
::
Builder
;
use
trans
::
builder
::
Builder
;
...
@@ -49,7 +50,6 @@
...
@@ -49,7 +50,6 @@
use
std
::
ffi
::
CString
;
use
std
::
ffi
::
CString
;
use
std
::
cell
::{
Cell
,
RefCell
};
use
std
::
cell
::{
Cell
,
RefCell
};
use
syntax
::
abi
::
Abi
;
use
syntax
::
ast
;
use
syntax
::
ast
;
use
syntax
::
codemap
::{
DUMMY_SP
,
Span
};
use
syntax
::
codemap
::{
DUMMY_SP
,
Span
};
use
syntax
::
parse
::
token
::
InternedString
;
use
syntax
::
parse
::
token
::
InternedString
;
...
...
src/librustc_trans/trans/consts.rs
浏览文件 @
da66431d
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
// except according to those terms.
// except according to those terms.
use
back
::
abi
;
use
llvm
;
use
llvm
;
use
llvm
::{
ConstFCmp
,
ConstICmp
,
SetLinkage
,
SetUnnamedAddr
};
use
llvm
::{
ConstFCmp
,
ConstICmp
,
SetLinkage
,
SetUnnamedAddr
};
use
llvm
::{
InternalLinkage
,
ValueRef
,
Bool
,
True
};
use
llvm
::{
InternalLinkage
,
ValueRef
,
Bool
,
True
};
...
@@ -19,7 +18,7 @@
...
@@ -19,7 +18,7 @@
use
middle
::
def
::
Def
;
use
middle
::
def
::
Def
;
use
middle
::
def_id
::
DefId
;
use
middle
::
def_id
::
DefId
;
use
rustc
::
front
::
map
as
hir_map
;
use
rustc
::
front
::
map
as
hir_map
;
use
trans
::{
adt
,
closure
,
debuginfo
,
expr
,
inline
,
machine
};
use
trans
::{
a
bi
,
a
dt
,
closure
,
debuginfo
,
expr
,
inline
,
machine
};
use
trans
::
base
::{
self
,
exported_name
,
push_ctxt
};
use
trans
::
base
::{
self
,
exported_name
,
push_ctxt
};
use
trans
::
callee
::
Callee
;
use
trans
::
callee
::
Callee
;
use
trans
::
collector
::{
self
,
TransItem
};
use
trans
::
collector
::{
self
,
TransItem
};
...
...
src/librustc_trans/trans/debuginfo/mod.rs
浏览文件 @
da66431d
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
use
rustc_front
;
use
rustc_front
;
use
rustc_front
::
hir
;
use
rustc_front
::
hir
;
use
trans
::
abi
::
Abi
;
use
trans
::
common
::{
NodeIdAndSpan
,
CrateContext
,
FunctionContext
,
Block
};
use
trans
::
common
::{
NodeIdAndSpan
,
CrateContext
,
FunctionContext
,
Block
};
use
trans
;
use
trans
;
use
trans
::{
monomorphize
,
type_of
};
use
trans
::{
monomorphize
,
type_of
};
...
@@ -49,7 +50,6 @@
...
@@ -49,7 +50,6 @@
use
syntax
::
codemap
::{
Span
,
Pos
};
use
syntax
::
codemap
::{
Span
,
Pos
};
use
syntax
::{
ast
,
codemap
};
use
syntax
::{
ast
,
codemap
};
use
syntax
::
abi
::
Abi
;
use
syntax
::
attr
::
IntType
;
use
syntax
::
attr
::
IntType
;
use
syntax
::
parse
::
token
::{
self
,
special_idents
};
use
syntax
::
parse
::
token
::{
self
,
special_idents
};
...
...
src/librustc_trans/trans/debuginfo/type_names.rs
浏览文件 @
da66431d
...
@@ -107,7 +107,7 @@ pub fn push_debuginfo_type_name<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
...
@@ -107,7 +107,7 @@ pub fn push_debuginfo_type_name<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
output
.push_str
(
"unsafe "
);
output
.push_str
(
"unsafe "
);
}
}
if
abi
!=
::
syntax
::
abi
::
Abi
::
Rust
{
if
abi
!=
::
trans
::
abi
::
Abi
::
Rust
{
output
.push_str
(
"extern
\"
"
);
output
.push_str
(
"extern
\"
"
);
output
.push_str
(
abi
.name
());
output
.push_str
(
abi
.name
());
output
.push_str
(
"
\"
"
);
output
.push_str
(
"
\"
"
);
...
...
src/librustc_trans/trans/declare.rs
浏览文件 @
da66431d
...
@@ -23,10 +23,9 @@
...
@@ -23,10 +23,9 @@
use
middle
::
ty
;
use
middle
::
ty
;
use
middle
::
infer
;
use
middle
::
infer
;
use
middle
::
traits
::
ProjectionMode
;
use
middle
::
traits
::
ProjectionMode
;
use
syntax
::
abi
::
Abi
;
use
trans
::
abi
::{
Abi
,
FnType
}
;
use
trans
::
attributes
;
use
trans
::
attributes
;
use
trans
::
base
;
use
trans
::
base
;
use
trans
::
cabi
::
FnType
;
use
trans
::
context
::
CrateContext
;
use
trans
::
context
::
CrateContext
;
use
trans
::
type_
::
Type
;
use
trans
::
type_
::
Type
;
use
trans
::
type_of
;
use
trans
::
type_of
;
...
...
src/librustc_trans/trans/expr.rs
浏览文件 @
da66431d
...
@@ -51,12 +51,11 @@
...
@@ -51,12 +51,11 @@
pub
use
self
::
Dest
::
*
;
pub
use
self
::
Dest
::
*
;
use
self
::
lazy_binop_ty
::
*
;
use
self
::
lazy_binop_ty
::
*
;
use
back
::
abi
;
use
llvm
::{
self
,
ValueRef
,
TypeKind
};
use
llvm
::{
self
,
ValueRef
,
TypeKind
};
use
middle
::
const_qualif
::
ConstQualif
;
use
middle
::
const_qualif
::
ConstQualif
;
use
middle
::
def
::
Def
;
use
middle
::
def
::
Def
;
use
middle
::
subst
::
Substs
;
use
middle
::
subst
::
Substs
;
use
trans
::{
_
match
,
adt
,
asm
,
base
,
closure
,
consts
,
controlflow
};
use
trans
::{
_
match
,
a
bi
,
a
dt
,
asm
,
base
,
closure
,
consts
,
controlflow
};
use
trans
::
base
::
*
;
use
trans
::
base
::
*
;
use
trans
::
build
::
*
;
use
trans
::
build
::
*
;
use
trans
::
callee
::{
Callee
,
ArgExprs
,
ArgOverloadedCall
,
ArgOverloadedOp
};
use
trans
::
callee
::{
Callee
,
ArgExprs
,
ArgOverloadedCall
,
ArgOverloadedOp
};
...
...
src/librustc_trans/trans/foreign.rs
浏览文件 @
da66431d
...
@@ -9,15 +9,15 @@
...
@@ -9,15 +9,15 @@
// except according to those terms.
// except according to those terms.
use
back
::
{
abi
,
link
}
;
use
back
::
link
;
use
llvm
::{
ValueRef
,
get_param
};
use
llvm
::{
ValueRef
,
get_param
};
use
llvm
;
use
llvm
;
use
middle
::
weak_lang_items
;
use
middle
::
weak_lang_items
;
use
trans
::
abi
::{
self
,
Abi
,
FnType
};
use
trans
::
attributes
;
use
trans
::
attributes
;
use
trans
::
base
::{
llvm_linkage_by_name
,
push_ctxt
};
use
trans
::
base
::{
llvm_linkage_by_name
,
push_ctxt
};
use
trans
::
base
;
use
trans
::
base
;
use
trans
::
build
::
*
;
use
trans
::
build
::
*
;
use
trans
::
cabi
::
FnType
;
use
trans
::
common
::
*
;
use
trans
::
common
::
*
;
use
trans
::
debuginfo
::
DebugLoc
;
use
trans
::
debuginfo
::
DebugLoc
;
use
trans
::
declare
;
use
trans
::
declare
;
...
@@ -35,7 +35,6 @@
...
@@ -35,7 +35,6 @@
use
std
::
cmp
;
use
std
::
cmp
;
use
std
::
iter
::
once
;
use
std
::
iter
::
once
;
use
libc
::
c_uint
;
use
libc
::
c_uint
;
use
syntax
::
abi
::
Abi
;
use
syntax
::
attr
;
use
syntax
::
attr
;
use
syntax
::
parse
::
token
::{
InternedString
,
special_idents
};
use
syntax
::
parse
::
token
::{
InternedString
,
special_idents
};
use
syntax
::
ast
;
use
syntax
::
ast
;
...
@@ -715,7 +714,4 @@ pub fn link_name(name: ast::Name, attrs: &[ast::Attribute]) -> InternedString {
...
@@ -715,7 +714,4 @@ pub fn link_name(name: ast::Name, attrs: &[ast::Attribute]) -> InternedString {
None
=>
name
.as_str
(),
None
=>
name
.as_str
(),
}
}
}
}
}
}
}
}
}
src/librustc_trans/trans/intrinsic.rs
浏览文件 @
da66431d
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
use
middle
::
infer
;
use
middle
::
infer
;
use
middle
::
subst
;
use
middle
::
subst
;
use
middle
::
subst
::
FnSpace
;
use
middle
::
subst
::
FnSpace
;
use
trans
::
abi
::
Abi
;
use
trans
::
adt
;
use
trans
::
adt
;
use
trans
::
attributes
;
use
trans
::
attributes
;
use
trans
::
base
::
*
;
use
trans
::
base
::
*
;
...
@@ -40,7 +41,6 @@
...
@@ -40,7 +41,6 @@
use
middle
::
subst
::
Substs
;
use
middle
::
subst
::
Substs
;
use
rustc
::
dep_graph
::
DepNode
;
use
rustc
::
dep_graph
::
DepNode
;
use
rustc_front
::
hir
;
use
rustc_front
::
hir
;
use
syntax
::
abi
::
Abi
;
use
syntax
::
ast
;
use
syntax
::
ast
;
use
syntax
::
ptr
::
P
;
use
syntax
::
ptr
::
P
;
use
syntax
::
parse
::
token
;
use
syntax
::
parse
::
token
;
...
...
src/librustc_trans/trans/mir/block.rs
浏览文件 @
da66431d
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
use
llvm
::{
BasicBlockRef
,
ValueRef
,
OperandBundleDef
};
use
llvm
::{
BasicBlockRef
,
ValueRef
,
OperandBundleDef
};
use
rustc
::
middle
::
ty
;
use
rustc
::
middle
::
ty
;
use
rustc
::
mir
::
repr
as
mir
;
use
rustc
::
mir
::
repr
as
mir
;
use
syntax
::
abi
::
Abi
;
use
trans
::
abi
::
Abi
;
use
trans
::
adt
;
use
trans
::
adt
;
use
trans
::
attributes
;
use
trans
::
attributes
;
use
trans
::
base
;
use
trans
::
base
;
...
...
src/librustc_trans/trans/mir/constant.rs
浏览文件 @
da66431d
...
@@ -8,12 +8,12 @@
...
@@ -8,12 +8,12 @@
// option. This file may not be copied, modified, or distributed
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// except according to those terms.
use
back
::
abi
;
use
llvm
::
ValueRef
;
use
llvm
::
ValueRef
;
use
middle
::
ty
::{
Ty
,
TypeFoldable
};
use
middle
::
ty
::{
Ty
,
TypeFoldable
};
use
rustc
::
middle
::
const_eval
::{
self
,
ConstVal
};
use
rustc
::
middle
::
const_eval
::{
self
,
ConstVal
};
use
rustc_const_eval
::
ConstInt
::
*
;
use
rustc_const_eval
::
ConstInt
::
*
;
use
rustc
::
mir
::
repr
as
mir
;
use
rustc
::
mir
::
repr
as
mir
;
use
trans
::
abi
;
use
trans
::
common
::{
self
,
BlockAndBuilder
,
C_bool
,
C_bytes
,
C_floating_f64
,
C_integral
,
use
trans
::
common
::{
self
,
BlockAndBuilder
,
C_bool
,
C_bytes
,
C_floating_f64
,
C_integral
,
C_str_slice
,
C_nil
,
C_undef
};
C_str_slice
,
C_nil
,
C_undef
};
use
trans
::
consts
;
use
trans
::
consts
;
...
...
src/librustc_trans/trans/mod.rs
浏览文件 @
da66431d
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#[macro_use]
#[macro_use]
mod
macros
;
mod
macros
;
mod
abi
;
mod
adt
;
mod
adt
;
mod
asm
;
mod
asm
;
mod
assert_dep_graph
;
mod
assert_dep_graph
;
...
@@ -27,7 +28,6 @@
...
@@ -27,7 +28,6 @@
mod
basic_block
;
mod
basic_block
;
mod
build
;
mod
build
;
mod
builder
;
mod
builder
;
mod
cabi
;
mod
cabi_aarch64
;
mod
cabi_aarch64
;
mod
cabi_arm
;
mod
cabi_arm
;
mod
cabi_asmjs
;
mod
cabi_asmjs
;
...
...
src/librustc_trans/trans/monomorphize.rs
浏览文件 @
da66431d
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
use
middle
::
subst
;
use
middle
::
subst
;
use
middle
::
subst
::{
Subst
,
Substs
};
use
middle
::
subst
::{
Subst
,
Substs
};
use
middle
::
ty
::
fold
::{
TypeFolder
,
TypeFoldable
};
use
middle
::
ty
::
fold
::{
TypeFolder
,
TypeFoldable
};
use
trans
::
abi
::
Abi
;
use
trans
::
attributes
;
use
trans
::
attributes
;
use
trans
::
base
::{
push_ctxt
};
use
trans
::
base
::{
push_ctxt
};
use
trans
::
base
::
trans_fn
;
use
trans
::
base
::
trans_fn
;
...
@@ -30,7 +31,6 @@
...
@@ -30,7 +31,6 @@
use
rustc_front
::
hir
;
use
rustc_front
::
hir
;
use
syntax
::
abi
::
Abi
;
use
syntax
::
attr
;
use
syntax
::
attr
;
use
syntax
::
errors
;
use
syntax
::
errors
;
...
...
src/librustc_trans/trans/type_of.rs
浏览文件 @
da66431d
...
@@ -13,15 +13,14 @@
...
@@ -13,15 +13,14 @@
use
middle
::
def_id
::
DefId
;
use
middle
::
def_id
::
DefId
;
use
middle
::
infer
;
use
middle
::
infer
;
use
middle
::
subst
;
use
middle
::
subst
;
use
trans
::
abi
::{
Abi
,
FnType
};
use
trans
::
adt
;
use
trans
::
adt
;
use
trans
::
cabi
::
FnType
;
use
trans
::
common
::
*
;
use
trans
::
common
::
*
;
use
trans
::
machine
;
use
trans
::
machine
;
use
middle
::
ty
::{
self
,
Ty
,
TypeFoldable
};
use
middle
::
ty
::{
self
,
Ty
,
TypeFoldable
};
use
trans
::
type_
::
Type
;
use
trans
::
type_
::
Type
;
use
syntax
::
abi
::
Abi
;
use
syntax
::
ast
;
use
syntax
::
ast
;
// LLVM doesn't like objects that are too big. Issue #17913
// LLVM doesn't like objects that are too big. Issue #17913
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录