Skip to content

Commit 892b921

Browse files
committed
---
yaml --- r: 146016 b: refs/heads/try2 c: 3f240fe h: refs/heads/master v: v3
1 parent 9cd8a86 commit 892b921

Some content is hidden

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

74 files changed

+606
-571
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: 3011801256d112e1930726058362b8fd22ea40dd
8+
refs/heads/try2: 3f240fedecf84f9bb614c52f5cc1335057008749
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/Makefile.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,6 @@ CSREQ$(1)_T_$(2)_H_$(3) = \
440440
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
441441
$$(HBIN$(1)_H_$(3))/rustpkg$$(X_$(3)) \
442442
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
443-
$$(HBIN$(1)_H_$(3))/rusti$$(X_$(3)) \
444443
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTPKG_$(3)) \
445444
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTDOC_$(3)) \
446445
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)) \

branches/try2/doc/po/ja/rust.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1842,7 +1842,7 @@ msgid ""
18421842
"The type parameters can also be explicitly supplied in a trailing [path]"
18431843
"(#paths) component after the function name. This might be necessary if there "
18441844
"is not sufficient context to determine the type parameters. For example, "
1845-
"`sys::size_of::<u32>() == 4`."
1845+
"`mem::size_of::<u32>() == 4`."
18461846
msgstr ""
18471847

18481848
#. type: Plain text

branches/try2/doc/po/ja/tutorial-ffi.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ msgid ""
327327
"impl<T: Send> Unique<T> {\n"
328328
" pub fn new(value: T) -> Unique<T> {\n"
329329
" unsafe {\n"
330-
" let ptr = malloc(std::sys::size_of::<T>() as size_t) as *mut T;\n"
330+
" let ptr = malloc(std::mem::size_of::<T>() as size_t) as *mut T;\n"
331331
" assert!(!ptr::is_null(ptr));\n"
332332
" // `*ptr` is uninitialized, and `*ptr = value` would attempt to destroy it\n"
333333
" intrinsics::move_val_init(&mut *ptr, value);\n"

branches/try2/doc/po/rust.md.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1842,7 +1842,7 @@ msgid ""
18421842
"The type parameters can also be explicitly supplied in a trailing [path]"
18431843
"(#paths) component after the function name. This might be necessary if there "
18441844
"is not sufficient context to determine the type parameters. For example, "
1845-
"`sys::size_of::<u32>() == 4`."
1845+
"`mem::size_of::<u32>() == 4`."
18461846
msgstr ""
18471847

18481848
#. type: Plain text

branches/try2/doc/po/tutorial-ffi.md.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ msgid ""
327327
"impl<T: Send> Unique<T> {\n"
328328
" pub fn new(value: T) -> Unique<T> {\n"
329329
" unsafe {\n"
330-
" let ptr = malloc(std::sys::size_of::<T>() as size_t) as *mut T;\n"
330+
" let ptr = malloc(std::mem::size_of::<T>() as size_t) as *mut T;\n"
331331
" assert!(!ptr::is_null(ptr));\n"
332332
" // `*ptr` is uninitialized, and `*ptr = value` would attempt to destroy it\n"
333333
" intrinsics::move_val_init(&mut *ptr, value);\n"

