Skip to content

Commit 04fb97d

Browse files
committed
---
yaml --- r: 4947 b: refs/heads/master c: b0db139 h: refs/heads/master i: 4945: 48ab5a3 4943: 3f85f3a v: v3
1 parent ffbba84 commit 04fb97d

File tree

3 files changed

+7
-14
lines changed

3 files changed

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

trunk/src/comp/middle/trans.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4450,14 +4450,7 @@ 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) {
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-
}
4453+
ast::expr_be(ex) { ret trans_be(cx, ex); }
44614454
ast::expr_anon_obj(anon_obj) {
44624455
ret trans_anon_obj(cx, e.span, anon_obj, e.id);
44634456
}
@@ -4783,10 +4776,10 @@ fn trans_ret(cx: &@block_ctxt, e: &option::t<@ast::expr>) -> result {
47834776

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

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 {
4779+
fn trans_be(cx: &@block_ctxt, e: &@ast::expr) -> result {
4780+
// FIXME: This should be a typestate precondition
47894781

4782+
assert (ast_util::is_call_expr(e));
47904783
// FIXME: Turn this into a real tail call once
47914784
// calling convention issues are settled
47924785

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

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

0 commit comments

Comments
 (0)