Skip to content

Commit ffbba84

Browse files
committed
---
yaml --- r: 4946 b: refs/heads/master c: 1b60bba h: refs/heads/master v: v3
1 parent 48ab5a3 commit ffbba84

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
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: 8b9a78e8c48eda153fe49e62c94465bb1bd3ffb8
2+
refs/heads/master: 1b60bba141c54f374d3378aa229c756d4a8f7f3d

trunk/src/comp/middle/trans.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4450,7 +4450,14 @@ fn trans_expr_out(cx: &@block_ctxt, e: &@ast::expr, output: out_method) ->
44504450
ast::expr_cont. { ret trans_cont(e.span, cx); }
44514451
ast::expr_ret(ex) { ret trans_ret(cx, ex); }
44524452
ast::expr_put(ex) { ret trans_put(cx, ex); }
4453-
ast::expr_be(ex) { ret trans_be(cx, ex); }
4453+
ast::expr_be(ex) {
4454+
// Ideally, the expr_be tag would have a precondition
4455+
// that is_call_expr(ex) -- but we don't support that
4456+
// yet
4457+
// FIXME
4458+
check ast_util::is_call_expr(ex);
4459+
ret trans_be(cx, ex);
4460+
}
44544461
ast::expr_anon_obj(anon_obj) {
44554462
ret trans_anon_obj(cx, e.span, anon_obj, e.id);
44564463
}
@@ -4776,10 +4783,10 @@ fn trans_ret(cx: &@block_ctxt, e: &option::t<@ast::expr>) -> result {
47764783

47774784
fn build_return(bcx: &@block_ctxt) { bld::Br(bcx, bcx_fcx(bcx).llreturn); }
47784785

4779-
fn trans_be(cx: &@block_ctxt, e: &@ast::expr) -> result {
4780-
// FIXME: This should be a typestate precondition
4786+
// fn trans_be(cx: &@block_ctxt, e: &@ast::expr) -> result {
4787+
fn trans_be(cx: &@block_ctxt, e: &@ast::expr)
4788+
: ast_util::is_call_expr(e) -> result {
47814789

4782-
assert (ast_util::is_call_expr(e));
47834790
// FIXME: Turn this into a real tail call once
47844791
// calling convention issues are settled
47854792

trunk/src/comp/syntax/ast_util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ fn is_exported(i: ident, m: _mod) -> bool {
167167
ret count == 0u && !nonlocal;
168168
}
169169

170-
fn is_call_expr(e: @expr) -> bool {
171-
alt e.node { expr_call(_, _) { ret true; } _ { ret false; } }
170+
pure fn is_call_expr(e: @expr) -> bool {
171+
alt e.node { expr_call(_, _) { true } _ { false } }
172172
}
173173

174174
fn is_constraint_arg(e: @expr) -> bool {

trunk/src/snapshots.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
S 2011-08-26 844e2d7
2-
linux-i386 a896a6fe1bfbf38fac66db71edfa3750871edd55
3-
macos-i386 d8d5c6144870389d9c233684576ac7b816e82655
4-
winnt-i386 570d7515403f9bd5afa41e98f027ceedba88d588
5-
61
S 2011-08-25 e241f29
72
linux-i386 af777f99bf51da80f24c53092773546868b27d02
83
macos-i386 5f460da5988e469ced04670dc4bcfb9b95128717

0 commit comments

Comments
 (0)