aboutsummaryrefslogtreecommitdiff
path: root/src/boot/be
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-08-25 12:07:03 -0700
committerGraydon Hoare <[email protected]>2010-08-25 12:08:05 -0700
commitb2b72a08dbd18e384972dd835a93df9167380247 (patch)
tree5a660cce5790a4ad28650bcbcf336ee44f68a46e /src/boot/be
parentFix ghastly typestate bug breaking nested functions. (diff)
downloadrust-b2b72a08dbd18e384972dd835a93df9167380247.tar.xz
rust-b2b72a08dbd18e384972dd835a93df9167380247.zip
Janitorial work on obj box / body / field terminology, following froystig's brave lead.
Diffstat (limited to 'src/boot/be')
-rw-r--r--src/boot/be/abi.ml6
-rw-r--r--src/boot/be/x86.ml4
2 files changed, 6 insertions, 4 deletions
diff --git a/src/boot/be/abi.ml b/src/boot/be/abi.ml
index 5bdf21fa..5dd6037b 100644
--- a/src/boot/be/abi.ml
+++ b/src/boot/be/abi.ml
@@ -47,13 +47,15 @@ let stk_field_data = stk_field_limit + 1;;
(* Both obj and fn are two-word "bindings": One word points to some
* static dispatch information (vtbl or thunk), and the other points to
- * some bag of bound data (object-body or closure). *)
+ * some bag of bound data (object-body or closure).
+ *)
let binding_field_dispatch = 0;;
let binding_field_bound_data = 1;;
let obj_field_vtbl = binding_field_dispatch;;
-let obj_field_body_box = binding_field_bound_data;;
+let obj_field_box = binding_field_bound_data;;
+
let obj_body_elt_tydesc = 0;;
let obj_body_elt_fields = 1;;
diff --git a/src/boot/be/x86.ml b/src/boot/be/x86.ml
index f879027b..202f3589 100644
--- a/src/boot/be/x86.ml
+++ b/src/boot/be/x86.ml
@@ -1055,7 +1055,7 @@ let rec calculate_sz (e:Il.emitter) (size:size) (in_obj:bool) : unit =
(* Bind all the referent types we'll need... *)
- let obj_body_rty = Semant.obj_closure_rty word_bits in
+ let obj_box_rty = Semant.obj_box_rty word_bits in
let tydesc_rty = Semant.tydesc_rty word_bits in
(* Note that we cheat here and pretend only to have i+1 tydescs (because
we GEP to the i'th while still in this function, so no one outside
@@ -1068,7 +1068,7 @@ let rec calculate_sz (e:Il.emitter) (size:size) (in_obj:bool) : unit =
mov (rc eax) (Il.Cell closure_ptr);
let obj_body = word_n (h eax) Abi.box_rc_field_body in
- let obj_body = Il.ptr_cast obj_body obj_body_rty in
+ let obj_body = Il.ptr_cast obj_body obj_box_rty in
let tydesc_ptr = get_element_ptr obj_body Abi.obj_body_elt_tydesc in
mov (rc eax) (Il.Cell tydesc_ptr);