2010-09-23 17:46:31 -05:00
|
|
|
|
|
|
|
const int rc_base_field_refcnt = 0;
|
|
|
|
|
2010-11-09 19:49:20 -06:00
|
|
|
// FIXME: import from std.dbg when imported consts work.
|
|
|
|
const uint const_refcount = 0x7bad_face_u;
|
|
|
|
|
2010-09-23 17:46:31 -05:00
|
|
|
const int task_field_refcnt = 0;
|
|
|
|
const int task_field_stk = 2;
|
|
|
|
const int task_field_runtime_sp = 3;
|
|
|
|
const int task_field_rust_sp = 4;
|
|
|
|
const int task_field_gc_alloc_chain = 5;
|
|
|
|
const int task_field_dom = 6;
|
|
|
|
const int n_visible_task_fields = 7;
|
|
|
|
|
|
|
|
const int dom_field_interrupt_flag = 1;
|
|
|
|
|
|
|
|
const int frame_glue_fns_field_mark = 0;
|
|
|
|
const int frame_glue_fns_field_drop = 1;
|
|
|
|
const int frame_glue_fns_field_reloc = 2;
|
|
|
|
|
|
|
|
const int box_rc_field_refcnt = 0;
|
|
|
|
const int box_rc_field_body = 1;
|
|
|
|
|
|
|
|
const int general_code_alignment = 16;
|
|
|
|
|
|
|
|
const int vec_elt_rc = 0;
|
|
|
|
const int vec_elt_alloc = 1;
|
|
|
|
const int vec_elt_fill = 2;
|
|
|
|
const int vec_elt_data = 3;
|
|
|
|
|
2010-12-17 01:26:07 -06:00
|
|
|
|
|
|
|
/* 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;
|
2010-09-23 17:46:31 -05:00
|
|
|
|
|
|
|
const int worst_case_glue_call_args = 7;
|
|
|
|
|
2010-09-23 19:16:34 -05:00
|
|
|
const int n_upcall_glues = 7;
|
|
|
|
|
2010-09-24 16:56:04 -05:00
|
|
|
fn upcall_glue_name(int n) -> str {
|
|
|
|
ret "rust_upcall_" + util.common.istr(n);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn activate_glue_name() -> str {
|
|
|
|
ret "rust_activate_glue";
|
|
|
|
}
|
|
|
|
|
|
|
|
fn yield_glue_name() -> str {
|
|
|
|
ret "rust_yield_glue";
|
|
|
|
}
|
|
|
|
|
2010-09-27 17:38:34 -05:00
|
|
|
fn exit_task_glue_name() -> str {
|
|
|
|
ret "rust_exit_task_glue";
|
|
|
|
}
|
|
|
|
|
2010-09-23 17:46:31 -05:00
|
|
|
//
|
|
|
|
// Local Variables:
|
|
|
|
// mode: rust
|
|
|
|
// fill-column: 78;
|
|
|
|
// indent-tabs-mode: nil
|
|
|
|
// c-basic-offset: 4
|
|
|
|
// buffer-file-coding-system: utf-8-unix
|
|
|
|
// compile-command: "make -k -C ../.. 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
|
|
|
|
// End:
|
|
|
|
//
|