Implement non-internal ivecs
Vectors are now similar to our old, pre-internal vectors, except that they are uniquely owned, not refcounted. Their name should probably change too, then. I've renamed them to vec in the runtime, will do so throughout the compiler later.
This commit is contained in:
parent
855e0a4713
commit
c9c5ee252a
27 changed files with 493 additions and 1554 deletions
|
|
@ -92,24 +92,12 @@ const closure_elt_bindings: int = 1;
|
|||
|
||||
const closure_elt_ty_params: int = 2;
|
||||
|
||||
const ivec_default_length: uint = 4u;
|
||||
const ivec_elt_fill: uint = 0u;
|
||||
|
||||
const ivec_elt_len: uint = 0u;
|
||||
|
||||
const ivec_elt_alen: uint = 1u;
|
||||
const ivec_elt_alloc: uint = 1u;
|
||||
|
||||
const ivec_elt_elems: uint = 2u;
|
||||
|
||||
const ivec_heap_stub_elt_zero: uint = 0u;
|
||||
|
||||
const ivec_heap_stub_elt_alen: uint = 1u;
|
||||
|
||||
const ivec_heap_stub_elt_ptr: uint = 2u;
|
||||
|
||||
const ivec_heap_elt_len: uint = 0u;
|
||||
|
||||
const ivec_heap_elt_elems: uint = 1u;
|
||||
|
||||
const worst_case_glue_call_args: int = 7;
|
||||
|
||||
const abi_version: uint = 1u;
|
||||
|
|
|
|||
|
|
@ -40,10 +40,7 @@ type upcalls =
|
|||
new_str: ValueRef,
|
||||
evec_append: ValueRef,
|
||||
get_type_desc: ValueRef,
|
||||
ivec_resize: ValueRef,
|
||||
ivec_spill: ValueRef,
|
||||
ivec_resize_shared: ValueRef,
|
||||
ivec_spill_shared: ValueRef,
|
||||
ivec_grow: ValueRef,
|
||||
ivec_push: ValueRef,
|
||||
cmp_type: ValueRef,
|
||||
log_type: ValueRef,
|
||||
|
|
@ -95,19 +92,13 @@ fn declare_upcalls(_tn: type_names, tydesc_type: TypeRef,
|
|||
d(~"get_type_desc",
|
||||
[T_ptr(T_nil()), T_size_t(), T_size_t(), T_size_t(),
|
||||
T_ptr(T_ptr(tydesc_type)), T_int()], T_ptr(tydesc_type)),
|
||||
ivec_resize:
|
||||
d(~"ivec_resize", [T_ptr(T_opaque_ivec()), T_int()], T_void()),
|
||||
ivec_spill:
|
||||
d(~"ivec_spill", [T_ptr(T_opaque_ivec()), T_int()], T_void()),
|
||||
ivec_resize_shared:
|
||||
d(~"ivec_resize_shared", [T_ptr(T_opaque_ivec()), T_int()],
|
||||
T_void()),
|
||||
ivec_spill_shared:
|
||||
d(~"ivec_spill_shared", [T_ptr(T_opaque_ivec()), T_int()],
|
||||
ivec_grow:
|
||||
d(~"vec_grow", [T_ptr(T_ptr(T_opaque_ivec())), T_int()],
|
||||
T_void()),
|
||||
ivec_push:
|
||||
d(~"ivec_push", [T_ptr(T_opaque_ivec()), T_ptr(tydesc_type),
|
||||
T_ptr(T_i8())], T_void()),
|
||||
d(~"vec_push",
|
||||
[T_ptr(T_ptr(T_opaque_ivec())), T_ptr(tydesc_type),
|
||||
T_ptr(T_i8())], T_void()),
|
||||
cmp_type:
|
||||
dr(~"cmp_type",
|
||||
[T_ptr(T_i1()), taskptr_type, T_ptr(tydesc_type),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue