Rename middle::metadata to metadata::cwriter. Move creader to metadata
Preparation for a lot more metadata refactoring
This commit is contained in:
parent
d4a5487e1c
commit
ba5c7a570d
10 changed files with 54 additions and 50 deletions
|
|
@ -2,8 +2,8 @@
|
|||
import driver::session;
|
||||
import lib::llvm::llvm;
|
||||
import middle::trans;
|
||||
import middle::metadata;
|
||||
import middle::ty;
|
||||
import metadata::cwriter;
|
||||
import std::str;
|
||||
import std::fs;
|
||||
import std::vec;
|
||||
|
|
@ -398,15 +398,15 @@ fn symbol_hash(ty::ctxt tcx, sha1 sha, &ty::t t, str crate_meta_name,
|
|||
// to be independent of one another in the crate.
|
||||
|
||||
auto cx =
|
||||
@rec(ds=metadata::def_to_str,
|
||||
@rec(ds=metadata::cwriter::def_to_str,
|
||||
tcx=tcx,
|
||||
abbrevs=metadata::ac_no_abbrevs);
|
||||
abbrevs=metadata::cwriter::ac_no_abbrevs);
|
||||
sha.reset();
|
||||
sha.input_str(crate_meta_name);
|
||||
sha.input_str("-");
|
||||
sha.input_str(crate_meta_name);
|
||||
sha.input_str("-");
|
||||
sha.input_str(metadata::encode::ty_str(cx, t));
|
||||
sha.input_str(metadata::cwriter::encode::ty_str(cx, t));
|
||||
auto hash = truncated_sha1_result(sha);
|
||||
// Prefix with _ so that it never blends into adjacent digits
|
||||
|
||||
|
|
@ -452,8 +452,8 @@ fn mangle_exported_name(&@crate_ctxt ccx, &vec[str] path, &ty::t t) -> str {
|
|||
|
||||
fn mangle_internal_name_by_type_only(&@crate_ctxt ccx, &ty::t t, &str name) ->
|
||||
str {
|
||||
auto f = metadata::def_to_str;
|
||||
auto cx = @rec(ds=f, tcx=ccx.tcx, abbrevs=metadata::ac_no_abbrevs);
|
||||
auto f = metadata::cwriter::def_to_str;
|
||||
auto cx = @rec(ds=f, tcx=ccx.tcx, abbrevs=metadata::cwriter::ac_no_abbrevs);
|
||||
auto s = pretty::ppaux::ty_to_short_str(ccx.tcx, t);
|
||||
auto hash = get_symbol_hash(ccx, t);
|
||||
ret mangle([name, s, hash]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue