extend with ty_send_type and ty_opaque_closure
This commit is contained in:
parent
b5e5043d5d
commit
52f76400b5
4 changed files with 11 additions and 2 deletions
|
|
@ -305,7 +305,7 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t, ty_param_map: [uint],
|
|||
ty::ty_int(ast::ty_i.) { s += [s_int(ccx.tcx)]; }
|
||||
ty::ty_float(ast::ty_f.) { s += [s_float(ccx.tcx)]; }
|
||||
ty::ty_uint(ast::ty_u.) | ty::ty_ptr(_) | ty::ty_type. |
|
||||
ty::ty_native(_) { s += [s_uint(ccx.tcx)]; }
|
||||
ty::ty_send_type. | ty::ty_native(_) { s += [s_uint(ccx.tcx)]; }
|
||||
ty::ty_int(ast::ty_i8.) { s += [shape_i8]; }
|
||||
ty::ty_uint(ast::ty_u16.) { s += [shape_u16]; }
|
||||
ty::ty_int(ast::ty_i16.) { s += [shape_i16]; }
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ fn type_of_inner(cx: @crate_ctxt, sp: span, t: ty::t)
|
|||
std::util::unreachable()
|
||||
}
|
||||
ty::ty_param(_, _) { T_typaram(cx.tn) }
|
||||
ty::ty_type. { T_ptr(cx.tydesc_type) }
|
||||
ty::ty_send_type. | ty::ty_type. { T_ptr(cx.tydesc_type) }
|
||||
ty::ty_tup(elts) {
|
||||
let tys = [];
|
||||
for elt in elts {
|
||||
|
|
@ -204,6 +204,11 @@ fn type_of_inner(cx: @crate_ctxt, sp: span, t: ty::t)
|
|||
ty::ty_opaque_closure. {
|
||||
T_opaque_closure(cx)
|
||||
}
|
||||
_ {
|
||||
log_err ("type_of_inner not implemented for ",
|
||||
ty::struct(cx.tcx, t));
|
||||
fail "type_of_inner not implemented for this kind of type";
|
||||
}
|
||||
};
|
||||
cx.lltypes.insert(t, llty);
|
||||
ret llty;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue