diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-07-07 12:22:39 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-07-07 13:31:11 -0700 |
| commit | e29ef1bec276ddbb77bb4663aeb0208dccdaf9ac (patch) | |
| tree | 2c46f88cf848cd735282ada43ee8295e8d76e83f /src/comp/metadata/decoder.rs | |
| parent | b723082cdb2d5793c103f64f9709639f97e31c61 (diff) | |
| download | rust-e29ef1bec276ddbb77bb4663aeb0208dccdaf9ac.tar.gz rust-e29ef1bec276ddbb77bb4663aeb0208dccdaf9ac.zip | |
Refactor a few things in the metadata module
Rename metadata::tags to metadata::common. Move some utility functions from metadata::encoder to metadata::common.
Diffstat (limited to 'src/comp/metadata/decoder.rs')
| -rw-r--r-- | src/comp/metadata/decoder.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/comp/metadata/decoder.rs b/src/comp/metadata/decoder.rs index b8174139e5e..cc3c103ac56 100644 --- a/src/comp/metadata/decoder.rs +++ b/src/comp/metadata/decoder.rs @@ -10,11 +10,10 @@ import std::map::hashmap; import syntax::ast; import front::attr; import middle::ty; -import tags::*; +import common::*; import tydecode::parse_def_id; import tydecode::parse_ty_data; import driver::session; -import util::common; import syntax::print::pprust; export get_symbol; @@ -51,7 +50,7 @@ fn maybe_find_item(int item_id, &ebml::doc items) -> option::t[ebml::doc] { ret ebml::be_uint_from_bytes(bytes, 0u, 4u) as int == item_id; } auto eqer = bind eq_item(_, item_id); - auto found = lookup_hash(items, eqer, encoder::hash_node_id(item_id)); + auto found = lookup_hash(items, eqer, hash_node_id(item_id)); if (vec::len(found) == 0u) { ret option::none[ebml::doc]; } else { ret option::some[ebml::doc](found.(0)); } @@ -129,7 +128,7 @@ fn resolve_path(vec[ast::ident] path, vec[u8] data) -> vec[ast::def_id] { auto paths = ebml::get_doc(md, tag_paths); auto eqer = bind eq_item(_, s); let vec[ast::def_id] result = []; - for (ebml::doc doc in lookup_hash(paths, eqer, encoder::hash_path(s))) { + for (ebml::doc doc in lookup_hash(paths, eqer, hash_path(s))) { auto did_doc = ebml::get_doc(doc, tag_def_id); vec::push(result, parse_def_id(ebml::doc_data(did_doc))); } |
