Skip to content

Commit 328dfc7

Browse files
committed
---
yaml --- r: 49870 b: refs/heads/auto c: 4e350c7 h: refs/heads/master v: v3
1 parent bbc42cf commit 328dfc7

File tree

13 files changed

+398
-232
lines changed

13 files changed

+398
-232
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ 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: e28d4b3516f0703ddb5407bf8cd7fc7e273743bb
17+
refs/heads/auto: 4e350c7ce7574259dd0aad9f981e615b2b917d20
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167

branches/auto/RELEASES.txt

Lines changed: 79 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,85 @@
1-
Version 0.6 (?)
1+
Version 0.6 (March 2013)
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+
459
* Libraries
5-
* `core::send_map` renamed to `core::hashmap`
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
683

784
Version 0.5 (December 2012)
885
---------------------------

branches/auto/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/auto/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/auto/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(box(_), _) | expr_unary(uniq(_), _) |
95-
expr_unary(deref, _) => {
94+
expr_unary(deref, _) => { }
95+
expr_unary(box(_), _) | expr_unary(uniq(_), _) => {
9696
sess.span_err(e.span,
9797
~"disallowed operator in constant expression");
9898
return;

0 commit comments

Comments
 (0)