Skip to content

Commit bc673ef

Browse files
committed
---
yaml --- r: 11999 b: refs/heads/master c: 56828d4 h: refs/heads/master i: 11997: 5b0179b 11995: ce3b593 11991: 666270b 11983: 3f7ce5c 11967: aec07de v: v3
1 parent eccaebd commit bc673ef

File tree

4 files changed

+16
-18
lines changed

4 files changed

+16
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: d282481c123e9a1155179c4b2338adbcba7589a3
2+
refs/heads/master: 56828d49fd469614ffea46bb6ea1053876ba2bfe
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/rustc/middle/trans/base.rs

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4162,20 +4162,20 @@ fn get_pair_fn_ty(llpairty: TypeRef) -> TypeRef {
41624162
ret struct_elt(llpairty, 0u);
41634163
}
41644164

4165-
fn register_fn(ccx: @crate_ctxt, sp: span, path: path, flav: str,
4165+
fn register_fn(ccx: @crate_ctxt, sp: span, path: path,
41664166
node_id: ast::node_id) -> ValueRef {
41674167
let t = ty::node_id_to_type(ccx.tcx, node_id);
4168-
register_fn_full(ccx, sp, path, flav, node_id, t)
4168+
register_fn_full(ccx, sp, path, node_id, t)
41694169
}
41704170

4171-
fn register_fn_full(ccx: @crate_ctxt, sp: span, path: path, flav: str,
4171+
fn register_fn_full(ccx: @crate_ctxt, sp: span, path: path,
41724172
node_id: ast::node_id, node_type: ty::t) -> ValueRef {
41734173
let llfty = type_of_fn_from_ty(ccx, node_type);
4174-
register_fn_fuller(ccx, sp, path, flav, node_id, node_type,
4174+
register_fn_fuller(ccx, sp, path, node_id, node_type,
41754175
lib::llvm::CCallConv, llfty)
41764176
}
41774177

4178-
fn register_fn_fuller(ccx: @crate_ctxt, sp: span, path: path, _flav: str,
4178+
fn register_fn_fuller(ccx: @crate_ctxt, sp: span, path: path,
41794179
node_id: ast::node_id, node_type: ty::t,
41804180
cc: lib::llvm::CallConv, llfty: TypeRef) -> ValueRef {
41814181
let ps: str = mangle_exported_name(ccx, path, node_type);
@@ -4316,7 +4316,7 @@ fn get_item_val(ccx: @crate_ctxt, id: ast::node_id) -> ValueRef {
43164316
}
43174317
ast::item_fn(decl, _, _) {
43184318
let llfn = if decl.purity != ast::crust_fn {
4319-
register_fn(ccx, i.span, my_path, "fn", i.id)
4319+
register_fn(ccx, i.span, my_path, i.id)
43204320
} else {
43214321
native::register_crust_fn(ccx, i.span, my_path, i.id)
43224322
};
@@ -4331,7 +4331,7 @@ fn get_item_val(ccx: @crate_ctxt, id: ast::node_id) -> ValueRef {
43314331
// find the dtor symbol.
43324332
let t = ty::node_id_to_type(ccx.tcx, dtor_id);
43334333
register_fn_full(ccx, i.span, my_path + [path_name("dtor")],
4334-
"res_dtor", i.id, t)
4334+
i.id, t)
43354335
}
43364336
}
43374337
}
@@ -4340,8 +4340,7 @@ fn get_item_val(ccx: @crate_ctxt, id: ast::node_id) -> ValueRef {
43404340
let mty = ty::node_id_to_type(ccx.tcx, id);
43414341
let pth = *pth + [path_name(ccx.names("meth")),
43424342
path_name(m.ident)];
4343-
let llfn = register_fn_full(ccx, m.span, pth, "impl_method",
4344-
id, mty);
4343+
let llfn = register_fn_full(ccx, m.span, pth, id, mty);
43454344
set_inline_hint_if_appr(m.attrs, llfn);
43464345
llfn
43474346
}
@@ -4353,13 +4352,12 @@ fn get_item_val(ccx: @crate_ctxt, id: ast::node_id) -> ValueRef {
43534352
alt check i.node {
43544353
ast::item_res(_, _, _, _, _) {
43554354
let my_path = item_path(ccx, i);
4356-
let llctor = register_fn(ccx, i.span, my_path, "res_ctor",
4357-
id);
4355+
let llctor = register_fn(ccx, i.span, my_path, id);
43584356
set_inline_hint(llctor);
43594357
llctor
43604358
}
43614359
ast::item_class(_, _, ctor) {
4362-
register_fn(ccx, i.span, item_path(ccx, i), "ctor", id)
4360+
register_fn(ccx, i.span, item_path(ccx, i), id)
43634361
}
43644362
}
43654363
}
@@ -4368,7 +4366,7 @@ fn get_item_val(ccx: @crate_ctxt, id: ast::node_id) -> ValueRef {
43684366
let pth = *pth + [path_name(enm.ident), path_name(v.node.name)];
43694367
let llfn = alt check enm.node {
43704368
ast::item_enum(_, _) {
4371-
register_fn(ccx, v.span, pth, "enum", id)
4369+
register_fn(ccx, v.span, pth, id)
43724370
}
43734371
};
43744372
set_inline_hint(llfn);

trunk/src/rustc/middle/trans/closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ fn trans_expr_fn(bcx: block,
370370
let sub_path = bcx.fcx.path + [path_name("anon")];
371371
let s = mangle_internal_name_by_path(ccx, sub_path);
372372
let llfn = decl_internal_cdecl_fn(ccx.llmod, s, llfnty);
373-
register_fn(ccx, sp, sub_path, "anon fn", id);
373+
register_fn(ccx, sp, sub_path, id);
374374

375375
let trans_closure_env = fn@(ck: ty::closure_kind) -> ValueRef {
376376
let cap_vars = capture::compute_capture_vars(

trunk/src/rustc/middle/trans/native.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -873,12 +873,12 @@ fn register_crust_fn(ccx: @crate_ctxt, sp: span,
873873
let ret_def = !ty::type_is_bot(ret_ty) && !ty::type_is_nil(ret_ty);
874874
let x86_64 = x86_64_tys(llargtys, llretty, ret_def);
875875
decl_x86_64_fn(x86_64) {|fnty|
876-
register_fn_fuller(ccx, sp, path, "crust fn", node_id,
876+
register_fn_fuller(ccx, sp, path, node_id,
877877
t, lib::llvm::CCallConv, fnty)
878878
}
879879
} else {
880880
let llfty = T_fn(llargtys, llretty);
881-
register_fn_fuller(ccx, sp, path, "crust fn", node_id,
881+
register_fn_fuller(ccx, sp, path, node_id,
882882
t, lib::llvm::CCallConv, llfty)
883883
}
884884
}
@@ -920,7 +920,7 @@ fn decl_native_fn(ccx: @crate_ctxt, i: @ast::native_item,
920920
// For true external functions: create a rust wrapper
921921
// and link to that. The rust wrapper will handle
922922
// switching to the C stack.
923-
register_fn(ccx, i.span, pth, "native fn", i.id)
923+
register_fn(ccx, i.span, pth, i.id)
924924
}
925925
}
926926
}

0 commit comments

Comments
 (0)