Skip to content

Commit

Permalink
Stub compose functions for all REPRs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jan 19, 2013
1 parent bb97781 commit 0255f36
Show file tree
Hide file tree
Showing 13 changed files with 78 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/6model/reprs/CArray.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ static PMC * type_object_for(PARROT_INTERP, PMC *HOW) {
return st->WHAT;
}

/* Composes the representation. */
static void compose(PARROT_INTERP, STable *st, PMC *repr_info) {
/* TODO */
}

/* Creates a new instance based on the type object. */
static PMC * allocate(PARROT_INTERP, STable *st) {
CArrayInstance *obj = mem_allocate_zeroed_typed(CArrayInstance);
Expand Down Expand Up @@ -450,6 +455,7 @@ REPROps * CArray_initialize(PARROT_INTERP,
/* Allocate and populate the representation function table. */
this_repr = mem_allocate_zeroed_typed(REPROps);
this_repr->type_object_for = type_object_for;
this_repr->compose = compose;
this_repr->allocate = allocate;
this_repr->initialize = initialize;
this_repr->copy_to = copy_to;
Expand Down
6 changes: 6 additions & 0 deletions src/6model/reprs/CPointer.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ static PMC * type_object_for(PARROT_INTERP, PMC *HOW) {
return st->WHAT;
}

/* Composes the representation. */
static void compose(PARROT_INTERP, STable *st, PMC *repr_info) {
/* Nothing to do. */
}

/* Creates a new instance based on the type object. */
static PMC * allocate(PARROT_INTERP, STable *st) {
CPointerInstance *obj = mem_allocate_zeroed_typed(CPointerInstance);
Expand Down Expand Up @@ -78,6 +83,7 @@ REPROps * CPointer_initialize(PARROT_INTERP,
/* Allocate and populate the representation function table. */
this_repr = mem_allocate_zeroed_typed(REPROps);
this_repr->type_object_for = type_object_for;
this_repr->compose = compose;
this_repr->allocate = allocate;
this_repr->initialize = initialize;
this_repr->copy_to = copy_to;
Expand Down
6 changes: 6 additions & 0 deletions src/6model/reprs/CStr.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ static PMC *type_object_for(PARROT_INTERP, PMC *HOW) {
return st->WHAT;
}

/* Composes the representation. */
static void compose(PARROT_INTERP, STable *st, PMC *repr_info) {
/* TODO: move encoding stuff into here */
}

static PMC *allocate(PARROT_INTERP, STable *st) {
CStrInstance *obj = (CStrInstance *) Parrot_gc_allocate_fixed_size_storage(interp, sizeof(CStrInstance));

Expand Down Expand Up @@ -113,6 +118,7 @@ REPROps *CStr_initialize(PARROT_INTERP,
/* Allocate and populate the representation function table. */
this_repr = mem_allocate_zeroed_typed(REPROps);
this_repr->type_object_for = type_object_for;
this_repr->compose = compose;
this_repr->allocate = allocate;
this_repr->initialize = initialize;
this_repr->gc_free = gc_free;
Expand Down
6 changes: 6 additions & 0 deletions src/6model/reprs/CStruct.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,11 @@ static PMC * type_object_for(PARROT_INTERP, PMC *HOW) {
return st->WHAT;
}

/* Composes the representation. */
static void compose(PARROT_INTERP, STable *st, PMC *repr_info) {
/* TODO: move allocation strategy stuff here. */
}

/* Creates a new instance based on the type object. */
static PMC * allocate(PARROT_INTERP, STable *st) {
CStructInstance * obj;
Expand Down Expand Up @@ -654,6 +659,7 @@ REPROps * CStruct_initialize(PARROT_INTERP,
/* Allocate and populate the representation function table. */
this_repr = mem_allocate_zeroed_typed(REPROps);
this_repr->type_object_for = type_object_for;
this_repr->compose = compose;
this_repr->allocate = allocate;
this_repr->initialize = initialize;
this_repr->copy_to = copy_to;
Expand Down
6 changes: 6 additions & 0 deletions src/6model/reprs/HashAttrStore.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ static PMC * type_object_for(PARROT_INTERP, PMC *HOW) {
return st->WHAT;
}

/* Composes the representation. */
static void compose(PARROT_INTERP, STable *st, PMC *repr_info) {
/* Nothing to do. */
}

/* Creates a new instance based on the type object. */
static PMC * allocate(PARROT_INTERP, STable *st) {
HashAttrStoreInstance *obj;
Expand Down Expand Up @@ -111,6 +116,7 @@ REPROps * HashAttrStore_initialize(PARROT_INTERP) {
/* Allocate and populate the representation function table. */
this_repr = mem_allocate_zeroed_typed(REPROps);
this_repr->type_object_for = type_object_for;
this_repr->compose = compose;
this_repr->allocate = allocate;
this_repr->initialize = initialize;
this_repr->copy_to = copy_to;
Expand Down
6 changes: 6 additions & 0 deletions src/6model/reprs/KnowHOWREPR.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ static PMC * type_object_for(PARROT_INTERP, PMC *HOW) {
return st->WHAT;
}

/* Composes the representation. */
static void compose(PARROT_INTERP, STable *st, PMC *repr_info) {
/* Nothing to do. */
}

/* Creates a new instance based on the type object. */
static PMC * allocate(PARROT_INTERP, STable *st) {
KnowHOWREPRInstance *obj = mem_allocate_zeroed_typed(KnowHOWREPRInstance);
Expand Down Expand Up @@ -103,6 +108,7 @@ REPROps * KnowHOWREPR_initialize(PARROT_INTERP) {
/* Allocate and populate the representation function table. */
this_repr = mem_allocate_zeroed_typed(REPROps);
this_repr->type_object_for = type_object_for;
this_repr->compose = compose;
this_repr->allocate = allocate;
this_repr->initialize = initialize;
this_repr->copy_to = copy_to;
Expand Down
6 changes: 6 additions & 0 deletions src/6model/reprs/NativeCall.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ static PMC * type_object_for(PARROT_INTERP, PMC *HOW) {
return st->WHAT;
}

/* Composes the representation. */
static void compose(PARROT_INTERP, STable *st, PMC *repr_info) {
/* Nothing to do. */
}

/* Creates a new instance based on the type object. */
static PMC * allocate(PARROT_INTERP, STable *st) {
NativeCallInstance *obj = mem_allocate_zeroed_typed(NativeCallInstance);
Expand Down Expand Up @@ -129,6 +134,7 @@ REPROps * NativeCall_initialize(PARROT_INTERP,
/* Allocate and populate the representation function table. */
this_repr = mem_allocate_zeroed_typed(REPROps);
this_repr->type_object_for = type_object_for;
this_repr->compose = compose;
this_repr->allocate = allocate;
this_repr->initialize = initialize;
this_repr->copy_to = copy_to;
Expand Down
6 changes: 6 additions & 0 deletions src/6model/reprs/P6bigint.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ static PMC * type_object_for(PARROT_INTERP, PMC *HOW) {
return st->WHAT;
}

/* Composes the representation. */
static void compose(PARROT_INTERP, STable *st, PMC *repr_info) {
/* Nothing to do. */
}

/* Creates a new instance based on the type object. */
static PMC * allocate(PARROT_INTERP, STable *st) {
P6bigintInstance *obj = mem_allocate_zeroed_typed(P6bigintInstance);
Expand Down Expand Up @@ -176,6 +181,7 @@ REPROps * P6bigint_initialize(PARROT_INTERP,
/* Allocate and populate the representation function table. */
this_repr = mem_allocate_zeroed_typed(REPROps);
this_repr->type_object_for = type_object_for;
this_repr->compose = compose;
this_repr->allocate = allocate;
this_repr->initialize = initialize;
this_repr->copy_to = copy_to;
Expand Down
6 changes: 6 additions & 0 deletions src/6model/reprs/P6int.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ static PMC * type_object_for(PARROT_INTERP, PMC *HOW) {
return st->WHAT;
}

/* Composes the representation. */
static void compose(PARROT_INTERP, STable *st, PMC *repr_info) {
/* Nothing to do yet (but later, size). */
}

/* Creates a new instance based on the type object. */
static PMC * allocate(PARROT_INTERP, STable *st) {
P6intInstance *obj = mem_allocate_zeroed_typed(P6intInstance);
Expand Down Expand Up @@ -127,6 +132,7 @@ REPROps * P6int_initialize(PARROT_INTERP) {
/* Allocate and populate the representation function table. */
this_repr = mem_allocate_zeroed_typed(REPROps);
this_repr->type_object_for = type_object_for;
this_repr->compose = compose;
this_repr->allocate = allocate;
this_repr->initialize = initialize;
this_repr->copy_to = copy_to;
Expand Down
6 changes: 6 additions & 0 deletions src/6model/reprs/P6num.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ static PMC * type_object_for(PARROT_INTERP, PMC *HOW) {
return st->WHAT;
}

/* Composes the representation. */
static void compose(PARROT_INTERP, STable *st, PMC *repr_info) {
/* Nothing to do yet (but later, size). */
}

/* Creates a new instance based on the type object. */
static PMC * allocate(PARROT_INTERP, STable *st) {
P6numInstance *obj = mem_allocate_zeroed_typed(P6numInstance);
Expand Down Expand Up @@ -128,6 +133,7 @@ REPROps * P6num_initialize(PARROT_INTERP) {
/* Allocate and populate the representation function table. */
this_repr = mem_allocate_zeroed_typed(REPROps);
this_repr->type_object_for = type_object_for;
this_repr->compose = compose;
this_repr->allocate = allocate;
this_repr->initialize = initialize;
this_repr->copy_to = copy_to;
Expand Down
6 changes: 6 additions & 0 deletions src/6model/reprs/P6opaque.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,11 @@ static PMC * type_object_for(PARROT_INTERP, PMC *HOW) {
return st->WHAT;
}

/* Composes the representation. */
static void compose(PARROT_INTERP, STable *st, PMC *repr_info) {
/* TODO: move allocation strategy here. */
}

/* Creates a new instance based on the type object. */
static PMC * allocate(PARROT_INTERP, STable *st) {
P6opaqueInstance * obj;
Expand Down Expand Up @@ -1072,6 +1077,7 @@ REPROps * P6opaque_initialize(PARROT_INTERP) {
/* Allocate and populate the representation function table. */
this_repr = mem_allocate_zeroed_typed(REPROps);
this_repr->type_object_for = type_object_for;
this_repr->compose = compose;
this_repr->allocate = allocate;
this_repr->initialize = initialize;
this_repr->copy_to = copy_to;
Expand Down
6 changes: 6 additions & 0 deletions src/6model/reprs/P6str.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ static PMC * type_object_for(PARROT_INTERP, PMC *HOW) {
return st->WHAT;
}

/* Composes the representation. */
static void compose(PARROT_INTERP, STable *st, PMC *repr_info) {
/* Nothing to do. */
}

/* Creates a new instance based on the type object. */
static PMC * allocate(PARROT_INTERP, STable *st) {
P6strInstance *obj = mem_allocate_zeroed_typed(P6strInstance);
Expand Down Expand Up @@ -135,6 +140,7 @@ REPROps * P6str_initialize(PARROT_INTERP) {
/* Allocate and populate the representation function table. */
this_repr = mem_allocate_zeroed_typed(REPROps);
this_repr->type_object_for = type_object_for;
this_repr->compose = compose;
this_repr->allocate = allocate;
this_repr->initialize = initialize;
this_repr->copy_to = copy_to;
Expand Down
6 changes: 6 additions & 0 deletions src/6model/reprs/Uninstantiable.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ static PMC * type_object_for(PARROT_INTERP, PMC *HOW) {
return st->WHAT;
}

/* Composes the representation. */
static void compose(PARROT_INTERP, STable *st, PMC *repr_info) {
/* Nothing to do. */
}

/* Creates a new instance based on the type object. */
static PMC * allocate(PARROT_INTERP, STable *st) {
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
Expand Down Expand Up @@ -67,6 +72,7 @@ REPROps * Uninstantiable_initialize(PARROT_INTERP) {
/* Allocate and populate the representation function table. */
this_repr = mem_allocate_zeroed_typed(REPROps);
this_repr->type_object_for = type_object_for;
this_repr->compose = compose;
this_repr->allocate = allocate;
this_repr->initialize = initialize;
this_repr->copy_to = copy_to;
Expand Down

0 comments on commit 0255f36

Please sign in to comment.