Skip to content

Commit 8794b7d

Browse files
committed
---
yaml --- r: 474 b: refs/heads/master c: df75a96 h: refs/heads/master v: v3
1 parent d31223b commit 8794b7d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+243
-699
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: 75e46cc4d0fbd8f1a1c4676931119a858fafeacf
2+
refs/heads/master: df75a968c56935cca1c1482a8703eca82c607c62

trunk/.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
*.swp
3131
.hg/
3232
.hgignore
33-
.cproject
34-
.project
3533
lexer.ml
3634
rustboot
3735
rustc

trunk/src/Makefile

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,7 @@ BOOT_CMXS := $(BOOT_MLS:.ml=.cmx)
245245
BOOT_OBJS := $(BOOT_MLS:.ml=.o)
246246
BOOT_CMIS := $(BOOT_MLS:.ml=.cmi)
247247

248-
RUNTIME_CS := rt/sync/sync.cpp \
249-
rt/sync/spin_lock.cpp \
248+
RUNTIME_CS := rt/sync/spin_lock.cpp \
250249
rt/sync/lock_free_queue.cpp \
251250
rt/sync/condition_variable.cpp \
252251
rt/rust.cpp \
@@ -280,8 +279,7 @@ RUNTIME_HDR := rt/globals.h \
280279
rt/rust_message.h \
281280
rt/circular_buffer.h \
282281
rt/util/array_list.h \
283-
rt/util/hash_map.h \
284-
rt/sync/sync.h
282+
rt/util/hash_map.h
285283

286284
RUNTIME_INCS := -Irt/isaac -Irt/uthash
287285
RUNTIME_OBJS := $(RUNTIME_CS:.cpp=$(CFG_OBJ_SUFFIX))
@@ -385,10 +383,7 @@ TASK_XFAILS := test/run-pass/acyclic-unwind.rs \
385383
test/run-pass/threads.rs \
386384
test/run-pass/yield.rs
387385

388-
TEST_XFAILS := test/run-pass/arith-0.rs
389-
390386
TEST_XFAILS_X86 := $(TASK_XFAILS) \
391-
$(TEST_XFAILS) \
392387
test/run-pass/arithmetic-interference.rs \
393388
test/run-pass/bind-obj-ctor.rs \
394389
test/run-pass/child-outlives-parent.rs \
@@ -419,9 +414,7 @@ TEST_XFAILS_X86 := $(TASK_XFAILS) \
419414
test/compile-fail/writing-through-read-alias.rs
420415

421416
TEST_XFAILS_LLVM := $(TASK_XFAILS) \
422-
$(TEST_XFAILS) \
423417
$(addprefix test/run-pass/, \
424-
arith-1.rs \
425418
acyclic-unwind.rs \
426419
alt-pattern-simple.rs \
427420
alt-tag.rs \
@@ -430,8 +423,6 @@ TEST_XFAILS_LLVM := $(TASK_XFAILS) \
430423
autoderef-full-lval.rs \
431424
autoderef-objfn.rs \
432425
basic.rs \
433-
basic-1.rs \
434-
basic-2.rs \
435426
bind-obj-ctor.rs \
436427
bind-thunk.rs \
437428
bind-trivial.rs \
@@ -472,7 +463,6 @@ TEST_XFAILS_LLVM := $(TASK_XFAILS) \
472463
i32-sub.rs \
473464
i8-incr.rs \
474465
import.rs \
475-
inner-module.rs \
476466
integral-indexing.rs \
477467
int-lib.rs \
478468
iter-range.rs \

trunk/src/boot/be/abi.ml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ let box_gc_header_size = 4;;
4141

4242
let box_gc_malloc_return_adjustment = 3;;
4343

44-
let stk_field_valgrind_id = 0;;
44+
let stk_field_valgrind_id = 0 + 1;;
4545
let stk_field_limit = stk_field_valgrind_id + 1;;
4646
let stk_field_data = stk_field_limit + 1;;
4747

@@ -121,8 +121,7 @@ type abi =
121121
-> Common.size (* callsz *)
122122
-> Common.nabi
123123
-> Common.fixup (* grow_task *)
124-
-> bool (* is_obj_fn *)
125-
-> unit);
124+
-> unit);
126125

127126
abi_emit_fn_epilogue: (Il.emitter -> unit);
128127

trunk/src/boot/be/il.ml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -901,13 +901,6 @@ let get_element_ptr
901901
(string_of_cell fmt mem_cell)
902902
;;
903903

904-
let ptr_cast (cell:cell) (rty:referent_ty) : cell =
905-
match cell with
906-
Mem (mem, _) -> Mem (mem, rty)
907-
| Reg (reg, AddrTy _) -> Reg (reg, AddrTy rty)
908-
| _ -> bug () "expected address cell in Il.ptr_cast"
909-
;;
910-
911904
(*
912905
* Local Variables:
913906
* fill-column: 78;

trunk/src/boot/be/x86.ml

Lines changed: 7 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,6 @@ let restore_frame_base (e:Il.emitter) (base:Il.reg) (retpc:Il.reg) : unit =
593593
*
594594
* *ebp+20+(4*N) = [argN ]
595595
* ...
596-
* *ebp+28 = [arg2 ] = obj/closure ptr
597596
* *ebp+24 = [arg1 ] = task ptr
598597
* *ebp+20 = [arg0 ] = out ptr
599598
* *ebp+16 = [retpc ]
@@ -1034,7 +1033,7 @@ let unwind_glue
10341033

10351034

10361035
(* Puts result in eax; clobbers ecx, edx in the process. *)
1037-
let rec calculate_sz (e:Il.emitter) (size:size) (in_obj:bool) : unit =
1036+
let rec calculate_sz (e:Il.emitter) (size:size) : unit =
10381037
let emit = Il.emit e in
10391038
let mov dst src = emit (Il.umov dst src) in
10401039
let push x = emit (Il.Push x) in
@@ -1046,48 +1045,11 @@ let rec calculate_sz (e:Il.emitter) (size:size) (in_obj:bool) : unit =
10461045
let mul x y = emit (Il.binary Il.UMUL (rc x) (ro x) (ro y)) in
10471046
let subi x y = emit (Il.binary Il.SUB (rc x) (ro x) (immi y)) in
10481047
let eax_gets_a_and_ecx_gets_b a b =
1049-
calculate_sz e b in_obj;
1048+
calculate_sz e b;
10501049
push (ro eax);
1051-
calculate_sz e a in_obj;
1050+
calculate_sz e a;
10521051
pop (rc ecx);
10531052
in
1054-
1055-
let ty_param_n_in_obj_fn i =
1056-
(*
1057-
* Here we are trying to immitate the obj-fn branch of
1058-
* Trans.get_ty_params_of_current_frame while using
1059-
* eax as our only register.
1060-
*)
1061-
1062-
(* Bind all the referent types we'll need... *)
1063-
1064-
let obj_body_rty = Semant.obj_closure_rty word_bits in
1065-
let tydesc_rty = Semant.tydesc_rty word_bits in
1066-
(* Note that we cheat here and pretend only to have i+1 tydescs (because
1067-
we GEP to the i'th while still in this function, so no one outside
1068-
finds out about the lie. *)
1069-
let tydesc_tys = Array.init (i + 1) (fun _ -> Ast.TY_type) in
1070-
let ty_params_ty = Ast.TY_tup tydesc_tys in
1071-
let ty_params_rty = Semant.referent_type word_bits ty_params_ty in
1072-
1073-
(* ... and fetch! *)
1074-
1075-
mov (rc eax) (Il.Cell closure_ptr);
1076-
let obj_body = word_n (h eax) Abi.box_rc_field_body in
1077-
let obj_body = Il.ptr_cast obj_body obj_body_rty in
1078-
let tydesc_ptr = get_element_ptr obj_body Abi.obj_body_elt_tydesc in
1079-
1080-
mov (rc eax) (Il.Cell tydesc_ptr);
1081-
let tydesc = Il.ptr_cast (word_at (h eax)) tydesc_rty in
1082-
let ty_params_ptr =
1083-
get_element_ptr tydesc Abi.tydesc_field_first_param
1084-
in
1085-
1086-
mov (rc eax) (Il.Cell ty_params_ptr);
1087-
let ty_params = Il.ptr_cast (word_at (h eax)) ty_params_rty in
1088-
get_element_ptr ty_params i
1089-
in
1090-
10911053
match size with
10921054
SIZE_fixed i ->
10931055
mov (rc eax) (immi i)
@@ -1099,23 +1061,15 @@ let rec calculate_sz (e:Il.emitter) (size:size) (in_obj:bool) : unit =
10991061
mov (rc eax) (imm (Asm.M_POS f))
11001062

11011063
| SIZE_param_size i ->
1102-
if in_obj
1103-
then
1104-
mov (rc eax) (Il.Cell (ty_param_n_in_obj_fn i))
1105-
else
1106-
mov (rc eax) (Il.Cell (ty_param_n i));
1064+
mov (rc eax) (Il.Cell (ty_param_n i));
11071065
mov (rc eax) (Il.Cell (word_n (h eax) Abi.tydesc_field_size))
11081066

11091067
| SIZE_param_align i ->
1110-
if in_obj
1111-
then
1112-
mov (rc eax) (Il.Cell (ty_param_n_in_obj_fn i))
1113-
else
1114-
mov (rc eax) (Il.Cell (ty_param_n i));
1068+
mov (rc eax) (Il.Cell (ty_param_n i));
11151069
mov (rc eax) (Il.Cell (word_n (h eax) Abi.tydesc_field_align))
11161070

11171071
| SIZE_rt_neg a ->
1118-
calculate_sz e a in_obj;
1072+
calculate_sz e a;
11191073
neg eax
11201074

11211075
| SIZE_rt_add (a, b) ->
@@ -1231,7 +1185,6 @@ let fn_prologue
12311185
(callsz:size)
12321186
(nabi:nabi)
12331187
(grow_task_fixup:fixup)
1234-
(is_obj_fn:bool)
12351188
: unit =
12361189

12371190
let esi_n = word_n (h esi) in
@@ -1361,7 +1314,7 @@ let fn_prologue
13611314
emit (Il.jmp Il.JA Il.CodeNone);
13621315

13631316
(* Calculate dynamic frame size. *)
1364-
calculate_sz e call_and_frame_sz is_obj_fn;
1317+
calculate_sz e call_and_frame_sz;
13651318
((ro eax), Some primordial_underflow_jmp_pc)
13661319
end
13671320
| Some e -> ((imm e), None)

trunk/src/boot/me/dwarf.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,7 +1677,7 @@ let dwarf_visitor
16771677
in
16781678

16791679
let record trec =
1680-
let rty = referent_type word_bits (Ast.TY_rec trec) in
1680+
let rty = referent_type abi (Ast.TY_rec trec) in
16811681
let rty_sz = Il.referent_ty_size abi.Abi.abi_word_bits in
16821682
let fix = new_fixup "record type DIE" in
16831683
let die = DEF (fix, SEQ [|
@@ -1926,7 +1926,7 @@ let dwarf_visitor
19261926
* I'm a bit surprised by that!
19271927
*)
19281928

1929-
let rty = referent_type word_bits (Ast.TY_tag ttag) in
1929+
let rty = referent_type abi (Ast.TY_tag ttag) in
19301930
let rty_sz = Il.referent_ty_size abi.Abi.abi_word_bits in
19311931
let rtys =
19321932
match rty with

trunk/src/boot/me/layout.ml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ let layout_visitor
113113
| Il.CodeTy -> true
114114
| Il.NilTy -> false
115115
in
116-
rt_in_mem (slot_referent_type cx.ctxt_abi.Abi.abi_word_bits slot)
116+
rt_in_mem (slot_referent_type cx.ctxt_abi slot)
117117
in
118118

119119
let rty_sz rty = Il.referent_ty_size cx.ctxt_abi.Abi.abi_word_bits rty in
@@ -142,7 +142,7 @@ let layout_visitor
142142
: unit =
143143
let accum (off,align) id : (size * size) =
144144
let slot = get_slot cx id in
145-
let rt = slot_referent_type cx.ctxt_abi.Abi.abi_word_bits slot in
145+
let rt = slot_referent_type cx.ctxt_abi slot in
146146
let (elt_size, elt_align) = rty_layout rt in
147147
if vregs_ok
148148
&& (is_subword_size elt_size)
@@ -170,9 +170,7 @@ let layout_visitor
170170
then elt_off
171171
else neg_sz (add_sz elt_off elt_size)
172172
in
173-
Stack.push
174-
(slot_referent_type cx.ctxt_abi.Abi.abi_word_bits slot)
175-
slot_accum;
173+
Stack.push (slot_referent_type cx.ctxt_abi slot) slot_accum;
176174
iflog
177175
begin
178176
fun _ ->

0 commit comments

Comments
 (0)