Skip to content

Commit 59314e7

Browse files
committed
---
yaml --- r: 63881 b: refs/heads/snap-stage3 c: c86df3a h: refs/heads/master i: 63879: d5ad126 v: v3
1 parent fa64bde commit 59314e7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+423
-250
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 765a2901d58625f5995c9cf4a32c85b6573e12b0
4+
refs/heads/snap-stage3: c86df3a65cc239fd69b9a8d628808498cdb07e0d
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/Makefile.in

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,10 +540,19 @@ ALL_TARGET_RULES = $(foreach target,$(CFG_TARGET_TRIPLES), \
540540
$(foreach host,$(CFG_HOST_TRIPLES), \
541541
all-target-$(target)-host-$(host)))
542542

543-
all: $(ALL_TARGET_RULES) $(GENERATED) docs
543+
all: rustllvm/llvm-auto-clean-stamp \
544+
$(ALL_TARGET_RULES) $(GENERATED) docs
544545

545546
endif
546547

548+
# This is used to independently force an LLVM clean rebuild
549+
# when we changed something not otherwise captured by builtin
550+
# dependencies. In these cases, commit a change that touches
551+
# the stamp in the source dir.
552+
rustllvm/llvm-auto-clean-stamp: $(S)src/rustllvm/llvm-auto-clean-trigger
553+
$(Q)$(MAKE) clean-llvm
554+
touch $@
555+
547556

548557
######################################################################
549558
# Re-configuration

branches/snap-stage3/mk/clean.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ CLEAN_LLVM_RULES = \
2323
$(foreach target, $(CFG_TARGET_TRIPLES), \
2424
clean-llvm$(target))
2525

26-
.PHONY: clean clean-all clean-misc
26+
.PHONY: clean clean-all clean-misc clean-llvm
2727

2828
clean-all: clean clean-llvm
2929

