aboutsummaryrefslogtreecommitdiff
path: root/src/boot/be
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-08-25 14:42:28 -0700
committerGraydon Hoare <[email protected]>2010-08-25 14:42:28 -0700
commit8e0f486ea6fb168f5ffd61febd71217e5d16d1bf (patch)
treef2e631cb7c381092457c7aa34ed7d595afa2d10f /src/boot/be
parentFix edge case in uint->string conversion. (diff)
downloadrust-8e0f486ea6fb168f5ffd61febd71217e5d16d1bf.tar.xz
rust-8e0f486ea6fb168f5ffd61febd71217e5d16d1bf.zip
First pass of updating the in-memory layout of closures, for issue 81.
Diffstat (limited to 'src/boot/be')
-rw-r--r--src/boot/be/abi.ml17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/boot/be/abi.ml b/src/boot/be/abi.ml
index 5dd6037b..32c9f44a 100644
--- a/src/boot/be/abi.ml
+++ b/src/boot/be/abi.ml
@@ -45,9 +45,9 @@ let stk_field_valgrind_id = 0;;
let stk_field_limit = stk_field_valgrind_id + 1;;
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).
+(* Both obj and fn are two-word "bindings": One word points to some static
+ * dispatch information (vtbl, thunk, callee), and the other points to some
+ * box of bound data (object-body or closure).
*)
let binding_field_dispatch = 0;;
@@ -59,11 +59,12 @@ let obj_field_box = binding_field_bound_data;;
let obj_body_elt_tydesc = 0;;
let obj_body_elt_fields = 1;;
-let fn_field_thunk = binding_field_dispatch;;
-let fn_field_closure = binding_field_bound_data;;
-let closure_elt_rc = 0;;
-let closure_elt_target = 1;;
-let closure_elt_bound_args = 2;;
+let fn_field_code = binding_field_dispatch;;
+let fn_field_box = binding_field_bound_data;;
+
+let closure_body_elt_tydesc = 0;;
+let closure_body_elt_target = 1;;
+let closure_body_elt_bound_args = 2;;
let tag_elt_discriminant = 0;;
let tag_elt_variant = 1;;