Skip to content

Commit 357fc22

Browse files
committed
---
yaml --- r: 6719 b: refs/heads/master c: ce24ce1 h: refs/heads/master i: 6717: ab851fe 6715: 777a1f2 6711: 86863fb 6703: 77adc3f 6687: aa69266 6655: bbeb897 v: v3
1 parent c92feb4 commit 357fc22

File tree

15 files changed

+707
-556
lines changed

15 files changed

+707
-556
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: a87d80f6e28f28b091f11bd55dd4c4a51b165a91
2+
refs/heads/master: ce24ce1b5f890f0774baa2db800aafb500d518b7

trunk/src/comp/back/abi.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,8 @@ const fn_field_code: int = 0;
7373
const fn_field_box: int = 1;
7474

7575
const closure_elt_tydesc: int = 0;
76-
const closure_elt_bindings: int = 1;
77-
//const closure_elt_n_ty_params: int = 2;
78-
const closure_elt_ty_params: int = 2; // 3;
76+
const closure_elt_ty_params: int = 1;
77+
const closure_elt_bindings: int = 2;
7978

8079
const vec_elt_fill: int = 0;
8180

trunk/src/comp/back/link.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,16 @@ fn link_binary(sess: session::session,
588588
let long_libname =
589589
std::os::dylib_filename(#fmt("%s-%s-%s",
590590
lm.name, lm.extras_hash, lm.vers));
591+
log "link_meta.name: " + lm.name;
592+
log "long_libname: " + long_libname;
593+
log "out_filename: " + out_filename;
594+
log "dirname(out_filename): " + fs::dirname(out_filename);
595+
591596
fs::connect(fs::dirname(out_filename), long_libname)
592597
} else { out_filename };
593598

599+
log "output: " + output;
600+
594601
// The default library location, we need this to find the runtime.
595602
// The location of crates will be determined as needed.
596603
let stage: str = "-L" + sess.filesearch().get_target_lib_path();

trunk/src/comp/back/upcall.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ type upcalls =
1717
shared_malloc: ValueRef,
1818
shared_free: ValueRef,
1919
mark: ValueRef,
20-
clone_type_desc: ValueRef,
20+
create_shared_type_desc: ValueRef,
21+
free_shared_type_desc: ValueRef,
2122
get_type_desc: ValueRef,
2223
vec_grow: ValueRef,
2324
vec_push: ValueRef,
@@ -64,9 +65,11 @@ fn declare_upcalls(targ_cfg: @session::config,
6465
dv("shared_free", [T_ptr(T_i8())]),
6566
mark:
6667
d("mark", [T_ptr(T_i8())], int_t),
67-
clone_type_desc:
68-
d("clone_type_desc", [T_ptr(tydesc_type)],
68+
create_shared_type_desc:
69+
d("create_shared_type_desc", [T_ptr(tydesc_type)],
6970
T_ptr(tydesc_type)),
71+
free_shared_type_desc:
72+
dv("free_shared_type_desc", [T_ptr(tydesc_type)]),
7073
get_type_desc:
7174
d("get_type_desc",
7275
[T_ptr(T_nil()), size_t,

trunk/src/comp/driver/rustc.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,10 @@ fn build_output_filenames(ifile: str, ofile: option::t<str>,
561561
obj_filename = base_filename + "." + suffix;
562562

563563
if sess.building_library() {
564-
saved_out_filename = std::os::dylib_filename(base_filename);
564+
let dirname = fs::dirname(base_filename);
565+
let basename = fs::basename(base_filename);
566+
let dylibname = std::os::dylib_filename(basename);
567+
saved_out_filename = fs::connect(dirname, dylibname);
565568
} else {
566569
saved_out_filename = base_filename;
567570
}

trunk/src/comp/middle/shape.rs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const shape_obj: u8 = 19u8;
5151
const shape_res: u8 = 20u8;
5252
const shape_var: u8 = 21u8;
5353
const shape_uniq: u8 = 22u8;
54+
const shape_opaque_closure: u8 = 23u8; // the closure itself.
5455

5556
// FIXME: This is a bad API in trans_common.
5657
fn C_u8(n: u8) -> ValueRef { ret trans_common::C_u8(n as uint); }
@@ -384,9 +385,6 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t, ty_param_map: [uint],
384385
}
385386
add_substr(s, sub);
386387
}
387-
ty::ty_fn(_, _, _, _, _) {
388-
s += [shape_fn];
389-
}
390388
ty::ty_native_fn(_, _) { s += [shape_u32]; }
391389
ty::ty_obj(_) { s += [shape_obj]; }
392390
ty::ty_res(did, raw_subt, tps) {
@@ -412,19 +410,18 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t, ty_param_map: [uint],
412410
s += [shape_var, n as u8];
413411
} else {
414412
// Find the type parameter in the parameter list.
415-
let found = false;
416-
let i = 0u;
417-
while i < vec::len(ty_param_map) {
418-
if n == ty_param_map[i] {
419-
s += [shape_var, i as u8];
420-
found = true;
421-
break;
422-
}
423-
i += 1u;
413+
alt vec::position(n, ty_param_map) {
414+
some(i) { s += [shape_var, i as u8]; }
415+
none. { fail "ty param not found in ty_param_map"; }
424416
}
425-
assert (found);
426417
}
427418
}
419+
ty::ty_fn(_, _, _, _, _) {
420+
s += [shape_fn];
421+
}
422+
ty::ty_opaque_closure. {
423+
s += [shape_opaque_closure];
424+
}
428425
}
429426

430427
ret s;

0 commit comments

Comments
 (0)