Skip to content

Commit dd58783

Browse files
committed
---
yaml --- r: 138955 b: refs/heads/try2 c: 1e1efbf h: refs/heads/master i: 138953: dc74c8b 138951: e99ad57 v: v3
1 parent 15c62c1 commit dd58783

Some content is hidden

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

42 files changed

+220
-880
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: a9643d39f8243dceb1184f446d988081a607d824
8+
refs/heads/try2: 1e1efbf2c355c4ddb1356abe535d79525bad72ba
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/RELEASES.txt

Lines changed: 2 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,8 @@
1-
Version 0.6 (March 2013)
1+
Version 0.6 (?)
22
---------------------------
33

4-
* ~??? changes, numerous bugfixes
5-
6-
* TODO:
7-
* Ord/Cmp
8-
* Lifetime changes
9-
* Implicit self
10-
* Remove `static` keyword
11-
* Static method syntax
12-
* `as Trait`
13-
* `copy` removed?
14-
15-
* Syntax changes
16-
* The self type parameter in traits is now spelled `Self`
17-
* Replaced the `Durable` trait with the `'static` lifetime
18-
* The old closure type syntax with the trailing sigil has been
19-
removed in favor of the more consistent leading sigil
20-
* `super` is a keyword, and may be prefixed to paths
21-
* Trait bounds are separated with `+` instead of whitespace
22-
* Traits are implemented with `impl Trait for Type`
23-
instead of `impl Type: Trait`
24-
* The `export` keyword has finally been removed
25-
* The `move` keyword has been removed (linear types move by default)
26-
* The interior mutability qualifier on vectors, `[mut T]`, has been
27-
removed. Use `&mut [T]`, etc.
28-
* `mut` is no longer valid in `~mut T`. Use inherited mutability
29-
* `fail` is no longer a keyword. Use `fail!()`
30-
* `assert` is no longer a keyword. Use `assert!()`
31-
* `log` is no longer a keyword. use `debug!`, etc.
32-
* 1-tuples may be represented as `(T,)`
33-
* Struct fields may no longer be `mut`. Use inherited mutability,
34-
`@mut T`, `core::mut` or `core::cell`
35-
* `extern mod { ... }` is no longer valid syntax for foreign
36-
function modules. Use extern blocks: `extern { ... }`
37-
* Newtype enums removed. Used tuple-structs.
38-
* Trait implementations no longer support visibility modifiers
39-
40-
* Semantic changes
41-
* Linear types move by default, eliminating the `move` keyword
42-
* All foreign functions are considered unsafe
43-
* &mut is now unaliasable
44-
* Writes to borrowed @mut pointers are prevented dynamically
45-
* () has size 0
46-
* The name of the main function can be customized using #[main]
47-
* The default type of an inferred closure is &fn instead of @fn
48-
* Name resolution continues to be tweaked
49-
* Method visibility is inherited from the implementation declaration
50-
51-
* Other language changes
52-
* Structural records have been removed
53-
* Many more types can be used in constants, including enums
54-
`static lifetime pointers and vectors
55-
* Pattern matching over vectors improved and expanded
56-
* Typechecking of closure types has been overhauled to
57-
improve inference and eliminate unsoundness
58-
594
* Libraries
60-
* Lots of effort to organize the container API's around `core::container`
61-
* `core::send_map` renamed to `core::hashmap`
62-
* Added big integers to `std::bigint`
63-
* Removed `core::oldcomm` module
64-
* Added pipe-based `core::comm` module
65-
* Reimplemented `std::treemap`
66-
* Numeric traits have been reorganized under `core::num`
67-
* `core::dvec` removed. Use `@mut ~[T]` or other language types
68-
* `vec::slice` finally returns a slice
69-
* `debug!` and friends don't require a format string, e.g. `debug!(Foo)`
70-
71-
* Tools
72-
* Replaced the 'cargo' package manager with 'rustpkg'
73-
* Added all-purpose 'rust' tool
74-
* `rustc --test` now supports a benchmarks with the `#[bench]` attribute
75-
* rustc now attempts to offer spelling suggestions
76-
77-
* Misc
78-
* Improved support for ARM and Android
79-
* Preliminary MIPS backend
80-
* Improved foreign function ABI implementation for x86, x86_64
81-
* Various and memory usage improvements
82-
* Rust code may be embedded in foreign code under limited circumstances
5+
* `core::send_map` renamed to `core::hashmap`
836

