Skip to content

Commit 7e4213b

Browse files
committed
---
yaml --- r: 751 b: refs/heads/master c: e3758fe h: refs/heads/master i: 749: c95646f 747: 22548a4 743: 8f719e0 735: 2bfa588 v: v3
1 parent 44395e1 commit 7e4213b

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 785d9b15945500d987ea1042ee31138d7b6d1d4e
2+
refs/heads/master: e3758fe321725bec4707e1b7d4fff333ba915905

trunk/src/comp/front/ast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ type slot = rec(@ty ty, mode mode, option[slot_id] id);
129129
type input = rec(slot slot, ident ident);
130130

131131
type _fn = rec(vec[input] inputs,
132-
slot output,
132+
ty output,
133133
block body);
134134

135135
type _mod = hashmap[ident,@item];

trunk/src/comp/front/parser.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -603,13 +603,12 @@ io fn parse_fn(parser p) -> tup(ast.ident, @ast.item) {
603603
some(token.COMMA),
604604
pf, p);
605605

606-
let ast.slot output;
606+
let ast.ty output;
607607
if (p.peek() == token.RARROW) {
608608
p.bump();
609-
output = rec(ty=parse_ty(p), mode=ast.val, id=none[ast.slot_id]);
609+
output = *parse_ty(p);
610610
} else {
611-
output = rec(ty=@spanned(lo, inputs.span, ast.ty_nil),
612-
mode=ast.val, id=none[ast.slot_id]);
611+
output = spanned(lo, inputs.span, ast.ty_nil);
613612
}
614613

615614
auto body = parse_block(p);

trunk/src/comp/middle/fold.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ type ast_fold[ENV] =
120120
vec[@stmt] stmts) -> block) fold_block,
121121

122122
(fn(&ENV e, vec[ast.input] inputs,
123-
&slot output, block body) -> ast._fn) fold_fn,
123+
&ty output, block body) -> ast._fn) fold_fn,
124124

125125
(fn(&ENV e, &ast._mod m) -> ast._mod) fold_mod,
126126

@@ -310,10 +310,10 @@ fn fold_fn[ENV](&ENV env, ast_fold[ENV] fld, &ast._fn f) -> ast._fn {
310310

311311
let operator[ast.input,ast.input] fi = bind fold_input[ENV](env, fld, _);
312312
auto inputs = _vec.map[ast.input, ast.input](fi, f.inputs);
313-
auto output = fold_slot[ENV](env, fld, f.output);
313+
auto output = fold_ty[ENV](env, fld, @f.output);
314314
auto body = fold_block[ENV](env, fld, f.body);
315315

316-
ret fld.fold_fn(env, inputs, output, body);
316+
ret fld.fold_fn(env, inputs, *output, body);
317317
}
318318

319319
fn fold_item[ENV](&ENV env, ast_fold[ENV] fld, @item i) -> @item {
@@ -539,7 +539,7 @@ fn identity_fold_block[ENV](&ENV e, &span sp, vec[@stmt] stmts) -> block {
539539

540540
fn identity_fold_fn[ENV](&ENV e,
541541
vec[ast.input] inputs,
542-
&slot output,
542+
&ast.ty output,
543543
block body) -> ast._fn {
544544
ret rec(inputs=inputs, output=output, body=body);
545545
}

0 commit comments

Comments
 (0)