From 62d62ce4da7b719c9ea1c65e916f1702c820f7d6 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Thu, 16 Dec 2010 23:26:07 -0800 Subject: Remove calltup fields from ABI, add binding fields. --- src/comp/back/abi.rs | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/comp/back/abi.rs b/src/comp/back/abi.rs index d6926f34..7f0ced61 100644 --- a/src/comp/back/abi.rs +++ b/src/comp/back/abi.rs @@ -28,12 +28,23 @@ const int vec_elt_alloc = 1; const int vec_elt_fill = 2; const int vec_elt_data = 3; -const int calltup_elt_out_ptr = 0; -const int calltup_elt_task_ptr = 1; -const int calltup_elt_indirect_args = 2; -const int calltup_elt_ty_params = 3; -const int calltup_elt_args = 4; -const int calltup_elt_iterator_args = 5; + +/* 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). + */ + +const int binding_field_dispatch = 0; +const int binding_field_bound_data = 1; + +const int obj_field_vtbl = binding_field_dispatch; +const int obj_field_box = binding_field_bound_data; + +const int obj_body_elt_tydesc = 0; +const int obj_body_elt_fields = 1; + +const int fn_field_code = binding_field_dispatch; +const int fn_field_box = binding_field_bound_data; const int worst_case_glue_call_args = 7; -- cgit v1.2.3