Skip to content

Commit b01528c

Browse files
committed
---
yaml --- r: 4111 b: refs/heads/master c: 25a89e0 h: refs/heads/master i: 4109: 83a4c06 4107: 4122496 4103: 912f476 4095: 1cb4a68 v: v3
1 parent e4c177d commit b01528c

File tree

22 files changed

+84
-83
lines changed

22 files changed

+84
-83
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 552bff8a2155e9e404a3cd279a26a374188d65f7
2+
refs/heads/master: 25a89e068d8c5aa4a6839d02af2a23c9bf8c7c2b

trunk/src/comp/front/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ fn filter_stmt(&ast::crate_cfg cfg,
7878
}
7979
}
8080

81-
fn fold_block(&ast::crate_cfg cfg, &ast::block_ b,
82-
fold::ast_fold fld) -> ast::block_ {
81+
fn fold_block(&ast::crate_cfg cfg, &ast::blk_ b,
82+
fold::ast_fold fld) -> ast::blk_ {
8383
auto filter = bind filter_stmt(cfg, _);
8484
auto filtered_stmts = ivec::filter_map(filter, b.stmts);
8585
ret rec(stmts=ivec::map(fld.fold_stmt, filtered_stmts),

trunk/src/comp/front/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ fn mk_tests(&test_ctxt cx) -> @ast::item {
186186
// The vector of test_descs for this crate
187187
auto test_descs = mk_test_desc_vec(cx);
188188

189-
let ast::block_ body_= rec(stmts = ~[],
189+
let ast::blk_ body_= rec(stmts = ~[],
190190
expr = option::some(test_descs),
191191
id = cx.next_node_id());
192192
auto body = nospan(body_);
@@ -313,7 +313,7 @@ fn mk_main(&test_ctxt cx) -> @ast::item {
313313

314314
auto test_main_call_expr = mk_test_main_call(cx);
315315

316-
let ast::block_ body_ = rec(stmts = ~[],
316+
let ast::blk_ body_ = rec(stmts = ~[],
317317
expr = option::some(test_main_call_expr),
318318
id = cx.next_node_id());
319319
auto body = rec(node = body_, span = rec(lo=0u, hi=0u));

trunk/src/comp/middle/alias.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ fn arm_defnums(&ast::arm arm) -> node_id[] {
326326
}
327327

328328
fn check_for_each(&ctx cx, &@ast::local local, &@ast::expr call,
329-
&ast::block blk, &scope sc, &vt[scope] v) {
329+
&ast::blk blk, &scope sc, &vt[scope] v) {
330330
visit::visit_expr(call, sc, v);
331331
alt (call.node) {
332332
case (ast::expr_call(?f, ?args)) {
@@ -344,7 +344,7 @@ fn check_for_each(&ctx cx, &@ast::local local, &@ast::expr call,
344344
}
345345
}
346346

347-
fn check_for(&ctx cx, &@ast::local local, &@ast::expr seq, &ast::block blk,
347+
fn check_for(&ctx cx, &@ast::local local, &@ast::expr seq, &ast::blk blk,
348348
&scope sc, &vt[scope] v) {
349349
visit::visit_expr(seq, sc, v);
350350
auto defnum = local.node.id;

trunk/src/comp/middle/resolve.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ tag scope {
5252
scope_fn(ast::fn_decl, ast::ty_param[]);
5353
scope_native_item(@ast::native_item);
5454
scope_loop(@ast::local); // there's only 1 decl per loop.
55-
scope_block(ast::block);
55+
scope_block(ast::blk);
5656
scope_arm(ast::arm);
5757
}
5858

@@ -361,7 +361,7 @@ fn visit_fn_with_scope(&@env e, &ast::_fn f, &ast::ty_param[] tp, &span sp,
361361
cons(scope_fn(f.decl, tp), @sc), v);
362362
}
363363

364-
fn visit_block_with_scope(&ast::block b, &scopes sc, &vt[scopes] v) {
364+
fn visit_block_with_scope(&ast::blk b, &scopes sc, &vt[scopes] v) {
365365
visit::visit_block(b, cons(scope_block(b), @sc), v);
366366
}
367367

@@ -781,7 +781,7 @@ fn lookup_in_obj(&ident name, &ast::_obj ob, &ast::ty_param[] ty_params,
781781
}
782782
}
783783

784-
fn lookup_in_block(&ident name, &ast::block_ b, namespace ns) ->
784+
fn lookup_in_block(&ident name, &ast::blk_ b, namespace ns) ->
785785
option::t[def] {
786786
for (@ast::stmt st in b.stmts) {
787787
alt (st.node) {
@@ -1319,7 +1319,7 @@ fn check_arm(@env e, &ast::arm a, &() x, &vt[()] v) {
13191319
}
13201320
}
13211321

1322-
fn check_block(@env e, &ast::block b, &() x, &vt[()] v) {
1322+
fn check_block(@env e, &ast::blk b, &() x, &vt[()] v) {
13231323
visit::visit_block(b, x, v);
13241324
auto values = checker(*e, "value");
13251325
auto types = checker(*e, "type");

trunk/src/comp/middle/trans.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3696,7 +3696,7 @@ fn join_branches(&@block_ctxt parent_cx, &result[] ins) -> @block_ctxt {
36963696

36973697
tag out_method { return; save_in(ValueRef); }
36983698

3699-
fn trans_if(&@block_ctxt cx, &@ast::expr cond, &ast::block thn,
3699+
fn trans_if(&@block_ctxt cx, &@ast::expr cond, &ast::blk thn,
37003700
&option::t[@ast::expr] els, ast::node_id id, &out_method output)
37013701
-> result {
37023702
auto cond_res = trans_expr(cx, cond);
@@ -3731,11 +3731,11 @@ fn trans_if(&@block_ctxt cx, &@ast::expr cond, &ast::block thn,
37313731
}
37323732

37333733
fn trans_for(&@block_ctxt cx, &@ast::local local, &@ast::expr seq,
3734-
&ast::block body) -> result {
3734+
&ast::blk body) -> result {
37353735
// FIXME: We bind to an alias here to avoid a segfault... this is
37363736
// obviously a bug.
37373737
fn inner(&@block_ctxt cx, @ast::local local, ValueRef curr, ty::t t,
3738-
&ast::block body, @block_ctxt outer_next_cx) -> result {
3738+
&ast::blk body, @block_ctxt outer_next_cx) -> result {
37393739
auto next_cx = new_sub_block_ctxt(cx, "next");
37403740
auto scope_cx =
37413741
new_loop_scope_block_ctxt(cx, option::some[@block_ctxt](next_cx),
@@ -3906,7 +3906,7 @@ fn load_environment(&@block_ctxt cx, &@fn_ctxt fcx,
39063906
}
39073907

39083908
fn trans_for_each(&@block_ctxt cx, &@ast::local local, &@ast::expr seq,
3909-
&ast::block body) -> result {
3909+
&ast::blk body) -> result {
39103910
/*
39113911
* The translation is a little .. complex here. Code like:
39123912
*
@@ -3985,7 +3985,7 @@ fn trans_for_each(&@block_ctxt cx, &@ast::local local, &@ast::expr seq,
39853985
}
39863986
}
39873987

3988-
fn trans_while(&@block_ctxt cx, &@ast::expr cond, &ast::block body) ->
3988+
fn trans_while(&@block_ctxt cx, &@ast::expr cond, &ast::blk body) ->
39893989
result {
39903990
auto cond_cx = new_scope_block_ctxt(cx, "while cond");
39913991
auto next_cx = new_sub_block_ctxt(cx, "next");
@@ -4001,7 +4001,7 @@ fn trans_while(&@block_ctxt cx, &@ast::expr cond, &ast::block body) ->
40014001
ret rslt(next_cx, C_nil());
40024002
}
40034003

4004-
fn trans_do_while(&@block_ctxt cx, &ast::block body, &@ast::expr cond) ->
4004+
fn trans_do_while(&@block_ctxt cx, &ast::blk body, &@ast::expr cond) ->
40054005
result {
40064006
auto next_cx = new_sub_block_ctxt(cx, "next");
40074007
auto body_cx =
@@ -6256,7 +6256,7 @@ fn trans_block_cleanups(&@block_ctxt cx, &@block_ctxt cleanup_cx)
62566256
ret bcx;
62576257
}
62586258

6259-
iter block_locals(&ast::block b) -> @ast::local {
6259+
iter block_locals(&ast::blk b) -> @ast::local {
62606260
// FIXME: putting from inside an iter block doesn't work, so we can't
62616261
// use the index here.
62626262
for (@ast::stmt s in b.node.stmts) {
@@ -6343,7 +6343,7 @@ fn alloc_local(&@block_ctxt cx, &@ast::local local) -> result {
63436343
ret r;
63446344
}
63456345

6346-
fn trans_block(&@block_ctxt cx, &ast::block b, &out_method output) -> result {
6346+
fn trans_block(&@block_ctxt cx, &ast::blk b, &out_method output) -> result {
63476347
auto bcx = cx;
63486348
for each (@ast::local local in block_locals(b)) {
63496349
// FIXME Update bcx.sp

trunk/src/comp/middle/trans_dps.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ fn trans_recv(&@block_ctxt bcx, &dest dest, &@ast::expr expr) -> @block_ctxt {
446446
ret bcx; // TODO
447447
}
448448

449-
fn trans_block(&@block_ctxt cx, &dest dest, &ast::block blk)
449+
fn trans_block(&@block_ctxt cx, &dest dest, &ast::blk blk)
450450
-> @block_ctxt {
451451
auto bcx = cx;
452452
for each (@ast::local local in trans::block_locals(blk)) {

trunk/src/comp/middle/tstate/annotate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fn collect_ids_expr(&@expr e, @mutable node_id[] rs) {
2727
*rs += ~[e.id];
2828
}
2929

30-
fn collect_ids_block(&block b, @mutable node_id[] rs) {
30+
fn collect_ids_block(&blk b, @mutable node_id[] rs) {
3131
*rs += ~[b.node.id];
3232
}
3333

trunk/src/comp/middle/tstate/auxiliary.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ fn stmt_pp(&crate_ctxt ccx, &stmt s) -> pre_and_post {
332332

333333

334334
/* fails if b has no annotation */
335-
fn block_pp(&crate_ctxt ccx, &block b) -> pre_and_post {
335+
fn block_pp(&crate_ctxt ccx, &blk b) -> pre_and_post {
336336
log "block_pp";
337337
ret node_id_to_ts_ann(ccx, b.node.id).conditions;
338338
}
@@ -347,7 +347,7 @@ fn clear_precond(&crate_ctxt ccx, node_id id) {
347347
ann::clear(pp.conditions.precondition);
348348
}
349349

350-
fn block_states(&crate_ctxt ccx, &block b) -> pre_and_post_state {
350+
fn block_states(&crate_ctxt ccx, &blk b) -> pre_and_post_state {
351351
log "block_states";
352352
ret node_id_to_ts_ann(ccx, b.node.id).states;
353353
}
@@ -392,19 +392,19 @@ fn stmt_poststate(&crate_ctxt ccx, &stmt s) -> poststate {
392392
ret stmt_states(ccx, s).poststate;
393393
}
394394

395-
fn block_precond(&crate_ctxt ccx, &block b) -> precond {
395+
fn block_precond(&crate_ctxt ccx, &blk b) -> precond {
396396
ret block_pp(ccx, b).precondition;
397397
}
398398

399-
fn block_postcond(&crate_ctxt ccx, &block b) -> postcond {
399+
fn block_postcond(&crate_ctxt ccx, &blk b) -> postcond {
400400
ret block_pp(ccx, b).postcondition;
401401
}
402402

403-
fn block_prestate(&crate_ctxt ccx, &block b) -> prestate {
403+
fn block_prestate(&crate_ctxt ccx, &blk b) -> prestate {
404404
ret block_states(ccx, b).prestate;
405405
}
406406

407-
fn block_poststate(&crate_ctxt ccx, &block b) -> poststate {
407+
fn block_poststate(&crate_ctxt ccx, &blk b) -> poststate {
408408
ret block_states(ccx, b).poststate;
409409
}
410410

trunk/src/comp/middle/tstate/bitvectors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ fn declare_var(&fn_ctxt fcx, &tsconstr c, prestate pre) -> prestate {
153153
ret rslt;
154154
}
155155

156-
fn relax_precond_block_non_recursive(&fn_ctxt fcx, node_id i, &block b) {
156+
fn relax_precond_block_non_recursive(&fn_ctxt fcx, node_id i, &blk b) {
157157
relax_precond(i as uint, block_precond(fcx.ccx, b));
158158
}
159159

@@ -165,7 +165,7 @@ fn relax_precond_stmt(&fn_ctxt fcx, node_id i, &@stmt s) {
165165
relax_precond(i as uint, stmt_precond(fcx.ccx, *s));
166166
}
167167

168-
fn relax_precond_block(&fn_ctxt fcx, node_id i, &block b) {
168+
fn relax_precond_block(&fn_ctxt fcx, node_id i, &blk b) {
169169
relax_precond_block_non_recursive(fcx, i, b);
170170
// FIXME: should use visit instead
171171
// could at least generalize this pattern

trunk/src/comp/middle/tstate/pre_post_conditions.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ fn find_pre_post_exprs(&fn_ctxt fcx, &(@expr)[] args, node_id id) {
131131
seq_postconds(fcx, ivec::map(get_post, pps)));
132132
}
133133

134-
fn find_pre_post_loop(&fn_ctxt fcx, &@local l, &@expr index, &block body,
134+
fn find_pre_post_loop(&fn_ctxt fcx, &@local l, &@expr index, &blk body,
135135
node_id id) {
136136
find_pre_post_expr(fcx, index);
137137
find_pre_post_block(fcx, body);
@@ -152,7 +152,7 @@ fn find_pre_post_loop(&fn_ctxt fcx, &@local l, &@expr index, &block body,
152152
// Generates a pre/post assuming that a is the
153153
// annotation for an if-expression with consequent conseq
154154
// and alternative maybe_alt
155-
fn join_then_else(&fn_ctxt fcx, &@expr antec, &block conseq,
155+
fn join_then_else(&fn_ctxt fcx, &@expr antec, &blk conseq,
156156
&option::t[@expr] maybe_alt, node_id id, &if_ty chck) {
157157
find_pre_post_expr(fcx, antec);
158158
find_pre_post_block(fcx, conseq);
@@ -644,7 +644,7 @@ fn find_pre_post_stmt(&fn_ctxt fcx, &stmt s) {
644644
}
645645
}
646646

647-
fn find_pre_post_block(&fn_ctxt fcx, block b) {
647+
fn find_pre_post_block(&fn_ctxt fcx, blk b) {
648648
/* Want to say that if there is a break or cont in this
649649
block, then that invalidates the poststate upheld by
650650
any of the stmts after it.

trunk/src/comp/middle/tstate/states.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ fn find_pre_post_state_exprs(&fn_ctxt fcx, &prestate pres, node_id id,
177177
}
178178

179179
fn find_pre_post_state_loop(&fn_ctxt fcx, prestate pres, &@local l,
180-
&@expr index, &block body, node_id id) -> bool {
180+
&@expr index, &blk body, node_id id)
181+
-> bool {
181182
auto loop_pres = intersect_states(pres,
182183
block_poststate(fcx.ccx, body));
183184

@@ -217,7 +218,7 @@ fn gen_if_local(&fn_ctxt fcx, &poststate p, &@expr e) -> bool {
217218
}
218219
}
219220

220-
fn join_then_else(&fn_ctxt fcx, &@expr antec, &block conseq,
221+
fn join_then_else(&fn_ctxt fcx, &@expr antec, &blk conseq,
221222
&option::t[@expr] maybe_alt, node_id id, &if_ty chk,
222223
&prestate pres) -> bool {
223224
auto changed = set_prestate_ann(fcx.ccx, id, pres) |
@@ -692,7 +693,7 @@ fn find_pre_post_state_stmt(&fn_ctxt fcx, &prestate pres, @stmt s) -> bool {
692693

693694
/* Updates the pre- and post-states of statements in the block,
694695
returns a boolean flag saying whether any pre- or poststates changed */
695-
fn find_pre_post_state_block(&fn_ctxt fcx, &prestate pres0, &block b)
696+
fn find_pre_post_state_block(&fn_ctxt fcx, &prestate pres0, &blk b)
696697
-> bool {
697698
/* First, set the pre-states and post-states for every expression */
698699

trunk/src/comp/middle/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1874,7 +1874,7 @@ fn ty_var_id(&ctxt cx, t typ) -> int {
18741874

18751875

18761876
// Type accessors for AST nodes
1877-
fn block_ty(&ctxt cx, &ast::block b) -> t {
1877+
fn block_ty(&ctxt cx, &ast::blk b) -> t {
18781878
ret node_id_to_type(cx, b.node.id);
18791879
}
18801880

trunk/src/comp/middle/typeck.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ mod writeback {
11051105
fn visit_expr_pre(@wb_ctxt wbcx, &@ast::expr e) {
11061106
resolve_type_vars_for_node(wbcx, e.span, e.id);
11071107
}
1108-
fn visit_block_pre(@wb_ctxt wbcx, &ast::block b) {
1108+
fn visit_block_pre(@wb_ctxt wbcx, &ast::blk b) {
11091109
resolve_type_vars_for_node(wbcx, b.span, b.node.id);
11101110
}
11111111
fn visit_pat_pre(@wb_ctxt wbcx, &@ast::pat p) {
@@ -1147,7 +1147,7 @@ mod writeback {
11471147
}
11481148
fn keep_going(@wb_ctxt wbcx) -> bool { !wbcx.ignore && wbcx.success }
11491149

1150-
fn resolve_type_vars_in_block(&@fn_ctxt fcx, &ast::block blk) -> bool {
1150+
fn resolve_type_vars_in_block(&@fn_ctxt fcx, &ast::blk blk) -> bool {
11511151
auto wbcx = @rec(fcx = fcx,
11521152
mutable ignore = false,
11531153
mutable success = true);
@@ -1628,7 +1628,7 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) {
16281628
// A generic function for checking for or for-each loops
16291629

16301630
fn check_for_or_for_each(&@fn_ctxt fcx, &@ast::local local,
1631-
&ty::t element_ty, &ast::block body,
1631+
&ty::t element_ty, &ast::blk body,
16321632
ast::node_id node_id) {
16331633
check_decl_local(fcx, local);
16341634
check_block(fcx, body);
@@ -1687,7 +1687,7 @@ fn check_expr(&@fn_ctxt fcx, &@ast::expr expr) {
16871687

16881688
// A generic function for checking the then and else in an if
16891689
// or if-check
1690-
fn check_then_else(&@fn_ctxt fcx, &ast::block thn,
1690+
fn check_then_else(&@fn_ctxt fcx, &ast::blk thn,
16911691
&option::t[@ast::expr] elsopt,
16921692
ast::node_id id, &span sp) {
16931693
check_block(fcx, thn);
@@ -2598,7 +2598,7 @@ fn check_stmt(&@fn_ctxt fcx, &@ast::stmt stmt) {
25982598
write::nil_ty(fcx.ccx.tcx, node_id);
25992599
}
26002600

2601-
fn check_block(&@fn_ctxt fcx, &ast::block blk) {
2601+
fn check_block(&@fn_ctxt fcx, &ast::blk blk) {
26022602
for (@ast::stmt s in blk.node.stmts) { check_stmt(fcx, s); }
26032603
alt (blk.node.expr) {
26042604
case (none) { write::nil_ty(fcx.ccx.tcx, blk.node.id); }

0 commit comments

Comments
 (0)