Skip to content

Commit df051e4

Browse files
committed
---
yaml --- r: 6745 b: refs/heads/master c: 52f7640 h: refs/heads/master i: 6743: 73d28bc v: v3
1 parent 3eb199f commit df051e4

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
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: b5e5043d5d8adecb04cf25a1be0e186d96d2f82a
2+
refs/heads/master: 52f76400b5b8fc9ac14c2caa5eb6736bcbd38223

trunk/src/comp/metadata/tydecode.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ fn parse_ty(st: @pstate, sd: str_def) -> ty::t {
294294
'X' { ret ty::mk_var(st.tcx, parse_int(st)); }
295295
'E' { let def = parse_def(st, sd); ret ty::mk_native(st.tcx, def); }
296296
'Y' { ret ty::mk_type(st.tcx); }
297+
'y' { ret ty::mk_send_type(st.tcx); }
298+
'C' { ret ty::mk_opaque_closure(st.tcx); }
297299
'#' {
298300
let pos = parse_hex(st);
299301
assert (next(st) as char == ':');

trunk/src/comp/metadata/tyencode.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ fn enc_sty(w: io::writer, cx: @ctxt, st: ty::sty) {
183183
w.write_str(uint::str(id));
184184
}
185185
ty::ty_type. { w.write_char('Y'); }
186+
ty::ty_send_type. { w.write_char('y'); }
187+
ty::ty_opaque_closure. { w.write_char('C'); }
186188
ty::ty_constr(ty, cs) {
187189
w.write_str("A[");
188190
enc_ty(w, cx, ty);

trunk/src/comp/middle/shape.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t, ty_param_map: [uint],
305305
ty::ty_int(ast::ty_i.) { s += [s_int(ccx.tcx)]; }
306306
ty::ty_float(ast::ty_f.) { s += [s_float(ccx.tcx)]; }
307307
ty::ty_uint(ast::ty_u.) | ty::ty_ptr(_) | ty::ty_type. |
308-
ty::ty_native(_) { s += [s_uint(ccx.tcx)]; }
308+
ty::ty_send_type. | ty::ty_native(_) { s += [s_uint(ccx.tcx)]; }
309309
ty::ty_int(ast::ty_i8.) { s += [shape_i8]; }
310310
ty::ty_uint(ast::ty_u16.) { s += [shape_u16]; }
311311
ty::ty_int(ast::ty_i16.) { s += [shape_i16]; }

trunk/src/comp/middle/trans.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ fn type_of_inner(cx: @crate_ctxt, sp: span, t: ty::t)
192192
std::util::unreachable()
193193
}
194194
ty::ty_param(_, _) { T_typaram(cx.tn) }
195-
ty::ty_type. { T_ptr(cx.tydesc_type) }
195+
ty::ty_send_type. | ty::ty_type. { T_ptr(cx.tydesc_type) }
196196
ty::ty_tup(elts) {
197197
let tys = [];
198198
for elt in elts {
@@ -204,6 +204,11 @@ fn type_of_inner(cx: @crate_ctxt, sp: span, t: ty::t)
204204
ty::ty_opaque_closure. {
205205
T_opaque_closure(cx)
206206
}
207+
_ {
208+
log_err ("type_of_inner not implemented for ",
209+
ty::struct(cx.tcx, t));
210+
fail "type_of_inner not implemented for this kind of type";
211+
}
207212
};
208213
cx.lltypes.insert(t, llty);
209214
ret llty;

0 commit comments

Comments
 (0)