branches/snap-stage3/src/libextra/arc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,8 @@ impl<T:Freeze + Send> RWARC<T> {
436436
// lock it. This wraps the unsafety, with the justification that the 'lock'
437437
// field is never overwritten; only 'failed' and 'data'.
438438
#[doc(hidden)]
439-
fn borrow_rwlock<T:Freeze + Send>(state: *const RWARCInner<T>) -> *RWlock {
440-
unsafe { cast::transmute(&const (*state).lock) }
439+
fn borrow_rwlock<T:Freeze + Send>(state: *mut RWARCInner<T>) -> *RWlock {
440+
unsafe { cast::transmute(&(*state).lock) }
441441
}
442442

443443
/// The "write permission" token used for RWARC.write_downgrade().

branches/snap-stage3/src/libextra/bitv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,8 +705,8 @@ impl cmp::Eq for BitvSet {
705705
}
706706

707707
impl Container for BitvSet {
708-
fn len(&const self) -> uint { self.size }
709-
fn is_empty(&const self) -> bool { self.size == 0 }
708+
fn len(&self) -> uint { self.size }
709+
fn is_empty(&self) -> bool { self.size == 0 }
710710
}
711711

712712
impl Mutable for BitvSet {

branches/snap-stage3/src/libextra/deque.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ pub struct Deque<T> {
2828

2929
impl<T> Container for Deque<T> {
3030
/// Return the number of elements in the deque
31-
fn len(&const self) -> uint { self.nelts }
31+
fn len(&self) -> uint { self.nelts }
3232

3333
/// Return true if the deque contains no elements
34-
fn is_empty(&const self) -> bool { self.len() == 0 }
34+
fn is_empty(&self) -> bool { self.len() == 0 }
3535
}
3636

3737
impl<T> Mutable for Deque<T> {

branches/snap-stage3/src/libextra/flate.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ static lz_fast : c_int = 0x1; // LZ with only one probe
4444
static lz_norm : c_int = 0x80; // LZ with 128 probes, "normal"
4545
static lz_best : c_int = 0xfff; // LZ with 4095 probes, "best"
4646

47-
pub fn deflate_bytes(bytes: &const [u8]) -> ~[u8] {
48-
do vec::as_const_buf(bytes) |b, len| {
47+
pub fn deflate_bytes(bytes: &[u8]) -> ~[u8] {
48+
do vec::as_imm_buf(bytes) |b, len| {
4949
unsafe {
5050
let mut outsz : size_t = 0;
5151
let res =
@@ -62,8 +62,8 @@ pub fn deflate_bytes(bytes: &const [u8]) -> ~[u8] {
6262
}
6363
}
6464

65-
pub fn inflate_bytes(bytes: &const [u8]) -> ~[u8] {
66-
do vec::as_const_buf(bytes) |b, len| {
65+
pub fn inflate_bytes(bytes: &[u8]) -> ~[u8] {
66+
do vec::as_imm_buf(bytes) |b, len| {
6767
unsafe {
6868
let mut outsz : size_t = 0;
6969
let res =

branches/snap-stage3/src/libextra/treemap.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ impl<K: Ord + TotalOrd, V> Ord for TreeMap<K, V> {
8787

8888
impl<K: TotalOrd, V> Container for TreeMap<K, V> {
8989
/// Return the number of elements in the map
90-
fn len(&const self) -> uint { self.length }
90+
fn len(&self) -> uint { self.length }
9191

9292
/// Return true if the map contains no elements
93-
fn is_empty(&const self) -> bool { self.root.is_none() }
93+
fn is_empty(&self) -> bool { self.root.is_none() }
9494
}
9595

9696
impl<K: TotalOrd, V> Mutable for TreeMap<K, V> {
@@ -265,11 +265,11 @@ impl<T: Ord + TotalOrd> Ord for TreeSet<T> {
265265
impl<T: TotalOrd> Container for TreeSet<T> {
266266
/// Return the number of elements in the set
267267
#[inline]
268-
fn len(&const self) -> uint { self.map.len() }
268+
fn len(&self) -> uint { self.map.len() }
269269

270270
/// Return true if the set contains no elements
271271
#[inline]
272-
fn is_empty(&const self) -> bool { self.map.is_empty() }
272+
fn is_empty(&self) -> bool { self.map.is_empty() }
273273
}
274274

275275
impl<T: TotalOrd> Mutable for TreeSet<T> {

branches/snap-stage3/src/librustc/metadata/decoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ fn get_explicit_self(item: ebml::Doc) -> ast::explicit_self_ {
786786
's' => { return ast::sty_static; }
787787
'v' => { return ast::sty_value; }
788788
'@' => { return ast::sty_box(get_mutability(string[1])); }
789-
'~' => { return ast::sty_uniq(get_mutability(string[1])); }
789+
'~' => { return ast::sty_uniq; }
790790
'&' => {
791791
// FIXME(#4846) expl. region
792792
return ast::sty_region(None, get_mutability(string[1]));

branches/snap-stage3/src/librustc/metadata/encoder.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,9 +630,8 @@ fn encode_explicit_self(ebml_w: &mut writer::Encoder, explicit_self: ast::explic
630630
ebml_w.writer.write(&[ '@' as u8 ]);
631631
encode_mutability(ebml_w, m);
632632
}
633-
sty_uniq(m) => {
633+
sty_uniq => {
634634
ebml_w.writer.write(&[ '~' as u8 ]);
635-
encode_mutability(ebml_w, m);
636635
}
637636
}
638637

branches/snap-stage3/src/librustc/middle/check_const.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub fn check_expr(sess: Session,
9292
if is_const {
9393
match e.node {
9494
expr_unary(_, deref, _) => { }
95-
expr_unary(_, box(_), _) | expr_unary(_, uniq(_), _) => {
95+
expr_unary(_, box(_), _) | expr_unary(_, uniq, _) => {
9696
sess.span_err(e.span,
9797
"disallowed operator in constant expression");
9898
return;

branches/snap-stage3/src/librustc/middle/lang_items.rs

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -152,122 +152,122 @@ impl LanguageItems {
152152

153153
// FIXME #4621: Method macros sure would be nice here.
154154

155-
pub fn freeze_trait(&const self) -> def_id {
155+
pub fn freeze_trait(&self) -> def_id {
156156
self.items[FreezeTraitLangItem as uint].get()
157157
}
158-
pub fn copy_trait(&const self) -> def_id {
158+
pub fn copy_trait(&self) -> def_id {
159159
self.items[CopyTraitLangItem as uint].get()
160160
}
161-
pub fn send_trait(&const self) -> def_id {
161+
pub fn send_trait(&self) -> def_id {
162162
self.items[SendTraitLangItem as uint].get()
163163
}
164-
pub fn sized_trait(&const self) -> def_id {
164+
pub fn sized_trait(&self) -> def_id {
165165
self.items[SizedTraitLangItem as uint].get()
166166
}
167167

168-
pub fn drop_trait(&const self) -> def_id {
168+
pub fn drop_trait(&self) -> def_id {
169169
self.items[DropTraitLangItem as uint].get()
170170
}
171171

172-
pub fn add_trait(&const self) -> def_id {
172+
pub fn add_trait(&self) -> def_id {
173173
self.items[AddTraitLangItem as uint].get()
174174
}
175-
pub fn sub_trait(&const self) -> def_id {
175+
pub fn sub_trait(&self) -> def_id {
176176
self.items[SubTraitLangItem as uint].get()
177177
}
178-
pub fn mul_trait(&const self) -> def_id {
178+
pub fn mul_trait(&self) -> def_id {
179179
self.items[MulTraitLangItem as uint].get()
180180
}
181-
pub fn div_trait(&const self) -> def_id {
181+
pub fn div_trait(&self) -> def_id {
182182
self.items[DivTraitLangItem as uint].get()
183183
}
184-
pub fn rem_trait(&const self) -> def_id {
184+
pub fn rem_trait(&self) -> def_id {
185185
self.items[RemTraitLangItem as uint].get()
186186
}
187-
pub fn neg_trait(&const self) -> def_id {
187+
pub fn neg_trait(&self) -> def_id {
188188
self.items[NegTraitLangItem as uint].get()
189189
}
190-
pub fn not_trait(&const self) -> def_id {
190+
pub fn not_trait(&self) -> def_id {
191191
self.items[NotTraitLangItem as uint].get()
192192
}
193-
pub fn bitxor_trait(&const self) -> def_id {
193+
pub fn bitxor_trait(&self) -> def_id {
194194
self.items[BitXorTraitLangItem as uint].get()
195195
}
196-
pub fn bitand_trait(&const self) -> def_id {
196+
pub fn bitand_trait(&self) -> def_id {
197197
self.items[BitAndTraitLangItem as uint].get()
198198
}
199-
pub fn bitor_trait(&const self) -> def_id {
199+
pub fn bitor_trait(&self) -> def_id {
200200
self.items[BitOrTraitLangItem as uint].get()
201201
}
202-
pub fn shl_trait(&const self) -> def_id {
202+
pub fn shl_trait(&self) -> def_id {
203203
self.items[ShlTraitLangItem as uint].get()
204204
}
205-
pub fn shr_trait(&const self) -> def_id {
205+
pub fn shr_trait(&self) -> def_id {
206206
self.items[ShrTraitLangItem as uint].get()
207207
}
208-
pub fn index_trait(&const self) -> def_id {
208+
pub fn index_trait(&self) -> def_id {
209209
self.items[IndexTraitLangItem as uint].get()
210210
}
211211

212-
pub fn eq_trait(&const self) -> def_id {
212+
pub fn eq_trait(&self) -> def_id {
213213
self.items[EqTraitLangItem as uint].get()
214214
}
215-
pub fn ord_trait(&const self) -> def_id {
215+
pub fn ord_trait(&self) -> def_id {
216216
self.items[OrdTraitLangItem as uint].get()
217217
}
218218

219-
pub fn str_eq_fn(&const self) -> def_id {
219+
pub fn str_eq_fn(&self) -> def_id {
220220
self.items[StrEqFnLangItem as uint].get()
221221
}
222-
pub fn uniq_str_eq_fn(&const self) -> def_id {
222+
pub fn uniq_str_eq_fn(&self) -> def_id {
223223
self.items[UniqStrEqFnLangItem as uint].get()
224224
}
225-
pub fn annihilate_fn(&const self) -> def_id {
225+
pub fn annihilate_fn(&self) -> def_id {
226226
self.items[AnnihilateFnLangItem as uint].get()
227227
}
228-
pub fn log_type_fn(&const self) -> def_id {
228+
pub fn log_type_fn(&self) -> def_id {
229229
self.items[LogTypeFnLangItem as uint].get()
230230
}
231-
pub fn fail_fn(&const self) -> def_id {
231+
pub fn fail_fn(&self) -> def_id {
232232
self.items[FailFnLangItem as uint].get()
233233
}
234-
pub fn fail_bounds_check_fn(&const self) -> def_id {
234+
pub fn fail_bounds_check_fn(&self) -> def_id {
235235
self.items[FailBoundsCheckFnLangItem as uint].get()
236236
}
237-
pub fn exchange_malloc_fn(&const self) -> def_id {
237+
pub fn exchange_malloc_fn(&self) -> def_id {
238238
self.items[ExchangeMallocFnLangItem as uint].get()
239239
}
240-
pub fn exchange_free_fn(&const self) -> def_id {
240+
pub fn exchange_free_fn(&self) -> def_id {
241241
self.items[ExchangeFreeFnLangItem as uint].get()
242242
}
243-
pub fn malloc_fn(&const self) -> def_id {
243+
pub fn malloc_fn(&self) -> def_id {
244244
self.items[MallocFnLangItem as uint].get()
245245
}
246-
pub fn free_fn(&const self) -> def_id {
246+
pub fn free_fn(&self) -> def_id {
247247
self.items[FreeFnLangItem as uint].get()
248248
}
249-
pub fn borrow_as_imm_fn(&const self) -> def_id {
249+
pub fn borrow_as_imm_fn(&self) -> def_id {
250250
self.items[BorrowAsImmFnLangItem as uint].get()
251251
}
252-
pub fn borrow_as_mut_fn(&const self) -> def_id {
252+
pub fn borrow_as_mut_fn(&self) -> def_id {
253253
self.items[BorrowAsMutFnLangItem as uint].get()
254254
}
255-
pub fn return_to_mut_fn(&const self) -> def_id {
255+
pub fn return_to_mut_fn(&self) -> def_id {
256256
self.items[ReturnToMutFnLangItem as uint].get()
257257
}
258-
pub fn check_not_borrowed_fn(&const self) -> def_id {
258+
pub fn check_not_borrowed_fn(&self) -> def_id {
259259
self.items[CheckNotBorrowedFnLangItem as uint].get()
260260
}
261-
pub fn strdup_uniq_fn(&const self) -> def_id {
261+
pub fn strdup_uniq_fn(&self) -> def_id {
262262
self.items[StrDupUniqFnLangItem as uint].get()
263263
}
264-
pub fn record_borrow_fn(&const self) -> def_id {
264+
pub fn record_borrow_fn(&self) -> def_id {
265265
self.items[RecordBorrowFnLangItem as uint].get()
266266
}
267-
pub fn unrecord_borrow_fn(&const self) -> def_id {
267+
pub fn unrecord_borrow_fn(&self) -> def_id {
268268
self.items[UnrecordBorrowFnLangItem as uint].get()
269269
}
270-
pub fn start_fn(&const self) -> def_id {
270+
pub fn start_fn(&self) -> def_id {
271271
self.items[StartFnLangItem as uint].get()
272272
}
273273
pub fn ty_desc(&const self) -> def_id {

branches/snap-stage3/src/librustc/middle/liveness.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ fn visit_fn(fk: &visit::fn_kind,
368368
match *fk {
369369
fk_method(_, _, method) => {
370370
match method.explicit_self.node {
371-
sty_value | sty_region(*) | sty_box(_) | sty_uniq(_) => {
371+
sty_value | sty_region(*) | sty_box(_) | sty_uniq => {
372372
fn_maps.add_variable(Arg(method.self_id,
373373
special_idents::self_));
374374
}

branches/snap-stage3/src/librustc/middle/trans/asm.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ pub fn trans_inline_asm(bcx: block, ia: &ast::inline_asm) -> block {
4141
callee::trans_arg_expr(bcx,
4242
expr_ty(bcx, out),
4343
ty::ByCopy,
44+
ast::sty_static,
4445
out,
4546
&mut cleanups,
4647
None,
@@ -56,6 +57,7 @@ pub fn trans_inline_asm(bcx: block, ia: &ast::inline_asm) -> block {
5657
callee::trans_arg_expr(bcx,
5758
expr_ty(bcx, e),
5859
ty::ByCopy,
60+
ast::sty_static,
5961
e,
6062
&mut cleanups,
6163
None,
@@ -77,6 +79,7 @@ pub fn trans_inline_asm(bcx: block, ia: &ast::inline_asm) -> block {
7779
callee::trans_arg_expr(bcx,
7880
expr_ty(bcx, in),
7981
ty::ByCopy,
82+
ast::sty_static,
8083
in,
8184
&mut cleanups,
8285
None,

branches/snap-stage3/src/librustc/middle/trans/base.rs

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,11 +1626,18 @@ pub fn create_llargs_for_fn_args(cx: fn_ctxt,
16261626
let _icx = push_ctxt("create_llargs_for_fn_args");
16271627

16281628
match self_arg {
1629-
impl_self(tt, self_mode) => {
1629+
impl_self(tt) => {
16301630
cx.llself = Some(ValSelfData {
16311631
v: cx.llenv,
16321632
t: tt,
1633-
is_copy: self_mode == ty::ByCopy
1633+
is_owned: false
1634+
});
1635+
}
1636+
impl_owned_self(tt) => {
1637+
cx.llself = Some(ValSelfData {
1638+
v: cx.llenv,
1639+
t: tt,
1640+
is_owned: true
16341641
});
16351642
}
16361643
no_self => ()
@@ -1669,18 +1676,12 @@ pub fn copy_args_to_allocas(fcx: fn_ctxt,
16691676

16701677
match fcx.llself {
16711678
Some(slf) => {
1672-
let self_val = if slf.is_copy
1673-
&& datum::appropriate_mode(slf.t).is_by_value() {
1674-
let tmp = BitCast(bcx, slf.v, type_of(bcx.ccx(), slf.t));
1675-
let alloc = alloc_ty(bcx, slf.t);
1676-
Store(bcx, tmp, alloc);
1677-
alloc
1678-
} else {
1679-
PointerCast(bcx, slf.v, type_of(bcx.ccx(), slf.t).ptr_to())
1680-
};
1681-
1679+
let self_val = PointerCast(bcx, slf.v, type_of(bcx.ccx(), slf.t).ptr_to());
16821680
fcx.llself = Some(ValSelfData {v: self_val, ..slf});
1683-
add_clean(bcx, self_val, slf.t);
1681+
1682+
if slf.is_owned {
1683+
add_clean(bcx, slf.v, slf.t);
1684+
}
16841685
}
16851686
_ => {}
16861687
}
@@ -1757,7 +1758,7 @@ pub fn tie_up_header_blocks(fcx: fn_ctxt, lltop: BasicBlockRef) {
17571758
}
17581759
}
17591760

1760-
pub enum self_arg { impl_self(ty::t, ty::SelfMode), no_self, }
1761+
pub enum self_arg { impl_self(ty::t), impl_owned_self(ty::t), no_self, }
17611762

17621763
// trans_closure: Builds an LLVM function out of a source function.
17631764
// If the function closes over its environment a closure will be

0 commit comments

Comments
 (0)