Skip to content

Commit 9a72955

Browse files
committed
---
yaml --- r: 3118 b: refs/heads/master c: 59a254a h: refs/heads/master v: v3
1 parent 891e0e6 commit 9a72955

File tree

7 files changed

+13
-30
lines changed

7 files changed

+13
-30
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: 405c164f023e3aceb64d0eeee1591de391201826
2+
refs/heads/master: 59a254ae32ef9e3878c5b1c11ab5a3beef0a12ff

trunk/src/comp/back/link.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ mod write {
209209
*
210210
* There are a few issues to handle:
211211
*
212-
* - Linkers operate on a flat namespace, so we have to flatten names.
212+
* - Linnkers operate on a flat namespace, so we have to flatten names.
213213
* We do this using the C++ namespace-mangling technique. Foo::bar
214214
* symbols and such.
215215
*
@@ -221,15 +221,15 @@ mod write {
221221
* symbols in the same process before you're even hitting birthday-paradox
222222
* collision probability.
223223
*
224-
* - Symbols in dirrerent crates but with same names "within" the crate need
224+
* - Symbols in different crates but with same names "within" the crate need
225225
* to get different linkage-names.
226226
*
227227
* So here is what we do:
228228
*
229229
* - Separate the meta tags into two sets: exported and local. Only work with
230230
* the exported ones when considering linkage.
231231
*
232-
* - Consider two exported tags as special (and madatory): name and vers.
232+
* - Consider two exported tags as special (and mandatory): name and vers.
233233
* Every crate gets them; if it doesn't name them explicitly we infer them
234234
* as basename(crate) and "0.1", respectively. Call these CNAME, CVERS.
235235
*

trunk/src/comp/middle/trans.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5842,8 +5842,7 @@ fn mk_spawn_wrapper(&@block_ctxt cx, &@ast::expr func, &ty::t args_ty) ->
58425842
let str wrap_name =
58435843
mangle_internal_name_by_path_and_seq(cx.fcx.lcx.ccx, cx.fcx.lcx.path,
58445844
"spawn_wrapper");
5845-
auto llfndecl = decl_cdecl_fn(llmod, wrap_name, wrapper_fn_type);
5846-
5845+
auto llfndecl = decl_fastcall_fn(llmod, wrap_name, wrapper_fn_type);
58475846
auto fcx = new_fn_ctxt(cx.fcx.lcx, cx.sp, llfndecl);
58485847
auto fbcx = new_top_block_ctxt(fcx);
58495848
// 3u to skip the three implicit args

trunk/src/rt/main.ll.in

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,7 @@ declare i32 @rust_start(i32, i32, i32, i32)
1616

1717
%task = type { i32, i32, i32, i32, i32, i32, i32, i32 }
1818

19-
define void @_rust_main_wrap(i1* nocapture, %task *, %2* nocapture, %5 *)
20-
{
21-
tail call fastcc void @_rust_main(i1* %0, %task *%1, %2* nocapture %2, %5 *%3)
22-
ret void
23-
}
24-
2519
define i32 @"MAIN"(i32, i32) {
26-
%3 = tail call i32 @rust_start(i32 ptrtoint (void (i1*, %task*, %2*, %5*)* @_rust_main_wrap to i32), i32 %0, i32 %1, i32 ptrtoint (%0* @_rust_crate_map_toplevel to i32))
20+
%3 = tail call i32 @rust_start(i32 ptrtoint (void (i1*, %task*, %2*, %5*)* @_rust_main to i32), i32 %0, i32 %1, i32 ptrtoint (%0* @_rust_crate_map_toplevel to i32))
2721
ret i32 %3
2822
}

trunk/src/rt/rust.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,12 @@ rust_start(uintptr_t main_fn, int argc, char **argv, void* crate_map) {
9393
DLOG(dom, dom, "startup: arg[%d] = '%s'", i, args->argv[i]);
9494
}
9595

96-
dom->root_task->start(main_fn,
96+
/*
97+
uintptr_t main_args[4] = {0, 0, 0, (uintptr_t)args->args};
98+
dom->root_task->start(main_fn,
99+
(uintptr_t)&main_args, sizeof(main_args));
100+
*/
101+
dom->root_task->start(main_fn,
97102
(uintptr_t)args->args, sizeof(args->args));
98103

99104
int ret = dom->start_main_loop();

trunk/src/rt/rust_task.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ struct spawn_args {
118118
rust_task *task;
119119
uintptr_t a3;
120120
uintptr_t a4;
121-
void (*CDECL f)(int *, rust_task *,
121+
void (*FASTCALL f)(int *, rust_task *,
122122
uintptr_t, uintptr_t);
123123
};
124124

trunk/src/snapshots.txt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
S 2011-06-15 02018fe
2-
linux-i386 74661121d9ea02881abd77e488f448038268c4df
3-
macos-i386 4942eeb8897d75cbdb8cf15bef3b9bc941bc9f34
4-
winnt-i386 b8cf72007bf751062de0802984e7e5a68b66ae61
5-
6-
S 2011-06-15 92bd350
7-
linux-i386 145b68488a780623cc31c5e043c6770007273f80
8-
macos-i386 d3149431f12603927bb211f53f8572fc188eb7d2
9-
winnt-i386 8ee37c22195ce180961db1fad013a0743cf97cdd
10-
11-
S 2011-06-15 01ea27b
12-
linux-i386 10a8fe7ed1ea30508a06f2e883e2177e14af7b1c
13-
macos-i386 d431f6e57c331c12fd1ec0ffcb2f567ef5e22c35
14-
winnt-i386 096e4dd5ddfef37f9e3c3cb55037041b2198cc9a
15-
161
S 2011-06-14 c3015b8
172
linux-i386 b091d33519a1bbf6cf12ee1954a1607940ae3915
183
macos-i386 7d47cece095a7b30f5a3e2467417652d3b2353e5

0 commit comments

Comments
 (0)