Skip to content

Commit 7ac0b29

Browse files
committed
---
yaml --- r: 65474 b: refs/heads/master c: 5028ac7 h: refs/heads/master v: v3
1 parent 8b7956a commit 7ac0b29

Some content is hidden

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

44 files changed

+275
-143
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 4f92d3a11c11c18230e18c981ab0aaf95baef6e7
2+
refs/heads/master: 5028ac73966ac82d0eeb7bebe450e44d43c62d18
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/src/etc/kate/rust.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
<item> Copy </item>
5050
<item> Send </item>
5151
<item> Owned </item>
52+
<item> Sized </item>
5253
<item> Eq </item>
5354
<item> Ord </item>
5455
<item> Num </item>

trunk/src/etc/vim/syntax/rust.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ syn keyword rustType size_t ptrdiff_t clock_t time_t
4444
syn keyword rustType c_longlong c_ulonglong intptr_t uintptr_t
4545
syn keyword rustType off_t dev_t ino_t pid_t mode_t ssize_t
4646

47-
syn keyword rustTrait Const Copy Send Owned " inherent traits
47+
syn keyword rustTrait Const Copy Send Owned Sized " inherent traits
4848
syn keyword rustTrait Eq Ord Num Ptr
4949
syn keyword rustTrait Drop Add Sub Mul Quot Rem Neg BitAnd BitOr
5050
syn keyword rustTrait BitXor Shl Shr Index

trunk/src/libextra/bitv.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -13,7 +13,6 @@ use core::prelude::*;
1313
use core::cmp;
1414
use core::ops;
1515
use core::uint;
16-
use core::vec::from_elem;
1716
use core::vec;
1817

