]> git.lizzy.rs Git - rust.git/blob - src/librustc/back/abi.rs
librustc: Add argument to allow choosing "linker"
[rust.git] / src / librustc / back / abi.rs
1 // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11
12
13
14 pub static rc_base_field_refcnt: uint = 0u;
15
16 pub static task_field_refcnt: uint = 0u;
17
18 pub static task_field_stk: uint = 2u;
19
20 pub static task_field_runtime_sp: uint = 3u;
21
22 pub static task_field_rust_sp: uint = 4u;
23
24 pub static task_field_gc_alloc_chain: uint = 5u;
25
26 pub static task_field_dom: uint = 6u;
27
28 pub static n_visible_task_fields: uint = 7u;
29
30 pub static dom_field_interrupt_flag: uint = 1u;
31
32 pub static frame_glue_fns_field_mark: uint = 0u;
33
34 pub static frame_glue_fns_field_drop: uint = 1u;
35
36 pub static frame_glue_fns_field_reloc: uint = 2u;
37
38 pub static box_field_refcnt: uint = 0u;
39 pub static box_field_tydesc: uint = 1u;
40 pub static box_field_prev: uint = 2u;
41 pub static box_field_next: uint = 3u;
42 pub static box_field_body: uint = 4u;
43
44 pub static general_code_alignment: uint = 16u;
45
46 pub static tydesc_field_size: uint = 0u;
47 pub static tydesc_field_align: uint = 1u;
48 pub static tydesc_field_take_glue: uint = 2u;
49 pub static tydesc_field_drop_glue: uint = 3u;
50 pub static tydesc_field_free_glue: uint = 4u;
51 pub static tydesc_field_visit_glue: uint = 5u;
52 pub static tydesc_field_shape: uint = 6u;
53 pub static tydesc_field_shape_tables: uint = 7u;
54 pub static n_tydesc_fields: uint = 8u;
55
56 // The two halves of a closure: code and environment.
57 pub static fn_field_code: uint = 0u;
58 pub static fn_field_box: uint = 1u;
59
60 // The three fields of a trait object/trait instance: vtable, box, and type
61 // description.
62 pub static trt_field_vtable: uint = 0u;
63 pub static trt_field_box: uint = 1u;
64 // This field is only present in unique trait objects, so it comes last.
65 pub static trt_field_tydesc: uint = 2u;
66
67 pub static vec_elt_fill: uint = 0u;
68
69 pub static vec_elt_alloc: uint = 1u;
70
71 pub static vec_elt_elems: uint = 2u;
72
73 pub static slice_elt_base: uint = 0u;
74 pub static slice_elt_len: uint = 1u;
75
76 pub static worst_case_glue_call_args: uint = 7u;
77
78 pub static abi_version: uint = 1u;
79
80 pub fn memcpy_glue_name() -> ~str { return ~"rust_memcpy_glue"; }
81
82 pub fn bzero_glue_name() -> ~str { return ~"rust_bzero_glue"; }
83
84 pub fn yield_glue_name() -> ~str { return ~"rust_yield_glue"; }
85
86 pub fn no_op_type_glue_name() -> ~str { return ~"rust_no_op_type_glue"; }