847
Version 0.5 (December 2012)
858
---------------------------

branches/try2/src/etc/local_stage0.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,3 @@ cp ${PREFIX}/lib/rustc/${TARG_DIR}/${LIBDIR}/* ${TARG_DIR}/stage0/${LIBDIR}/
4646
cp ${PREFIX}/lib/librust*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/
4747
cp ${PREFIX}/lib/libcore*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/
4848
cp ${PREFIX}/lib/libstd*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/
49-
cp ${PREFIX}/lib/libsyntax*${LIB_SUF} ${TARG_DIR}/stage0/${LIBDIR}/

branches/try2/src/libcore/option.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ let unwrapped_msg = match msg {
4242
*/
4343

4444
use cmp::{Eq,Ord};
45-
use ops::Add;
4645
use kinds::Copy;
4746
use util;
4847
use num::Zero;
@@ -86,18 +85,6 @@ impl<T:Ord> Ord for Option<T> {
8685
}
8786
}
8887

89-
impl<T: Copy + Add<T,T>> Add<Option<T>, Option<T>> for Option<T> {
90-
#[inline(always)]
91-
pure fn add(&self, other: &Option<T>) -> Option<T> {
92-
match (*self, *other) {
93-
(None, None) => None,
94-
(_, None) => *self,
95-
(None, _) => *other,
96-
(Some(ref lhs), Some(ref rhs)) => Some(*lhs + *rhs)
97-
}
98-
}
99-
}
100-
10188
#[inline(always)]
10289
pub pure fn get<T:Copy>(opt: Option<T>) -> T {
10390
/*!

branches/try2/src/libcore/rt/context.rs

Lines changed: 26 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -65,42 +65,7 @@ extern {
6565
fn swap_registers(out_regs: *mut Registers, in_regs: *Registers);
6666
}
6767

68-
#[cfg(target_arch = "x86")]
69-
struct Registers {
70-
eax: u32, ebx: u32, ecx: u32, edx: u32,
71-
ebp: u32, esi: u32, edi: u32, esp: u32,
72-
cs: u16, ds: u16, ss: u16, es: u16, fs: u16, gs: u16,
73-
eflags: u32, eip: u32
74-
}
75-
76-
#[cfg(target_arch = "x86")]
77-
fn new_regs() -> ~Registers {
78-
~Registers {
79-
eax: 0, ebx: 0, ecx: 0, edx: 0,
80-
ebp: 0, esi: 0, edi: 0, esp: 0,
81-
cs: 0, ds: 0, ss: 0, es: 0, fs: 0, gs: 0,
82-
eflags: 0, eip: 0
83-
}
84-
}
85-
86-
#[cfg(target_arch = "x86")]
87-
fn initialize_call_frame(regs: &mut Registers,
88-
fptr: *c_void, arg: *c_void, sp: *mut uint) {
89-
90-
let sp = align_down(sp);
91-
let sp = mut_offset(sp, -4); // XXX: -4 words? Needs this be done at all?
92-
93-
unsafe { *sp = arg as uint; }
94-
let sp = mut_offset(sp, -1);
95-
unsafe { *sp = 0; } // The final return address
96-
97-
regs.esp = sp as u32;
98-
regs.eip = fptr as u32;
99-
100-
// Last base pointer on the stack is 0
101-
regs.ebp = 0;
102-
}
103-
68+
// Definitions of these registers are in rt/arch/x86_64/regs.h
10469
#[cfg(target_arch = "x86_64")]
10570
type Registers = [uint * 22];
10671

@@ -136,42 +101,40 @@ fn initialize_call_frame(regs: &mut Registers,
136101
regs[RUSTRT_RBP] = 0;
137102
}
138103

139-
#[cfg(target_arch = "arm")]
140-
type Registers = [uint * 32];
104+
#[cfg(target_arch = "x86")]
105+
struct Registers {
106+
eax: u32, ebx: u32, ecx: u32, edx: u32,
107+
ebp: u32, esi: u32, edi: u32, esp: u32,
108+
cs: u16, ds: u16, ss: u16, es: u16, fs: u16, gs: u16,
109+
eflags: u32, eip: u32
110+
}
141111

142-
#[cfg(target_arch = "arm")]
143-
fn new_regs() -> ~Registers { ~[0, .. 32] }
112+
#[cfg(target_arch = "x86")]
113+
fn new_regs() -> ~Registers {
114+
~Registers {
115+
eax: 0, ebx: 0, ecx: 0, edx: 0,
116+
ebp: 0, esi: 0, edi: 0, esp: 0,
117+
cs: 0, ds: 0, ss: 0, es: 0, fs: 0, gs: 0,
118+
eflags: 0, eip: 0
119+
}
120+
}
144121

145-
#[cfg(target_arch = "arm")]
122+
#[cfg(target_arch = "x86")]
146123
fn initialize_call_frame(regs: &mut Registers,
147124
fptr: *c_void, arg: *c_void, sp: *mut uint) {
148-
let sp = mut_offset(sp, -1);
149125

150-
// The final return address. 0 indicates the bottom of the stack
151-
unsafe { *sp = 0; }
152-
153-
regs[0] = arg as uint; // r0
154-
regs[13] = sp as uint; // #53 sp, r13
155-
regs[14] = fptr as uint; // #60 pc, r15 --> lr
156-
}
157-
158-
#[cfg(target_arch = "mips")]
159-
type Registers = [uint * 32];
160-
161-
#[cfg(target_arch = "mips")]
162-
fn new_regs() -> ~Registers { ~[0, .. 32] }
126+
let sp = align_down(sp);
127+
let sp = mut_offset(sp, -4); // XXX: -4 words? Needs this be done at all?
163128

164-
#[cfg(target_arch = "mips")]
165-
fn initialize_call_frame(regs: &mut Registers,
166-
fptr: *c_void, arg: *c_void, sp: *mut uint) {
129+
unsafe { *sp = arg as uint; }
167130
let sp = mut_offset(sp, -1);
131+
unsafe { *sp = 0; } // The final return address
168132

169-
// The final return address. 0 indicates the bottom of the stack
170-
unsafe { *sp = 0; }
133+
regs.esp = sp as u32;
134+
regs.eip = fptr as u32;
171135

172-
regs[4] = arg as uint;
173-
regs[29] = sp as uint;
174-
regs[31] = fptr as uint;
136+
// Last base pointer on the stack is 0
137+
regs.ebp = 0;
175138
}
176139

177140
fn align_down(sp: *mut uint) -> *mut uint {

branches/try2/src/libcore/rt/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// XXX: Missing some implementation for other architectures
12+
#[cfg(target_os = "linux")];
13+
#[cfg(target_os = "mac")];
14+
#[cfg(target_os = "win32")];
15+
1116
// Some basic logging
1217
macro_rules! rtdebug (
1318
($( $arg:expr),+) => ( {

branches/try2/src/librustc/back/link.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,11 @@ pub fn link_binary(sess: Session,
818818
do cstore::iter_crate_data(cstore) |crate_num, _| {
819819
let link_args = csearch::get_link_args_for_crate(cstore, crate_num);
820820
do vec::consume(link_args) |_, link_arg| {
821-
cc_args.push(link_arg);
821+
// Linker arguments that don't begin with - are likely file names,
822+
// so they should not be necessary.
823+
if link_arg.starts_with("-") {
824+
cc_args.push(link_arg);
825+
}
822826
}
823827
}
824828

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

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,6 @@ pub enum Metadata {
188188
MD_tbaa_struct = 5
189189
}
190190

191-
// Inline Asm Dialect
192-
pub enum AsmDialect {
193-
AD_ATT = 0,
194-
AD_Intel = 1
195-
}
196-
197191
// Opaque pointer types
198192
pub enum Module_opaque {}
199193
pub type ModuleRef = *Module_opaque;
@@ -223,9 +217,9 @@ pub enum SectionIterator_opaque {}
223217
pub type SectionIteratorRef = *SectionIterator_opaque;
224218

225219
pub mod llvm {
226-
use super::{AsmDialect, AtomicBinOp, AtomicOrdering, BasicBlockRef};
227-
use super::{Bool, BuilderRef, ContextRef, MemoryBufferRef, ModuleRef};
228-
use super::{ObjectFileRef, Opcode, PassManagerRef, PassManagerBuilderRef};
220+
use super::{AtomicBinOp, AtomicOrdering, BasicBlockRef, Bool, BuilderRef};
221+
use super::{ContextRef, MemoryBufferRef, ModuleRef, ObjectFileRef};
222+
use super::{Opcode, PassManagerRef, PassManagerBuilderRef};
229223
use super::{SectionIteratorRef, TargetDataRef, TypeKind, TypeRef, UseRef};
230224
use super::{ValueRef};
231225

@@ -1439,12 +1433,6 @@ pub mod llvm {
14391433

14401434
/** Enables LLVM debug output. */
14411435
pub unsafe fn LLVMSetDebug(Enabled: c_int);
1442-
1443-
/** Prepares inline assembly. */
1444-
pub unsafe fn LLVMInlineAsm(Ty: TypeRef, AsmString: *c_char,
1445-
Constraints: *c_char, SideEffects: Bool,
1446-
AlignStack: Bool, Dialect: AsmDialect)
1447-
-> ValueRef;
14481436
}
14491437
}
14501438