branches/try2/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,7 @@ with `int`, and require the closure parameter to have type
975975
The type parameters can also be explicitly supplied in a trailing
976976
[path](#paths) component after the function name. This might be necessary
977977
if there is not sufficient context to determine the type parameters. For
978-
example, `sys::size_of::<u32>() == 4`.
978+
example, `mem::size_of::<u32>() == 4`.
979979

980980
Since a parameter type is opaque to the generic function, the set of
981981
operations that can be performed on it is limited. Values of parameter

branches/try2/doc/tutorial-ffi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ impl<T: Send> Unique<T> {
300300
#[inline(never)];
301301
302302
unsafe {
303-
let ptr = malloc(std::sys::size_of::<T>() as size_t) as *mut T;
303+
let ptr = malloc(std::mem::size_of::<T>() as size_t) as *mut T;
304304
assert!(!ptr::is_null(ptr));
305305
// `*ptr` is uninitialized, and `*ptr = value` would attempt to destroy it
306306
intrinsics::move_val_init(&mut *ptr, value);

branches/try2/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang

Lines changed: 46 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585
<keyword>u64</keyword>
8686
<keyword>f32</keyword>
8787
<keyword>f64</keyword>
88-
<keyword>float</keyword>
8988
<keyword>char</keyword>
9089
<keyword>str</keyword>
9190
<keyword>Either</keyword>
@@ -205,16 +204,36 @@
205204
</include>
206205
</context>
207206

207+
<define-regex id="int_suffix" extended="true">
208+
(i8|i16|i32|i64|i|u8|u16|u32|u64|u)
209+
</define-regex>
210+
211+
<define-regex id="exponent" extended="true">
212+
([eE][+-]?[0-9_]+)
213+
</define-regex>
214+
215+
<define-regex id="float_suffix" extended="true">
216+
(\%{exponent}?(f32|f64)?)|(\.[0-9][0-9_]*\%{exponent}?)?(f32|f64)?|\.
217+
</define-regex>
218+
219+
<define-regex id="num_suffix" extended="true">
220+
\%{int_suffix}|\%{float_suffix}
221+
</define-regex>
222+
223+
<define-regex id="hex_digit" extended="true">
224+
[0-9a-fA-F]
225+
</define-regex>
226+
208227
<context id="number" style-ref="number">
209228
<match extended="true">
210-
(?&lt;![\w\.])
229+
((?&lt;=\.\.)|(?&lt;![\w\.]))
211230
(
212-
0x[0-9a-fA-F_]+(u8|u16|u32|u64|i8|i16|i32|i64|u|i)?|
213-
0b[0-1_]+(u8|u16|u32|u64|i8|i16|i32|i64|u|i)?|
214-
[0-9][0-9_]*\.[0-9_]*([eE][+-]?[0-9_]+)?(f32|f64|f)?|
215-
[0-9][0-9_]*(u8|u16|u32|u64|i8|i16|i32|i64|u|i)?
231+
[1-9][0-9_]*\%{num_suffix}?|
232+
0[0-9_]*\%{num_suffix}?|
233+
0b[01_]+\%{int_suffix}?|
234+
0x(\%{hex_digit}|_)+\%{int_suffix}?
216235
)
217-
(?![\w\.])
236+
((?![\w\.].)|(?=\.\.))
218237
</match>
219238
</context>
220239

@@ -234,32 +253,37 @@
234253
</match>
235254
</context>
236255

256+
<define-regex id="common_escape" extended="true">
257+
'|"|
258+
\\|n|r|t|
259+
x\%{hex_digit}{2}|
260+
u\%{hex_digit}{4}|
261+
U\%{hex_digit}{8}
262+
</define-regex>
263+
264+
<context id="string_escape" style-ref="def:special-char">
265+
<match>\\\%{common_escape}</match>
266+
</context>
267+
237268
<context id="string" style-ref="string" class="string" class-disabled="no-spell-check">
238269
<start>"</start>
239270
<end>"</end>
240271
<include>
241-
<context ref="def:escape"/>
272+
<context ref="string_escape"/>
242273
<context ref="def:line-continue"/>
243274
</include>
244275
</context>
245276

246-
<define-regex id="hex_digit" extended="true">
247-
[0-9a-fA-F]
248-
</define-regex>
249-
250-
<define-regex id="common_escape" extended="true">
251-
(n|r|t)|
252-
x\%{hex_digit}{2}|
253-
u\%{hex_digit}{4}|
254-
U\%{hex_digit}{8}
255-
</define-regex>
256-
257-
<context id="char" style-ref="char" class="char">
258-
<match extended="true">'([^\\]|\\\%{common_escape})'</match>
277+
<context id="char" style-ref="char">
278+
<match extended="true">'([^\\']|\\\%{common_escape})'</match>
259279
</context>
260280

261281
<context id="attribute" style-ref="attribute" class="attribute">
262-
<match extended="true">\#\[[^\]]+\]</match>
282+
<start extended="true">\#\[</start>
283+
<end>\]</end>
284+
<include>
285+
<context ref="def:in-comment"/>
286+
</include>
263287
</context>
264288

265289
<context id="rust" class="no-spell-check">

branches/try2/src/libextra/arena.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ use std::cast::{transmute, transmute_mut, transmute_mut_region};
4242
use std::cast;
4343
use std::num;
4444
use std::ptr;
45-
use std::sys;
45+
use std::mem;
4646
use std::uint;
4747
use std::vec;
4848
use std::unstable::intrinsics;
@@ -123,7 +123,7 @@ unsafe fn destroy_chunk(chunk: &Chunk) {
123123
let (tydesc, is_done) = un_bitpack_tydesc_ptr(*tydesc_data);
124124
let (size, align) = ((*tydesc).size, (*tydesc).align);
125125

126-
let after_tydesc = idx + sys::size_of::<*TyDesc>();
126+
let after_tydesc = idx + mem::size_of::<*TyDesc>();
127127

128128
let start = round_up_to(after_tydesc, align);
129129

@@ -134,7 +134,7 @@ unsafe fn destroy_chunk(chunk: &Chunk) {
134134
}
135135

136136
// Find where the next tydesc lives
137-
idx = round_up_to(start + size, sys::pref_align_of::<*TyDesc>());
137+
idx = round_up_to(start + size, mem::pref_align_of::<*TyDesc>());
138138
}
139139
}
140140