1918
struct SmallBitv {

trunk/src/libextra/test.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -24,13 +24,11 @@ use term;
2424
use core::comm::{stream, SharedChan};
2525
use core::either;
2626
use core::io;
27-
use core::num;
2827
use core::option;
2928
use core::result;
3029
use core::str;
3130
use core::task;
3231
use core::to_str::ToStr;
33-
use core::u64;
3432
use core::uint;
3533
use core::vec;
3634

trunk/src/libextra/uv_global_loop.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -16,9 +16,7 @@ use iotask = uv_iotask;
1616
use uv_iotask::{IoTask, spawn_iotask};
1717

1818
use core::comm::Chan;
19-
use core::libc;
2019
use core::option::{Some, None};
21-
use core::str;
2220
use core::task::task;
2321
use core::unstable::global::{global_data_clone_create, global_data_clone};
2422
use core::unstable::weak_task::weaken_task;

trunk/src/librustc/back/link.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -106,9 +106,7 @@ pub mod jit {
106106
use metadata::cstore;
107107

108108
use core::cast;
109-
use core::char;
110109
use core::libc::c_int;
111-
use core::os;
112110
use core::ptr;
113111
use core::str;
114112

trunk/src/librustc/back/passes.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -12,7 +12,7 @@ use core::prelude::*;
1212
use core::str;
1313
use core::io;
1414

15-
use driver::session::{OptLevel, No, Less, Default, Aggressive};
15+
use driver::session::{OptLevel, No, Less, Aggressive};
1616
use driver::session::{Session};
1717
use lib::llvm::{PassRef, ModuleRef,PassManagerRef,TargetDataRef};
1818
use lib::llvm::llvm;
@@ -134,7 +134,6 @@ pub fn create_standard_passes(level:OptLevel) -> ~[~str] {
134134
passes.push(~"correlated-propagation");
135135
passes.push(~"dse");
136136

137-
passes.push(~"bb-vectorize");
138137
passes.push(~"instcombine");
139138
passes.push(~"early-cse");
140139

trunk/src/librustc/metadata/tydecode.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,9 @@ fn parse_bounds(st: @mut PState, conv: conv_did) -> ty::ParamBounds {
569569
'O' => {
570570
param_bounds.builtin_bounds.add(ty::BoundStatic);
571571
}
572+
'Z' => {
573+
param_bounds.builtin_bounds.add(ty::BoundSized);
574+
}
572575
'I' => {
573576
param_bounds.trait_bounds.push(@parse_trait_ref(st, conv));
574577
}

trunk/src/librustc/metadata/tyencode.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ fn enc_bounds(w: @io::Writer, cx: @ctxt, bs: &ty::ParamBounds) {
403403
ty::BoundCopy => w.write_char('C'),
404404
ty::BoundConst => w.write_char('K'),
405405
ty::BoundStatic => w.write_char('O'),
406+
ty::BoundSized => w.write_char('Z'),
406407
}
407408
}
408409

trunk/src/librustc/middle/lang_items.rs

Lines changed: 82 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -36,55 +36,56 @@ pub enum LangItem {
3636
ConstTraitLangItem, // 0
3737
CopyTraitLangItem, // 1
3838
OwnedTraitLangItem, // 2
39+
SizedTraitLangItem, // 3
3940

40-
DropTraitLangItem, // 3
41+
DropTraitLangItem, // 4
4142

42-
AddTraitLangItem, // 4
43-
SubTraitLangItem, // 5
44-
MulTraitLangItem, // 6
45-
DivTraitLangItem, // 7
46-
RemTraitLangItem, // 8
47-
NegTraitLangItem, // 9
48-
NotTraitLangItem, // 10
43+
AddTraitLangItem, // 5
44+
SubTraitLangItem, // 6
45+
MulTraitLangItem, // 7
46+
DivTraitLangItem, // 8
47+
RemTraitLangItem, // 9
48+
NegTraitLangItem, // 10
49+
NotTraitLangItem, // 11
4950
BitXorTraitLangItem, // 11
50-
BitAndTraitLangItem, // 12
51-
BitOrTraitLangItem, // 13
52-
ShlTraitLangItem, // 14
53-
ShrTraitLangItem, // 15
54-
IndexTraitLangItem, // 16
55-
56-
EqTraitLangItem, // 17
57-
OrdTraitLangItem, // 18
58-
59-
StrEqFnLangItem, // 19
60-
UniqStrEqFnLangItem, // 20
61-
AnnihilateFnLangItem, // 21
62-
LogTypeFnLangItem, // 22
63-
FailFnLangItem, // 23
64-
FailBoundsCheckFnLangItem, // 24
65-
ExchangeMallocFnLangItem, // 25
66-
ExchangeFreeFnLangItem, // 26
67-
MallocFnLangItem, // 27
68-
FreeFnLangItem, // 28
69-
BorrowAsImmFnLangItem, // 29
70-
BorrowAsMutFnLangItem, // 30
71-
ReturnToMutFnLangItem, // 31
72-
CheckNotBorrowedFnLangItem, // 32
73-
StrDupUniqFnLangItem, // 33
74-
RecordBorrowFnLangItem, // 34
75-
UnrecordBorrowFnLangItem, // 35
76-
77-
StartFnLangItem, // 36
51+
BitAndTraitLangItem, // 13
52+
BitOrTraitLangItem, // 14
53+
ShlTraitLangItem, // 15
54+
ShrTraitLangItem, // 16
55+
IndexTraitLangItem, // 17
56+
57+
EqTraitLangItem, // 18
58+
OrdTraitLangItem, // 19
59+
60+
StrEqFnLangItem, // 20
61+
UniqStrEqFnLangItem, // 21
62+
AnnihilateFnLangItem, // 22
63+
LogTypeFnLangItem, // 23
64+
FailFnLangItem, // 24
65+
FailBoundsCheckFnLangItem, // 25
66+
ExchangeMallocFnLangItem, // 26
67+
ExchangeFreeFnLangItem, // 27
68+
MallocFnLangItem, // 28
69+
FreeFnLangItem, // 29
70+
BorrowAsImmFnLangItem, // 30
71+
BorrowAsMutFnLangItem, // 31
72+
ReturnToMutFnLangItem, // 32
73+
CheckNotBorrowedFnLangItem, // 33
74+
StrDupUniqFnLangItem, // 34
75+
RecordBorrowFnLangItem, // 35
76+
UnrecordBorrowFnLangItem, // 36
77+
78+
StartFnLangItem, // 37
7879
}
7980

8081
pub struct LanguageItems {
81-
items: [Option<def_id>, ..37]
82+
items: [Option<def_id>, ..38]
8283
}
8384

8485
pub impl LanguageItems {
8586
pub fn new() -> LanguageItems {
8687
LanguageItems {
87-
items: [ None, ..37 ]
88+
items: [ None, ..38 ]
8889
}
8990
}
9091

@@ -97,44 +98,45 @@ pub impl LanguageItems {
9798
0 => "const",
9899
1 => "copy",
99100
2 => "owned",
100-
101-
3 => "drop",
102-
103-
4 => "add",
104-
5 => "sub",
105-
6 => "mul",
106-
7 => "div",
107-
8 => "rem",
108-
9 => "neg",
109-
10 => "not",
110-
11 => "bitxor",
111-
12 => "bitand",
112-
13 => "bitor",
113-
14 => "shl",
114-
15 => "shr",
115-
16 => "index",
116-
17 => "eq",
117-
18 => "ord",
118-
119-
19 => "str_eq",
120-
20 => "uniq_str_eq",
121-
21 => "annihilate",
122-
22 => "log_type",
123-
23 => "fail_",
124-
24 => "fail_bounds_check",
125-
25 => "exchange_malloc",
126-
26 => "exchange_free",
127-
27 => "malloc",
128-
28 => "free",
129-
29 => "borrow_as_imm",
130-
30 => "borrow_as_mut",
131-
31 => "return_to_mut",
132-
32 => "check_not_borrowed",
133-
33 => "strdup_uniq",
134-
34 => "record_borrow",
135-
35 => "unrecord_borrow",
136-
137-
36 => "start",
101+
3 => "sized",
102+
103+
4 => "drop",
104+
105+
5 => "add",
106+
6 => "sub",
107+
7 => "mul",
108+
8 => "div",
109+
9 => "rem",
110+
10 => "neg",
111+
11 => "not",
112+
12 => "bitxor",
113+
13 => "bitand",
114+
14 => "bitor",
115+
15 => "shl",
116+
16 => "shr",
117+
17 => "index",
118+
18 => "eq",
119+
19 => "ord",
120+
121+
20 => "str_eq",
122+
21 => "uniq_str_eq",
123+
22 => "annihilate",
124+
23 => "log_type",
125+
24 => "fail_",
126+
25 => "fail_bounds_check",
127+
26 => "exchange_malloc",
128+
27 => "exchange_free",
129+
28 => "malloc",
130+
29 => "free",
131+
30 => "borrow_as_imm",
132+
31 => "borrow_as_mut",
133+
32 => "return_to_mut",
134+
33 => "check_not_borrowed",
135+
34 => "strdup_uniq",
136+
35 => "record_borrow",
137+
36 => "unrecord_borrow",
138+
139+
37 => "start",
138140

139141
_ => "???"
140142
}
@@ -151,6 +153,9 @@ pub impl LanguageItems {
151153
pub fn owned_trait(&const self) -> def_id {
152154
self.items[OwnedTraitLangItem as uint].get()
153155
}
156+
pub fn sized_trait(&const self) -> def_id {
157+
self.items[SizedTraitLangItem as uint].get()
158+
}
154159

155160
pub fn drop_trait(&const self) -> def_id {
156161
self.items[DropTraitLangItem as uint].get()
@@ -267,6 +272,7 @@ fn LanguageItemCollector(crate: @crate,
267272
item_refs.insert(@~"const", ConstTraitLangItem as uint);
268273
item_refs.insert(@~"copy", CopyTraitLangItem as uint);
269274
item_refs.insert(@~"owned", OwnedTraitLangItem as uint);
275+
item_refs.insert(@~"sized", SizedTraitLangItem as uint);
270276

271277
item_refs.insert(@~"drop", DropTraitLangItem as uint);
272278

trunk/src/librustc/middle/trans/adt.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@ fn build_const_struct(ccx: @CrateContext, st: &Struct, vals: &[ValueRef])
563563
vals[i]
564564
};
565565
cfields.push(val);
566+
offset += machine::llsize_of_alloc(ccx, llty) as u64
566567
}
567568

568569
return cfields;

trunk/src/librustc/middle/trans/foreign.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ use middle::ty;
3434
use middle::ty::FnSig;
3535
use util::ppaux::ty_to_str;
3636

37-
use core::str;
3837
use core::uint;
3938
use core::vec;
4039
use syntax::codemap::span;

trunk/src/librustc/middle/trans/glue.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1+
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
22
// file at the top-level directory of this distribution and at
33
// http://rust-lang.org/COPYRIGHT.
44
//
@@ -19,7 +19,6 @@ use back::link::*;
1919
use driver::session;
2020
use lib;
2121
use lib::llvm::{llvm, ValueRef, TypeRef, True};
22-
use lib::llvm::type_to_str;
2322
use middle::trans::adt;
2423
use middle::trans::base::*;
2524
use middle::trans::callee;

0 commit comments

Comments
 (0)