branches/try2/src/librustc/middle/check_const.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ pub fn check_expr(sess: Session,
9191
v: visit::vt<bool>) {
9292
if is_const {
9393
match e.node {
94-
expr_unary(deref, _) => { }
95-
expr_unary(box(_), _) | expr_unary(uniq(_), _) => {
94+
expr_unary(box(_), _) | expr_unary(uniq(_), _) |
95+
expr_unary(deref, _) => {
9696
sess.span_err(e.span,
9797
~"disallowed operator in constant expression");
9898
return;

branches/try2/src/librustc/middle/liveness.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -620,8 +620,7 @@ fn visit_expr(expr: @expr, &&self: @mut IrMaps, vt: vt<@mut IrMaps>) {
620620
expr_do_body(*) | expr_cast(*) | expr_unary(*) | expr_break(_) |
621621
expr_again(_) | expr_lit(_) | expr_ret(*) | expr_block(*) |
622622
expr_assign(*) | expr_swap(*) | expr_assign_op(*) | expr_mac(*) |
623-
expr_struct(*) | expr_repeat(*) | expr_paren(*) |
624-
expr_inline_asm(*) => {
623+
expr_struct(*) | expr_repeat(*) | expr_paren(*) => {
625624
visit::visit_expr(expr, self, vt);
626625
}
627626
}
@@ -1346,7 +1345,6 @@ pub impl Liveness {
13461345
self.propagate_through_expr(e, succ)
13471346
}
13481347
1349-
expr_inline_asm(*) |
13501348
expr_lit(*) => {
13511349
succ
13521350
}
@@ -1620,7 +1618,7 @@ fn check_expr(expr: @expr, &&self: @Liveness, vt: vt<@Liveness>) {
16201618
expr_cast(*) | expr_unary(*) | expr_ret(*) | expr_break(*) |
16211619
expr_again(*) | expr_lit(_) | expr_block(*) | expr_swap(*) |
16221620
expr_mac(*) | expr_addr_of(*) | expr_struct(*) | expr_repeat(*) |
1623-
expr_paren(*) | expr_inline_asm(*) => {
1621+
expr_paren(*) => {
16241622
visit::visit_expr(expr, self, vt);
16251623
}
16261624
}

branches/try2/src/librustc/middle/mem_categorization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ pub impl mem_categorization_ctxt {
447447
ast::expr_while(*) | ast::expr_block(*) | ast::expr_loop(*) |
448448
ast::expr_match(*) | ast::expr_lit(*) | ast::expr_break(*) |
449449
ast::expr_mac(*) | ast::expr_again(*) | ast::expr_struct(*) |
450-
ast::expr_repeat(*) | ast::expr_inline_asm(*) => {
450+
ast::expr_repeat(*) => {
451451
return self.cat_rvalue(expr, expr_ty);
452452
}
453453
}

branches/try2/src/librustc/middle/moves.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,7 @@ pub impl VisitContext {
560560

561561
expr_break(*) |
562562
expr_again(*) |
563-
expr_lit(*) |
564-
expr_inline_asm(*) => {}
563+
expr_lit(*) => {}
565564

566565
expr_loop(ref blk, _) => {
567566
self.consume_block(blk, visitor);

0 commit comments

Comments
 (0)