diff options
| author | Graydon Hoare <[email protected]> | 2010-12-16 23:26:07 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-12-16 23:26:07 -0800 |
| commit | 62d62ce4da7b719c9ea1c65e916f1702c820f7d6 (patch) | |
| tree | bfa5f8a87dc2e208e042f0c4758d3b775237df73 /src/comp/back | |
| parent | Un-XFAIL tag.rs. (diff) | |
| download | rust-62d62ce4da7b719c9ea1c65e916f1702c820f7d6.tar.xz rust-62d62ce4da7b719c9ea1c65e916f1702c820f7d6.zip | |
Remove calltup fields from ABI, add binding fields.
Diffstat (limited to 'src/comp/back')
| -rw-r--r-- | src/comp/back/abi.rs | 23 |
1 files changed, 17 insertions, 6 deletions
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; |