Skip to content

Commit c92feb4

Browse files
author
Elly Jones
committed
---
yaml --- r: 6718 b: refs/heads/master c: a87d80f h: refs/heads/master v: v3
1 parent ab851fe commit c92feb4

File tree

16 files changed

+561
-711
lines changed

16 files changed

+561
-711
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: aa3d58c8c0a2e52b2893328a8d1940e5fbd41303
2+
refs/heads/master: a87d80f6e28f28b091f11bd55dd4c4a51b165a91

trunk/src/cargo/cargo.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,13 @@ fn install_one_crate(c: cargo, _path: str, cf: str, _p: pkg) {
154154
name = str::slice(name, 0u, ri as uint);
155155
}
156156
log #fmt["Installing: %s", name];
157-
let old = fs::list_dir(".");
158-
run::run_program("rustc", [cf]);
159-
let new = fs::list_dir(".");
157+
let old = vec::map({|x| str::slice(x, 2u, str::byte_len(x))}, fs::list_dir("."));
158+
run::run_program("rustc", [name + ".rc"]);
159+
let new = vec::map({|x| str::slice(x, 2u, str::byte_len(x))}, fs::list_dir("."));
160160
let created = vec::filter::<str>({ |n| !vec::member::<str>(n, old) }, new);
161161
for ct: str in created {
162-
if str::ends_with(ct, os::exec_suffix()) {
162+
if (os::exec_suffix() != "" && str::ends_with(ct, os::exec_suffix())) ||
163+
(os::exec_suffix() == "" && !str::starts_with(ct, "lib")) {
163164
log #fmt[" bin: %s", ct];
164165
// FIXME: need libstd fs::copy or something
165166
run::run_program("cp", [ct, c.bindir]);

trunk/src/comp/back/abi.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ 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_ty_params: int = 1;
77-
const closure_elt_bindings: int = 2;
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;
7879

7980
const vec_elt_fill: int = 0;
8081

trunk/src/comp/back/link.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -588,16 +588,9 @@ 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-
596591
fs::connect(fs::dirname(out_filename), long_libname)
597592
} else { out_filename };
598593

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

trunk/src/comp/back/upcall.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ type upcalls =
1717
shared_malloc: ValueRef,
1818
shared_free: ValueRef,
1919
mark: ValueRef,
20-
create_shared_type_desc: ValueRef,
21-
free_shared_type_desc: ValueRef,
20+
clone_type_desc: ValueRef,
2221
get_type_desc: ValueRef,
2322
vec_grow: ValueRef,
2423
vec_push: ValueRef,
@@ -65,11 +64,9 @@ fn declare_upcalls(targ_cfg: @session::config,
6564
dv("shared_free", [T_ptr(T_i8())]),
6665
mark:
6766
d("mark", [T_ptr(T_i8())], int_t),
68-
create_shared_type_desc:
69-
d("create_shared_type_desc", [T_ptr(tydesc_type)],
67+
clone_type_desc:
68+
d("clone_type_desc", [T_ptr(tydesc_type)],
7069
T_ptr(tydesc_type)),
71-
free_shared_type_desc:
72-
dv("free_shared_type_desc", [T_ptr(tydesc_type)]),
7370
get_type_desc:
7471
d("get_type_desc",
7572
[T_ptr(T_nil()), size_t,

trunk/src/comp/driver/rustc.rs

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

563563
if sess.building_library() {
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);
564+
saved_out_filename = std::os::dylib_filename(base_filename);
568565
} else {
569566
saved_out_filename = base_filename;
570567
}

trunk/src/comp/middle/shape.rs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ 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.
5554

5655
// FIXME: This is a bad API in trans_common.
5756
fn C_u8(n: u8) -> ValueRef { ret trans_common::C_u8(n as uint); }
@@ -385,6 +384,9 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t, ty_param_map: [uint],
385384
}
386385
add_substr(s, sub);
387386
}
387+
ty::ty_fn(_, _, _, _, _) {
388+
s += [shape_fn];
389+
}
388390
ty::ty_native_fn(_, _) { s += [shape_u32]; }
389391
ty::ty_obj(_) { s += [shape_obj]; }
390392
ty::ty_res(did, raw_subt, tps) {
@@ -410,18 +412,19 @@ fn shape_of(ccx: @crate_ctxt, t: ty::t, ty_param_map: [uint],
410412
s += [shape_var, n as u8];
411413
} else {
412414
// Find the type parameter in the parameter list.
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"; }
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;
416424
}
425+
assert (found);
417426
}
418427
}
419-
ty::ty_fn(_, _, _, _, _) {
420-
s += [shape_fn];
421-
}
422-
ty::ty_opaque_closure. {
423-
s += [shape_opaque_closure];
424-
}
425428
}
426429

427430
ret s;

0 commit comments

Comments
 (0)