Annotate or fix FIXMEs in LLVM bindings and metadata code
Fixed up a few FIXMEs in lib/llvm to use more descriptive data
types. Covered FIXMEs in metadata::{creader, csearch, decoder} and
one in encoder.
This commit is contained in:
parent
37abcda42b
commit
cf2fc2c34e
10 changed files with 84 additions and 74 deletions
|
|
@ -132,3 +132,6 @@ fn hash_path(&&s: str) -> uint {
|
|||
for str::each(s) {|ch| h = (h << 5u) + h ^ (ch as uint); }
|
||||
ret h;
|
||||
}
|
||||
|
||||
type link_meta = {name: str, vers: str, extras_hash: str};
|
||||
|
||||
|
|
|
|||
|
|
@ -239,6 +239,7 @@ fn resolve_crate_deps(e: env, cdata: @[u8]) -> cstore::cnum_map {
|
|||
#debug("need to load it");
|
||||
// This is a new one so we've got to load it
|
||||
// FIXME: Need better error reporting than just a bogus span
|
||||
// #2404
|
||||
let fake_span = ast_util::dummy_sp();
|
||||
let local_cnum =
|
||||
resolve_crate(e, cname, cmetas, dep.hash, fake_span);
|
||||
|
|
|
|||
|
|
@ -141,7 +141,6 @@ fn get_type(tcx: ty::ctxt, def: ast::def_id) -> ty::ty_param_bounds_and_ty {
|
|||
decoder::get_type(cdata, def.node, tcx)
|
||||
}
|
||||
|
||||
/* FIXME: Refactor */
|
||||
fn get_field_type(tcx: ty::ctxt, class_id: ast::def_id,
|
||||
def: ast::def_id) -> ty::ty_param_bounds_and_ty {
|
||||
let cstore = tcx.sess.cstore;
|
||||
|
|
|
|||
|
|
@ -578,8 +578,8 @@ fn get_meta_items(md: ebml::doc) -> [@ast::meta_item] {
|
|||
let vd = ebml::get_doc(meta_item_doc, tag_meta_item_value);
|
||||
let n = str::from_bytes(ebml::doc_data(nd));
|
||||
let v = str::from_bytes(ebml::doc_data(vd));
|
||||
// FIXME (#611): Should be able to decode meta_name_value variants,
|
||||
// but currently they can't be encoded
|
||||
// FIXME (#623): Should be able to decode meta_name_value variants,
|
||||
// but currently the encoder just drops them
|
||||
items += [attr::mk_name_value_item_str(n, v)];
|
||||
};
|
||||
ebml::tagged_docs(md, tag_meta_item_list) {|meta_item_doc|
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import std::ebml::serializer;
|
|||
import syntax::ast;
|
||||
import syntax::diagnostic::span_handler;
|
||||
|
||||
export link_meta;
|
||||
export encode_parms;
|
||||
export encode_metadata;
|
||||
export encoded_ty;
|
||||
|
|
@ -33,9 +32,6 @@ export encode_ctxt;
|
|||
export write_type;
|
||||
export encode_def_id;
|
||||
|
||||
// FIXME: This probably belongs somewhere else
|
||||
type link_meta = {name: str, vers: str, extras_hash: str};
|
||||
|
||||
type abbrev_map = map::hashmap<ty::t, tyencode::ty_abbrev>;
|
||||
|
||||
type encode_inlined_item = fn@(ecx: @encode_ctxt,
|
||||
|
|
@ -916,7 +912,7 @@ fn encode_meta_item(ebml_w: ebml::writer, mi: meta_item) {
|
|||
ebml_w.end_tag();
|
||||
ebml_w.end_tag();
|
||||
}
|
||||
_ {/* FIXME (#611) */ }
|
||||
_ {/* FIXME (#623): encode other variants */ }
|
||||
}
|
||||
}
|
||||
meta_list(name, items) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue