diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2011-08-25 10:18:02 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2011-08-29 09:07:53 +0200 |
| commit | c9c5ee252a8523778377f2832765442e611e85a4 (patch) | |
| tree | 85c0837af34b2431fc17da0a166254144aaa99c7 /src/comp/back | |
| parent | 855e0a471365c7c61a139e2437215028bd231af5 (diff) | |
| download | rust-c9c5ee252a8523778377f2832765442e611e85a4.tar.gz rust-c9c5ee252a8523778377f2832765442e611e85a4.zip | |
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.
Diffstat (limited to 'src/comp/back')
| -rw-r--r-- | src/comp/back/abi.rs | 16 | ||||
| -rw-r--r-- | src/comp/back/upcall.rs | 21 |
2 files changed, 8 insertions, 29 deletions
diff --git a/src/comp/back/abi.rs b/src/comp/back/abi.rs index 6055bc1ee52..22e49436440 100644 --- a/src/comp/back/abi.rs +++ b/src/comp/back/abi.rs @@ -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; diff --git a/src/comp/back/upcall.rs b/src/comp/back/upcall.rs index f224bafb409..8f0cb959b3d 100644 --- a/src/comp/back/upcall.rs +++ b/src/comp/back/upcall.rs @@ -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), |
