Skip to content

Commit 426b5f2

Browse files
committed
---
yaml --- r: 108923 b: refs/heads/dist-snap c: 99746d4 h: refs/heads/master i: 108921: 3c68184 108919: 3a5886e v: v3
1 parent bbd06dd commit 426b5f2

36 files changed

+122
-475
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 294d3ddb89c86a91b0ac7298a31e729a9192171f
9+
refs/heads/dist-snap: 99746d43c1a8645b4e655c68a834c37dbc44ded4
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/configure

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ err() {
2222
need_ok() {
2323
if [ $? -ne 0 ]
2424
then
25-
err $1
25+
err "$1"
2626
fi
2727
}
2828

@@ -340,7 +340,7 @@ DEFAULT_BUILD="${CFG_CPUTYPE}-${CFG_OSTYPE}"
340340

341341
CFG_SRC_DIR="$(cd $(dirname $0) && pwd)/"
342342
CFG_BUILD_DIR="$(pwd)/"
343-
CFG_SELF=${CFG_SRC_DIR}$(basename $0)
343+
CFG_SELF="$0"
344344
CFG_CONFIGURE_ARGS="$@"
345345

346346
OPTIONS=""
@@ -412,16 +412,15 @@ fi
412412
valopt libdir "${CFG_PREFIX}/${CFG_LIBDIR_RELATIVE}" "install libraries"
413413
valopt rustlibdir "rustlib" "subdirectory name for rustc's libraries"
414414

415-
# Validate Options
416-
step_msg "validating $CFG_SELF args"
417-
validate_opt
418-
419415
if [ $HELP -eq 1 ]
420416
then
421417
echo
422418
exit 0
423419
fi
424420

421+
# Validate Options
422+
step_msg "validating $CFG_SELF args"
423+
validate_opt
425424

426425
step_msg "looking for build programs"
427426

branches/dist-snap/mk/crates.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
TARGET_CRATES := std extra green rustuv native flate arena glob term semver \
5353
uuid serialize sync getopts collections num test time
54-
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat
54+
HOST_CRATES := syntax rustc rustdoc fourcc
5555
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5656
TOOLS := compiletest rustdoc rustc
5757

@@ -76,7 +76,6 @@ DEPS_sync := std
7676
DEPS_getopts := std
7777
DEPS_collections := std
7878
DEPS_fourcc := syntax std
79-
DEPS_hexfloat := syntax std
8079
DEPS_num := std
8180
DEPS_test := std extra collections getopts serialize term
8281
DEPS_time := std serialize

branches/dist-snap/src/libhexfloat/lib.rs

Lines changed: 0 additions & 178 deletions
This file was deleted.

branches/dist-snap/src/librustc/middle/borrowck/gather_loans/gather_moves.rs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -94,22 +94,7 @@ pub fn gather_assignment(bccx: &BorrowckCtxt,
9494
assignee_loan_path,
9595
assignment_id,
9696
assignment_span,
97-
assignee_id,
98-
false);
99-
}
100-
101-
pub fn gather_move_and_assignment(bccx: &BorrowckCtxt,
102-
move_data: &MoveData,
103-
assignment_id: ast::NodeId,
104-
assignment_span: Span,
105-
assignee_loan_path: @LoanPath,
106-
assignee_id: ast::NodeId) {
107-
move_data.add_assignment(bccx.tcx,
108-
assignee_loan_path,
109-
assignment_id,
110-
assignment_span,
111-
assignee_id,
112-
true);
97+
assignee_id);
11398
}
11499

