Teach creader and metadata writer how to do ty.ty_type.

This commit is contained in:
Graydon Hoare 2011-03-26 17:35:51 -07:00
parent b628c352f3
commit ac6e1131e9
2 changed files with 12 additions and 1 deletions

View file

@ -189,6 +189,7 @@ impure fn parse_sty(@pstate st, str_def sd) -> ty.sty {
}
case ('X') {ret ty.ty_var(parse_int(st));}
case ('E') {ret ty.ty_native;}
case ('Y') {ret ty.ty_type;}
}
}

View file

@ -123,7 +123,7 @@ fn sty_str(ty.sty st, def_str ds) -> str {
case (ty.ty_var(?id)) {ret "X" + common.istr(id);}
case (ty.ty_native) {ret "E";}
case (ty.ty_param(?def)) {ret "p" + ds(def);}
// TODO (maybe?) ty_type;
case (ty.ty_type) {ret "Y";}
}
}
@ -421,3 +421,13 @@ fn write_metadata(@trans.crate_ctxt cx, @ast.crate crate) {
llvm.LLVMSetSection(llglobal, _str.buf(x86.get_meta_sect_name()));
}
//
// Local Variables:
// mode: rust
// fill-column: 78;
// indent-tabs-mode: nil
// c-basic-offset: 4
// buffer-file-coding-system: utf-8-unix
// compile-command: "make -k -C $RBUILD 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
// End:
//