From b2b72a08dbd18e384972dd835a93df9167380247 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Wed, 25 Aug 2010 12:07:03 -0700 Subject: Janitorial work on obj box / body / field terminology, following froystig's brave lead. --- src/boot/be/abi.ml | 6 ++++-- src/boot/be/x86.ml | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/boot/be') 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); -- cgit v1.2.3