Skip to content

Commit 0e61586

Browse files
committed
---
yaml --- r: 68471 b: refs/heads/auto c: 0252693 h: refs/heads/master i: 68469: df50e0c 68467: f5b1db8 68463: bccae49 v: v3
1 parent f31d859 commit 0e61586

File tree

19 files changed

+382
-235
lines changed

19 files changed

+382
-235
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: e23934645aa7eb526e9f55da6b3d7c262dc1670f
17+
refs/heads/auto: 0252693db21f48a516f9a36cdeb8b2dd7e33bd02
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/Makefile.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,6 @@ endif
141141
CFG_GIT_DIR := $(CFG_SRC_DIR).git
142142
CFG_RELEASE = 0.7-pre
143143
CFG_VERSION = $(CFG_RELEASE)
144-
# windows exe's need numeric versions - don't use anything but
145-
# numbers and dots here
146-
CFG_VERSION_WIN = 0.7
147144

148145
ifneq ($(wildcard $(CFG_GIT)),)
149146
ifneq ($(wildcard $(CFG_GIT_DIR)),)
@@ -314,7 +311,6 @@ $(foreach host,$(CFG_HOST_TRIPLES), \
314311
export CFG_SRC_DIR
315312
export CFG_BUILD_DIR
316313
export CFG_VERSION
317-
export CFG_VERSION_WIN
318314
export CFG_BUILD_TRIPLE
319315
export CFG_LLVM_ROOT
320316
export CFG_ENABLE_MINGW_CROSS

branches/auto/mk/dist.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
5757
cp $< $@
5858

5959
$(PKG_EXE): rust.iss modpath.iss LICENSE.txt rust-logo.ico \
60-
$(PKG_FILES) $(CSREQ3_T_$(CFG_BUILD_TRIPLE)_H_$(CFG_BUILD_TRIPLE))
60+
$(PKG_FILES) all rustc-stage3
6161
@$(call E, ISCC: $@)
6262
$(Q)"$(CFG_ISCC)" $<
6363
endif

branches/auto/mk/tools.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,7 @@ $(foreach host,$(CFG_HOST_TRIPLES), \
191191
$(foreach target,$(CFG_TARGET_TRIPLES), \
192192
$(eval $(call TOOLS_STAGE_N_TARGET,0,1,$(host),$(target))) \
193193
$(eval $(call TOOLS_STAGE_N_TARGET,1,2,$(host),$(target))) \
194-
$(eval $(call TOOLS_STAGE_N_TARGET,2,3,$(host),$(target))) \
195-
$(eval $(call TOOLS_STAGE_N_TARGET,3,bogus,$(host),$(target)))))
194+
$(eval $(call TOOLS_STAGE_N_TARGET,2,3,$(host),$(target)))))
196195

