parent
48013db5c5
commit
e949aab10a
7 changed files with 18 additions and 36 deletions
|
|
@ -585,19 +585,15 @@ fn encode_metadata(&@crate_ctxt cx, &@crate crate) -> str {
|
|||
|
||||
ebmlivec::start_tag(ebml_w, tag_paths);
|
||||
auto paths_index = encode_item_paths(ebml_w, crate);
|
||||
auto str_writer = write_str;
|
||||
auto path_hasher = hash_path;
|
||||
auto paths_buckets = create_index[str](paths_index, path_hasher);
|
||||
encode_index[str](ebml_w, paths_buckets, str_writer);
|
||||
auto paths_buckets = create_index(paths_index, hash_path);
|
||||
encode_index(ebml_w, paths_buckets, write_str);
|
||||
ebmlivec::end_tag(ebml_w);
|
||||
// Encode and index the items.
|
||||
|
||||
ebmlivec::start_tag(ebml_w, tag_items);
|
||||
auto items_index = encode_info_for_items(ecx, ebml_w);
|
||||
auto int_writer = write_int;
|
||||
auto item_hasher = hash_node_id;
|
||||
auto items_buckets = create_index[int](items_index, item_hasher);
|
||||
encode_index[int](ebml_w, items_buckets, int_writer);
|
||||
auto items_buckets = create_index(items_index, hash_node_id);
|
||||
encode_index(ebml_w, items_buckets, write_int);
|
||||
ebmlivec::end_tag(ebml_w);
|
||||
// Pad this, since something (LLVM, presumably) is cutting off the
|
||||
// remaining % 4 bytes_ivec.
|
||||
|
|
|
|||
|
|
@ -2261,10 +2261,9 @@ fn lazily_emit_tydesc_glue(&@block_ctxt cx, int field,
|
|||
T_glue_fn(*lcx.ccx),
|
||||
"copy");
|
||||
ti.copy_glue = some[ValueRef](glue_fn);
|
||||
auto tg = make_copy_glue;
|
||||
make_generic_glue(lcx, cx.sp, ti.ty, glue_fn,
|
||||
mgghf_single(tg), ti.ty_params,
|
||||
"take");
|
||||
mgghf_single(make_copy_glue),
|
||||
ti.ty_params, "take");
|
||||
log #fmt("--- lazily_emit_tydesc_glue TAKE %s",
|
||||
ty_to_str(cx.fcx.lcx.ccx.tcx, ti.ty));
|
||||
}
|
||||
|
|
@ -2300,10 +2299,9 @@ fn lazily_emit_tydesc_glue(&@block_ctxt cx, int field,
|
|||
T_glue_fn(*lcx.ccx),
|
||||
"free");
|
||||
ti.free_glue = some[ValueRef](glue_fn);
|
||||
auto dg = make_free_glue;
|
||||
make_generic_glue(lcx, cx.sp, ti.ty, glue_fn,
|
||||
mgghf_single(dg), ti.ty_params,
|
||||
"free");
|
||||
mgghf_single(make_free_glue),
|
||||
ti.ty_params, "free");
|
||||
log #fmt("--- lazily_emit_tydesc_glue FREE %s",
|
||||
ty_to_str(cx.fcx.lcx.ccx.tcx, ti.ty));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -392,9 +392,7 @@ fn mk_rcache() -> creader_cache {
|
|||
bool {
|
||||
ret a._0 == b._0 && a._1 == b._1 && a._2 == b._2;
|
||||
}
|
||||
auto h = hash_cache_entry;
|
||||
auto e = eq_cache_entries;
|
||||
ret map::mk_hashmap[tup(int, uint, uint), t](h, e);
|
||||
ret map::mk_hashmap(hash_cache_entry, eq_cache_entries);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -2618,8 +2616,7 @@ mod unify {
|
|||
alt (unify_mut(expected_elem.mut,
|
||||
actual_elem.mut)) {
|
||||
case (none) {
|
||||
auto err = terr_tuple_mutability;
|
||||
ret ures_err(err);
|
||||
ret ures_err(terr_tuple_mutability);
|
||||
}
|
||||
case (some(?m)) { mut = m; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -312,8 +312,8 @@ fn parse_ty_obj(&parser p, &mutable uint hi) -> ast::ty_ {
|
|||
}
|
||||
fail;
|
||||
}
|
||||
auto f = parse_method_sig;
|
||||
auto meths = parse_seq(token::LBRACE, token::RBRACE, none, f, p);
|
||||
auto meths = parse_seq(token::LBRACE, token::RBRACE, none,
|
||||
parse_method_sig, p);
|
||||
hi = meths.span.hi;
|
||||
ret ast::ty_obj(meths.node);
|
||||
}
|
||||
|
|
@ -1505,9 +1505,8 @@ fn parse_pat(&parser p) -> @ast::pat {
|
|||
let (@ast::pat)[] args;
|
||||
alt (p.peek()) {
|
||||
case (token::LPAREN) {
|
||||
auto f = parse_pat;
|
||||
auto a = parse_seq(token::LPAREN, token::RPAREN,
|
||||
some(token::COMMA), f, p);
|
||||
some(token::COMMA), parse_pat, p);
|
||||
args = a.node;
|
||||
hi = a.span.hi;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue