Permalink
Browse files

Toss a bunch of (thankfully unused) mis-design.

  • Loading branch information...
jnthn committed Feb 9, 2013
1 parent 030ba9b commit 5795fdf1b8c06e2d4a4840ce53d3ea9b992d6019
Showing with 0 additions and 43 deletions.
  1. +0 −4 src/6model/repr_registry.c
  2. +0 −24 src/6model/reprs/CArray.c
  3. +0 −15 src/6model/sixmodelobject.h
@@ -143,10 +143,6 @@ static void add_default_pos_funcs(PARROT_INTERP, REPROps *repr) {
repr->pos_funcs->bind_pos_native = default_bind_pos_native;
repr->pos_funcs->bind_pos_boxed = default_bind_pos_boxed;
repr->pos_funcs->elems = default_elems;
- repr->pos_funcs->preallocate = default_preallocate;
- repr->pos_funcs->trim_to = default_trim_to;
- repr->pos_funcs->make_hole = default_make_hole;
- repr->pos_funcs->delete_elems = default_delete_elems;
repr->pos_funcs->get_elem_stable = default_get_elem_stable;
}
View
@@ -449,26 +449,6 @@ static INTVAL elems(PARROT_INTERP, STable *st, void *data) {
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
"Don't know how many elements a C array returned from a library has");
}
-static void preallocate(PARROT_INTERP, STable *st, void *data, INTVAL count) {
- CArrayREPRData *repr_data = (CArrayREPRData *)st->REPR_data;
- CArrayBody *body = (CArrayBody *)data;
- die_idx_nyi(interp);
-}
-static void trim_to(PARROT_INTERP, STable *st, void *data, INTVAL count) {
- CArrayREPRData *repr_data = (CArrayREPRData *)st->REPR_data;
- CArrayBody *body = (CArrayBody *)data;
- die_idx_nyi(interp);
-}
-static void make_hole(PARROT_INTERP, STable *st, void *data, INTVAL at_index, INTVAL count) {
- CArrayREPRData *repr_data = (CArrayREPRData *)st->REPR_data;
- CArrayBody *body = (CArrayBody *)data;
- die_idx_nyi(interp);
-}
-static void delete_elems(PARROT_INTERP, STable *st, void *data, INTVAL at_index, INTVAL count) {
- CArrayREPRData *repr_data = (CArrayREPRData *)st->REPR_data;
- CArrayBody *body = (CArrayBody *)data;
- die_idx_nyi(interp);
-}
static STable * get_elem_stable(PARROT_INTERP, STable *st) {
CArrayREPRData *repr_data = (CArrayREPRData *)st->REPR_data;
return STABLE(repr_data->elem_type);
@@ -516,10 +496,6 @@ REPROps * CArray_initialize(PARROT_INTERP,
this_repr->pos_funcs->bind_pos_native = bind_pos_native;
this_repr->pos_funcs->bind_pos_boxed = bind_pos_boxed;
this_repr->pos_funcs->elems = elems;
- this_repr->pos_funcs->preallocate = preallocate;
- this_repr->pos_funcs->trim_to = trim_to;
- this_repr->pos_funcs->make_hole = make_hole;
- this_repr->pos_funcs->delete_elems = delete_elems;
this_repr->pos_funcs->get_elem_stable = get_elem_stable;
this_repr->serialize_repr_data = serialize_repr_data;
this_repr->deserialize_repr_data = deserialize_repr_data;
@@ -259,21 +259,6 @@ typedef struct SixModel_REPROps_Positional {
/* Gets the number of elements. */
INTVAL (*elems) (PARROT_INTERP, STable *st, void *data);
- /* Pre-allocates the specified number of slots. */
- void (*preallocate) (PARROT_INTERP, STable *st, void *data, INTVAL count);
-
- /* Trim to the specified number of slots. */
- void (*trim_to) (PARROT_INTERP, STable *st, void *data, INTVAL count);
-
- /* Make a "hole" the specified number of elements in size at the specified index.
- * Used for implementing things like unshift, splice, etc. */
- void (*make_hole) (PARROT_INTERP, STable *st, void *data, INTVAL at_index, INTVAL count);
-
- /* Delete the specified number of elements (that is, actually shuffle the ones
- * after them into their place). Used for implementing things like shift, splice,
- * etc. */
- void (*delete_elems) (PARROT_INTERP, STable *st, void *data, INTVAL at_index, INTVAL count);
-
/* Gets the STable representing the declared element type. */
STable * (*get_elem_stable) (PARROT_INTERP, STable *st);
} REPROps_Positional;

0 comments on commit 5795fdf

Please sign in to comment.