197196
$(foreach host,$(CFG_HOST_TRIPLES), \
198197
$(eval $(call TOOLS_STAGE_N_HOST,0,1,$(host),$(host))) \

branches/auto/src/etc/pkg/rust.iss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#define CFG_VERSION GetEnv("CFG_VERSION")
2-
#define CFG_VERSION_WIN GetEnv("CFG_VERSION_WIN")
32

43
[Setup]
54

@@ -9,7 +8,7 @@ AppVersion={#CFG_VERSION}
98
AppCopyright=Copyright (C) 2006-2013 Mozilla Foundation, MIT license
109
AppPublisher=Mozilla Foundation
1110
AppPublisherURL=http://www.rust-lang.org
12-
VersionInfoVersion={#CFG_VERSION_WIN}
11+
VersionInfoVersion={#CFG_VERSION}
1312
LicenseFile=LICENSE.txt
1413

1514
DisableWelcomePage=true

branches/auto/src/librustc/back/passes.rs

Lines changed: 68 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -60,109 +60,90 @@ impl PassManager {
6060
}
6161
}
6262

63-
pub fn create_standard_passes(level: OptLevel) -> ~[~str] {
64-
let mut passes = ~[];
65-
66-
// mostly identical to clang 3.3, all differences are documented with comments
67-
68-
if level != No {
69-
passes.push(~"targetlibinfo");
70-
passes.push(~"no-aa");
71-
// "tbaa" omitted, we don't emit clang-style type-based alias analysis information
72-
passes.push(~"basicaa");
73-
passes.push(~"globalopt");
74-
passes.push(~"ipsccp");
75-
passes.push(~"deadargelim");
76-
passes.push(~"instcombine");
77-
passes.push(~"simplifycfg");
63+
pub fn create_standard_passes(level:OptLevel) -> ~[~str] {
64+
let mut passes = ~[~"strip-dead-prototypes"];
65+
66+
if level == No {
67+
passes.push(~"always-inline");
68+
return passes;
7869
}
7970

80-
passes.push(~"basiccg");
71+
passes.push(~"targetlibinfo");
72+
73+
passes.push(~"scev-aa");
74+
passes.push(~"basicaa");
75+
76+
passes.push(~"instcombine");
77+
passes.push(~"simplifycfg");
78+
passes.push(~"scalarrepl-ssa");
79+
passes.push(~"early-cse");
80+
81+
passes.push(~"globalopt");
82+
passes.push(~"ipsccp");
83+
passes.push(~"deadargelim");
84+
passes.push(~"instcombine");
85+
passes.push(~"simplifycfg");
8186

82-
if level != No {
83-
passes.push(~"prune-eh");
87+
passes.push(~"prune-eh");
88+
89+
passes.push(~"inline");
90+
91+
passes.push(~"functionattrs");
92+
93+
if level == Aggressive {
94+
passes.push(~"argpromotion");
8495
}
8596

86-
passes.push(~"inline-cost");
97+
passes.push(~"scalarrepl-ssa");
98+
passes.push(~"early-cse");
99+
passes.push(~"simplify-libcalls");
100+
passes.push(~"jump-threading");
101+
passes.push(~"correlated-propagation");
102+
passes.push(~"simplifycfg");
103+
passes.push(~"instcombine");
87104

88-
if level == No || level == Less {
89-
passes.push(~"always-inline");
90-
} else {
91-
passes.push(~"inline");
105+
passes.push(~"tailcallelim");
106+
passes.push(~"simplifycfg");
107+
passes.push(~"reassociate");
108+
passes.push(~"loop-rotate");
109+
passes.push(~"licm");
110+
111+
passes.push(~"lcssa");
112+
passes.push(~"loop-unswitch");
113+
114+
passes.push(~"instcombine");
115+
passes.push(~"indvars");
116+
passes.push(~"loop-idiom");
117+
passes.push(~"loop-deletion");
118+
119+
if level == Aggressive {
120+
passes.push(~"loop-vectorize");
92121
}
93122

94-
if level != No {
95-
passes.push(~"functionattrs");
96-
if level == Aggressive {
97-
passes.push(~"argpromotion");
98-
}
99-
passes.push(~"sroa");
100-
passes.push(~"domtree");
101-
passes.push(~"early-cse");
102-
passes.push(~"simplify-libcalls");
103-
passes.push(~"lazy-value-info");
104-
passes.push(~"jump-threading");
105-
passes.push(~"correlated-propagation");
106-
passes.push(~"simplifycfg");
107-
passes.push(~"instcombine");
108-
passes.push(~"tailcallelim");
109-
passes.push(~"simplifycfg");
110-
passes.push(~"reassociate");
111-
passes.push(~"domtree");
112-
passes.push(~"loops");
113-
passes.push(~"loop-simplify");
114-
passes.push(~"lcssa");
115-
passes.push(~"loop-rotate");
116-
passes.push(~"licm");
117-
passes.push(~"lcssa");
118-
passes.push(~"loop-unswitch");
119-
passes.push(~"instcombine");
120-
passes.push(~"scalar-evolution");
121-
passes.push(~"loop-simplify");
122-
passes.push(~"lcssa");
123-
passes.push(~"indvars");
124-
passes.push(~"loop-idiom");
125-
passes.push(~"loop-deletion");
126-
if level == Aggressive {
127-
passes.push(~"loop-simplify");
128-
passes.push(~"lcssa");
129-
passes.push(~"loop-vectorize");
130-
passes.push(~"loop-simplify");
131-
passes.push(~"lcssa");
132-
passes.push(~"scalar-evolution");
133-
passes.push(~"loop-simplify");
134-
passes.push(~"lcssa");
135-
}
136-
if level != Less {
137-
passes.push(~"loop-unroll");
138-
passes.push(~"memdep");
139-
passes.push(~"gvn");
140-
}
141-
passes.push(~"memdep");
142-
passes.push(~"memcpyopt");
143-
passes.push(~"sccp");
144-
passes.push(~"instcombine");
145-
passes.push(~"lazy-value-info");
146-
passes.push(~"jump-threading");
147-
passes.push(~"correlated-propagation");
148-
passes.push(~"domtree");
149-
passes.push(~"memdep");
150-
passes.push(~"dse");
151-
passes.push(~"adce");
152-
passes.push(~"simplifycfg");
153-
passes.push(~"instcombine");
154-
// clang does `strip-dead-prototypes` here, since it does not emit them
123+
passes.push(~"loop-unroll");
124+
125+
if level != Less {
126+
passes.push(~"gvn");
155127
}
156128

157-
// rustc emits dead prototypes, so always ask LLVM to strip them
158-
passes.push(~"strip-dead-prototypes");
129+
passes.push(~"memcpyopt");
130+
passes.push(~"sccp");
131+
132+
passes.push(~"instcombine");
133+
passes.push(~"jump-threading");
134+
passes.push(~"correlated-propagation");
135+
passes.push(~"dse");
136+
137+
passes.push(~"adce");
138+
passes.push(~"simplifycfg");
139+
passes.push(~"instsimplify");
159140

160141
if level != Less {
161142
passes.push(~"globaldce");
162143
passes.push(~"constmerge");
163144
}
164145

165-
passes
146+
return passes;
166147
}
167148

168149
pub fn populate_pass_manager(sess: Session, pm: &mut PassManager, pass_list:&[~str]) {

branches/auto/src/librustc/lib/llvm.rs

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2149,18 +2149,24 @@ impl TypeNames {
21492149
self.named_types.find_equiv(&s).map_consume(|x| Type::from_ref(*x))
21502150
}
21512151

2152-
pub fn type_to_str(&self, ty: Type) -> ~str {
2152+
// We have a depth count, because we seem to make infinite types.
2153+
pub fn type_to_str_depth(&self, ty: Type, depth: int) -> ~str {
21532154
match self.find_name(&ty) {
21542155
option::Some(name) => return name.to_owned(),
21552156
None => ()
21562157
}
21572158

2159+
if depth == 0 {
2160+
return ~"###";
2161+
}
2162+
21582163
unsafe {
21592164
let kind = ty.kind();
21602165

21612166
match kind {
21622167
Void => ~"Void",
21632168
Half => ~"Half",
2169+
Float => ~"Float",
21642170
Double => ~"Double",
21652171
X86_FP80 => ~"X86_FP80",
21662172
FP128 => ~"FP128",
@@ -2175,31 +2181,36 @@ impl TypeNames {
21752181
Function => {
21762182
let out_ty = ty.return_type();
21772183
let args = ty.func_params();
2178-
let args = args.map(|&ty| self.type_to_str(ty)).connect(", ");
2179-
let out_ty = self.type_to_str(out_ty);
2184+
let args =
2185+
args.map(|&ty| self.type_to_str_depth(ty, depth-1)).connect(", ");
2186+
let out_ty = self.type_to_str_depth(out_ty, depth-1);
21802187
fmt!("fn(%s) -> %s", args, out_ty)
21812188
}
21822189
Struct => {
21832190
let tys = ty.field_types();
2184-
let tys = tys.map(|&ty| self.type_to_str(ty)).connect(", ");
2191+
let tys = tys.map(|&ty| self.type_to_str_depth(ty, depth-1)).connect(", ");
21852192
fmt!("{%s}", tys)
21862193
}
21872194
Array => {
21882195
let el_ty = ty.element_type();
2189-
let el_ty = self.type_to_str(el_ty);
2196+
let el_ty = self.type_to_str_depth(el_ty, depth-1);
21902197
let len = ty.array_length();
21912198
fmt!("[%s x %u]", el_ty, len)
21922199
}
21932200
Pointer => {
21942201
let el_ty = ty.element_type();
2195-
let el_ty = self.type_to_str(el_ty);
2202+
let el_ty = self.type_to_str_depth(el_ty, depth-1);
21962203
fmt!("*%s", el_ty)
21972204
}
21982205
_ => fail!("Unknown Type Kind (%u)", kind as uint)
21992206
}
22002207
}
22012208
}
22022209

2210+
pub fn type_to_str(&self, ty: Type) -> ~str {
2211+
self.type_to_str_depth(ty, 30)
2212+
}
2213+
22032214
pub fn val_to_str(&self, val: ValueRef) -> ~str {
22042215
unsafe {
22052216
let ty = Type::from_ref(llvm::LLVMTypeOf(val));

branches/auto/src/librustc/middle/astencode.rs

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -599,8 +599,10 @@ fn encode_vtable_res(ecx: &e::EncodeContext,
599599
// ty::t doesn't work, and there is no way (atm) to have
600600
// hand-written encoding routines combine with auto-generated
601601
// ones. perhaps we should fix this.
602-
do ebml_w.emit_from_vec(*dr) |ebml_w, vtable_origin| {
603-
encode_vtable_origin(ecx, ebml_w, vtable_origin)
602+
do ebml_w.emit_from_vec(*dr) |ebml_w, param_tables| {
603+
do ebml_w.emit_from_vec(**param_tables) |ebml_w, vtable_origin| {
604+
encode_vtable_origin(ecx, ebml_w, vtable_origin)
605+
}
604606
}
605607
}
606608

@@ -632,6 +634,13 @@ fn encode_vtable_origin(ecx: &e::EncodeContext,
632634
}
633635
}
634636
}
637+
typeck::vtable_self(def_id) => {
638+
do ebml_w.emit_enum_variant("vtable_self", 2u, 1u) |ebml_w| {
639+
do ebml_w.emit_enum_variant_arg(0u) |ebml_w| {
640+
ebml_w.emit_def_id(def_id)
641+
}
642+
}
643+
}
635644
}
636645
}
637646
}
@@ -646,13 +655,17 @@ trait vtable_decoder_helpers {
646655
impl vtable_decoder_helpers for reader::Decoder {
647656
fn read_vtable_res(&mut self, xcx: @ExtendedDecodeContext)
648657
-> typeck::vtable_res {
649-
@self.read_to_vec(|this| this.read_vtable_origin(xcx))
658+
@self.read_to_vec(|this|
659+
@this.read_to_vec(|this|
660+
this.read_vtable_origin(xcx)))
650661
}
651662

652663
fn read_vtable_origin(&mut self, xcx: @ExtendedDecodeContext)
653664
-> typeck::vtable_origin {
654665
do self.read_enum("vtable_origin") |this| {
655-
do this.read_enum_variant(["vtable_static", "vtable_param"])
666+
do this.read_enum_variant(["vtable_static",
667+
"vtable_param",
668+
"vtable_self"])
656669
|this, i| {
657670
match i {
658671
0 => {
@@ -678,6 +691,13 @@ impl vtable_decoder_helpers for reader::Decoder {
678691
}
679692
)
680693
}
694+
2 => {
695+
typeck::vtable_self(
696+
do this.read_enum_variant_arg(0u) |this| {
697+
this.read_def_id(xcx)
698+
}
699+
)
700+
}
681701
// hard to avoid - user input
682702
_ => fail!("bad enum variant")
683703
}

branches/auto/src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,7 @@ pub fn get_res_dtor(ccx: @mut CrateContext,
461461
&tsubsts,
462462
None,
463463
None,
464+
None,
464465
None);
465466

466467
val

0 commit comments

Comments
 (0)