@@ -220,7 +220,7 @@ impl Arena {
220220
let head = transmute_mut_region(&mut self.head);
221221

222222
tydesc_start = head.fill;
223-
after_tydesc = head.fill + sys::size_of::<*TyDesc>();
223+
after_tydesc = head.fill + mem::size_of::<*TyDesc>();
224224
start = round_up_to(after_tydesc, align);
225225
end = start + n_bytes;
226226
}
@@ -230,7 +230,7 @@ impl Arena {
230230
}
231231

232232
let head = transmute_mut_region(&mut self.head);
233-
head.fill = round_up_to(end, sys::pref_align_of::<*TyDesc>());
233+
head.fill = round_up_to(end, mem::pref_align_of::<*TyDesc>());
234234

235235
//debug2!("idx = {}, size = {}, align = {}, fill = {}",
236236
// start, n_bytes, align, head.fill);

branches/try2/src/librustc/middle/borrowck/check_loans.rs

Lines changed: 6 additions & 1 deletion
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
//
@@ -839,6 +839,11 @@ fn check_loans_in_expr<'a>(this: &mut CheckLoanCtxt<'a>,
839839
expr.span,
840840
[]);
841841
}
842+
ast::ExprInlineAsm(ref ia) => {
843+
for &(_, out) in ia.outputs.iter() {
844+
this.check_assignment(out);
845+
}
846+
}
842847
_ => { }
843848
}
844849
}

branches/try2/src/librustc/middle/borrowck/gather_loans/mod.rs

Lines changed: 18 additions & 1 deletion
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
//
@@ -309,6 +309,23 @@ fn gather_loans_in_expr(this: &mut GatherLoanCtxt,
309309
visit::walk_expr(this, ex, ());
310310
}
311311

312+
ast::ExprInlineAsm(ref ia) => {
313+
for &(_, out) in ia.outputs.iter() {
314+
let out_cmt = this.bccx.cat_expr(out);
315+
match opt_loan_path(out_cmt) {
316+
Some(out_lp) => {
317+
gather_moves::gather_assignment(this.bccx, this.move_data,
318+
ex.id, ex.span,
319+
out_lp, out.id);
320+
}
321+
None => {
322+
// See the comment for ExprAssign.
323+
}
324+
}
325+
}
326+
visit::walk_expr(this, ex, ());
327+
}
328+
312329
_ => {
313330
visit::walk_expr(this, ex, ());
314331
}

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

Lines changed: 7 additions & 9 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
//
@@ -1227,12 +1227,15 @@ impl Liveness {
12271227
self.propagate_through_expr(e, succ)
12281228
}
12291229

1230-
ExprInlineAsm(ref ia) =>{
1230+
ExprInlineAsm(ref ia) => {
12311231
let succ = do ia.inputs.rev_iter().fold(succ) |succ, &(_, expr)| {
12321232
self.propagate_through_expr(expr, succ)
12331233
};
12341234
do ia.outputs.rev_iter().fold(succ) |succ, &(_, expr)| {
1235-
self.propagate_through_expr(expr, succ)
1235+
// see comment on lvalues in
1236+
// propagate_through_lvalue_components()
1237+
let succ = self.write_lvalue(expr, succ, ACC_WRITE);
1238+
self.propagate_through_lvalue_components(expr, succ)
12361239
}
12371240
}
12381241

@@ -1478,12 +1481,7 @@ fn check_expr(this: &mut Liveness, expr: @Expr) {
14781481

14791482
// Output operands must be lvalues
14801483
for &(_, out) in ia.outputs.iter() {
1481-
match out.node {
1482-
ExprAddrOf(_, inner) => {
1483-
this.check_lvalue(inner);
1484-
}
1485-
_ => {}
1486-
}
1484+
this.check_lvalue(out);
14871485
this.visit_expr(out, ());
14881486
}
14891487

branches/try2/src/librustc/middle/trans/_match.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1917,7 +1917,7 @@ fn trans_match_inner(scope_cx: @mut Block,
19171917
Infallible
19181918
}
19191919
};
1920-
let lldiscr = discr_datum.to_zeroable_ref_llval(bcx);
1920+
let lldiscr = discr_datum.to_ref_llval(bcx);
19211921
compile_submatch(bcx, matches, [lldiscr], chk);
19221922

19231923
let mut arm_cxs = ~[];
@@ -1996,7 +1996,7 @@ pub fn store_local(bcx: @mut Block,
19961996
if bcx.sess().asm_comments() {
19971997
add_comment(bcx, "creating zeroable ref llval");
19981998
}
1999-
let llptr = init_datum.to_zeroable_ref_llval(bcx);
1999+
let llptr = init_datum.to_ref_llval(bcx);
20002000
return bind_irrefutable_pat(bcx, pat, llptr, BindLocal);
20012001
}
20022002
}

0 commit comments

Comments
 (0)