115100
fn check_is_legal_to_move_from(bccx: &BorrowckCtxt,

branches/dist-snap/src/librustc/middle/borrowck/gather_loans/mod.rs

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -214,19 +214,20 @@ fn gather_loans_in_expr(this: &mut GatherLoanCtxt,
214214
visit::walk_expr(this, ex, ());
215215
}
216216

217-
ast::ExprAssign(l, _) => {
218-
with_assignee_loan_path(
219-
this.bccx, l,
220-
|lp| gather_moves::gather_assignment(this.bccx, &this.move_data,
221-
ex.id, ex.span, lp, l.id));
222-
visit::walk_expr(this, ex, ());
223-
}
224-
225-
ast::ExprAssignOp(_, l, _) => {
226-
with_assignee_loan_path(
227-
this.bccx, l,
228-
|lp| gather_moves::gather_move_and_assignment(this.bccx, &this.move_data,
229-
ex.id, ex.span, lp, l.id));
217+
ast::ExprAssign(l, _) | ast::ExprAssignOp(_, l, _) => {
218+
let l_cmt = this.bccx.cat_expr(l);
219+
match opt_loan_path(l_cmt) {
220+
Some(l_lp) => {
221+
gather_moves::gather_assignment(this.bccx, &this.move_data,
222+
ex.id, ex.span,
223+
l_lp, l.id);
224+
}
225+
None => {
226+
// This can occur with e.g. `*foo() = 5`. In such
227+
// cases, there is no need to check for conflicts
228+
// with moves etc, just ignore.
229+
}
230+
}
230231
visit::walk_expr(this, ex, ());
231232
}
232233

@@ -287,10 +288,17 @@ fn gather_loans_in_expr(this: &mut GatherLoanCtxt,
287288

288289
ast::ExprInlineAsm(ref ia) => {
289290
for &(_, out) in ia.outputs.iter() {
290-
with_assignee_loan_path(
291-
this.bccx, out,
292-
|lp| gather_moves::gather_assignment(this.bccx, &this.move_data,
293-
ex.id, ex.span, lp, out.id));
291+
let out_cmt = this.bccx.cat_expr(out);
292+
match opt_loan_path(out_cmt) {
293+
Some(out_lp) => {
294+
gather_moves::gather_assignment(this.bccx, &this.move_data,
295+
ex.id, ex.span,
296+
out_lp, out.id);
297+
}
298+
None => {
299+
// See the comment for ExprAssign.
300+
}
301+
}
294302
}
295303
visit::walk_expr(this, ex, ());
296304
}
@@ -301,18 +309,6 @@ fn gather_loans_in_expr(this: &mut GatherLoanCtxt,
301309
}
302310
}
303311

304-
fn with_assignee_loan_path(bccx: &BorrowckCtxt, expr: &ast::Expr, op: |@LoanPath|) {
305-
let cmt = bccx.cat_expr(expr);
306-
match opt_loan_path(cmt) {
307-
Some(lp) => op(lp),
308-
None => {
309-
// This can occur with e.g. `*foo() = 5`. In such
310-
// cases, there is no need to check for conflicts
311-
// with moves etc, just ignore.
312-
}
313-
}
314-
}
315-
316312
impl<'a> GatherLoanCtxt<'a> {
317313
pub fn tcx(&self) -> ty::ctxt { self.bccx.tcx }
318314

branches/dist-snap/src/librustc/middle/borrowck/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ impl BorrowckCtxt {
535535
move_data::Declared => {
536536
self.tcx.sess.span_err(
537537
use_span,
538-
format!("{} of possibly uninitialized variable: `{}`",
538+
format!("{} of possibly uninitialized value: `{}`",
539539
verb,
540540
self.loan_path_to_str(lp)));
541541
}

branches/dist-snap/src/librustc/middle/borrowck/move_data.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,23 @@ use util::ppaux::Repr;
3333

3434
pub struct MoveData {
3535
/// Move paths. See section "Move paths" in `doc.rs`.
36-
paths: RefCell<Vec<MovePath>>,
36+
paths: RefCell<Vec<MovePath> >,
3737

3838
/// Cache of loan path to move path index, for easy lookup.
3939
path_map: RefCell<HashMap<@LoanPath, MovePathIndex>>,
4040

4141
/// Each move or uninitialized variable gets an entry here.
42-
moves: RefCell<Vec<Move>>,
42+
moves: RefCell<Vec<Move> >,
4343

4444
/// Assignments to a variable, like `x = foo`. These are assigned
4545
/// bits for dataflow, since we must track them to ensure that
4646
/// immutable variables are assigned at most once along each path.
47-
var_assignments: RefCell<Vec<Assignment>>,
47+
var_assignments: RefCell<Vec<Assignment> >,
4848

4949
/// Assignments to a path, like `x.f = foo`. These are not
5050
/// assigned dataflow bits, but we track them because they still
5151
/// kill move bits.
52-
path_assignments: RefCell<Vec<Assignment>>,
53-
54-
/// Assignments to a variable or path, like `x = foo`, but not `x += foo`.
52+
path_assignments: RefCell<Vec<Assignment> >,
5553
assignee_ids: RefCell<HashSet<ast::NodeId>>,
5654
}
5755

@@ -394,8 +392,7 @@ impl MoveData {
394392
lp: @LoanPath,
395393
assign_id: ast::NodeId,
396394
span: Span,
397-
assignee_id: ast::NodeId,
398-
is_also_move: bool) {
395+
assignee_id: ast::NodeId) {
399396
/*!
400397
* Adds a new record for an assignment to `lp` that occurs at
401398
* location `id` with the given `span`.
@@ -406,7 +403,7 @@ impl MoveData {
406403

407404
let path_index = self.move_path(tcx, lp);
408405

409-
if !is_also_move {
406+
{
410407
let mut assignee_ids = self.assignee_ids.borrow_mut();
411408
assignee_ids.get().insert(assignee_id);
412409
}

0 commit comments

Comments
 (0)