Skip to content

Commit 59aa205

Browse files
committed
---
yaml --- r: 1107 b: refs/heads/master c: a3f828f h: refs/heads/master i: 1105: 43f83e5 1103: 86a3aaa v: v3
1 parent 1134fbf commit 59aa205

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
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: bfdba2dbcceb33e0738949e9f4d6635f689baf1b
2+
refs/heads/master: a3f828f941439276092fe1c0d091de746d35d42e

trunk/src/comp/front/ast.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,10 @@ type _fn = rec(effect effect,
199199
block body);
200200

201201

202-
type method_ = rec(ident ident, _fn meth, def_id id);
202+
type method_ = rec(ident ident, _fn meth, def_id id, ann ann);
203203
type method = spanned[method_];
204204

205-
type obj_field = rec(@ty ty, ident ident, def_id id);
205+
type obj_field = rec(@ty ty, ident ident, def_id id, ann ann);
206206
type _obj = rec(vec[obj_field] fields,
207207
vec[@method] methods);
208208

trunk/src/comp/front/parser.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ impure fn parse_item_fn(parser p, ast.effect eff) -> @ast.item {
12851285
impure fn parse_obj_field(parser p) -> ast.obj_field {
12861286
auto ty = parse_ty(p);
12871287
auto ident = parse_ident(p);
1288-
ret rec(ty=ty, ident=ident, id=p.next_def_id());
1288+
ret rec(ty=ty, ident=ident, id=p.next_def_id(), ann=ast.ann_none);
12891289
}
12901290

12911291
impure fn parse_method(parser p) -> @ast.method {
@@ -1294,7 +1294,8 @@ impure fn parse_method(parser p) -> @ast.method {
12941294
expect(p, token.FN);
12951295
auto ident = parse_ident(p);
12961296
auto f = parse_fn(p, eff);
1297-
auto meth = rec(ident = ident, meth = f, id = p.next_def_id());
1297+
auto meth = rec(ident=ident, meth=f,
1298+
id=p.next_def_id(), ann=ast.ann_none);
12981299
ret @spanned(lo, f.body.span, meth);
12991300
}
13001301

trunk/src/comp/middle/trans.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2307,6 +2307,15 @@ impure fn trans_fn(@crate_ctxt cx, &ast._fn f, ast.def_id fid,
23072307
}
23082308
}
23092309

2310+
impure fn trans_vtbl(@crate_ctxt cx, &ast._obj ob) -> ValueRef {
2311+
let vec[ValueRef] methods = vec();
2312+
for (@ast.method m in ob.methods) {
2313+
trans_fn(cx, m.node.meth, m.node.id, m.node.ann);
2314+
methods += cx.item_ids.get(m.node.id);
2315+
}
2316+
ret C_struct(methods);
2317+
}
2318+
23102319
fn trans_obj(@crate_ctxt cx, &ast._obj ob, ast.def_id oid,
23112320
&ast.ann ann) {
23122321

0 commit comments

Comments
 (0)