Skip to content

Commit

Permalink
[pmc] add more UNUSED for :no_wb methods
Browse files Browse the repository at this point in the history
also remove a wrong task WB
  • Loading branch information
Reini Urban committed May 30, 2014
1 parent f6bc0cc commit 287f951
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/pmc/bigint.pmc
Expand Up @@ -1625,6 +1625,7 @@ Decrements the integer.
}

VTABLE void i_add_float(FLOATVAL value) :no_wb {
UNUSED(SELF)
UNUSED(value)
Parrot_ex_throw_from_c_args(INTERP, NULL,
EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
Expand Down Expand Up @@ -1682,6 +1683,7 @@ Decrements the integer.
}

VTABLE void i_subtract_float(FLOATVAL value) :no_wb {
UNUSED(SELF)
UNUSED(value)
Parrot_ex_throw_from_c_args(INTERP, NULL,
EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
Expand Down Expand Up @@ -1738,6 +1740,7 @@ Decrements the integer.
}

VTABLE void i_multiply_float(FLOATVAL value) :no_wb {
UNUSED(SELF)
UNUSED(value)
Parrot_ex_throw_from_c_args(INTERP, NULL,
EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
Expand Down
2 changes: 2 additions & 0 deletions src/pmc/env.pmc
Expand Up @@ -64,6 +64,8 @@ information see F<src/pmc.c>.
}

VTABLE void set_pointer(void *ptr) :no_wb {
UNUSED(INTERP)
UNUSED(SELF)
Env_PMC = (PMC *)ptr;
}

Expand Down
2 changes: 2 additions & 0 deletions src/pmc/handle.pmc
Expand Up @@ -42,11 +42,13 @@ pmclass Handle provides Handle manual_attrs {


VTABLE void init() :no_wb {
UNUSED(SELF)
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
"Handle cannot be instantiated directly.");
}

VTABLE void init_pmc(PMC * init) :no_wb {
UNUSED(SELF)
UNUSED(init)
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
"Handle cannot be instantiated directly.");
Expand Down
1 change: 1 addition & 0 deletions src/pmc/imageiosize.pmc
Expand Up @@ -189,6 +189,7 @@ The argument C<v> is currently ignored.

VTABLE void push_integer(INTVAL v) :no_wb {
const size_t len = PF_size_integer() * sizeof (opcode_t);
UNUSED(INTERP)
UNUSED(v)
PARROT_IMAGEIOSIZE(SELF)->size += len;
}
Expand Down
1 change: 1 addition & 0 deletions src/pmc/imccompiler.pmc
Expand Up @@ -53,6 +53,7 @@ pmclass IMCCompiler auto_attrs provides HLLCompiler provide invokable {
ATTR INTVAL current_eval;

VTABLE void init() :no_wb {
UNUSED(SELF)
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
"IMCCompiler: Must initialize with an integer argument 0 (PIR) or 1 (PASM)");
}
Expand Down
3 changes: 3 additions & 0 deletions src/pmc/iterator.pmc
Expand Up @@ -73,6 +73,7 @@ Raises an exception. Use C<init_pmc()>.
*/

VTABLE void init() :no_wb {
UNUSED(SELF)
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
"Iterator init without aggregate");
}
Expand All @@ -89,6 +90,7 @@ Defaults iteration mode to iterate from start.
*/

VTABLE void init_pmc(PMC *aggregate) :no_wb {
UNUSED(SELF)
UNUSED(aggregate)
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
"Direct creation of Iterator");
Expand Down Expand Up @@ -209,6 +211,7 @@ Restart iterator

*/
VTABLE void set_integer_native(INTVAL value) :no_wb {
UNUSED(SELF)
UNUSED(value)
PARROT_FAILURE("Iterator: implementation has to override this method");
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_UNIMPLEMENTED,
Expand Down
1 change: 1 addition & 0 deletions src/pmc/lexpad.pmc
Expand Up @@ -202,6 +202,7 @@ pmclass LexPad provides hash no_ro auto_attrs {
ATTR PMC *ctx;

VTABLE void init() :no_wb {
UNUSED(SELF)
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
"Cannot create a LexPad PMC without an initializer");
}
Expand Down
1 change: 1 addition & 0 deletions src/pmc/parrotlibrary.pmc
Expand Up @@ -154,6 +154,7 @@ Sets the pointer to the shared library handle.
*/

VTABLE void set_pointer(void *handle) :no_wb {
UNUSED(INTERP)
PMC_dlhandle(SELF) = handle;
PObj_custom_destroy_SET(SELF);
}
Expand Down
6 changes: 2 additions & 4 deletions src/pmc/task.pmc
Expand Up @@ -153,7 +153,7 @@ code as the first argument.
Parrot_Task_attributes * const task = PARROT_TASK(SELF);
Parrot_Scheduler_attributes * const sdata =
PARROT_SCHEDULER(interp->scheduler);

PMC * const active_tasks = sdata->all_tasks;

PARROT_ASSERT(! PMC_IS_NULL(task->code));
Expand Down Expand Up @@ -238,7 +238,6 @@ Create a copy of the task, resetting status, ID, and birthtime.
VTABLE PMC *clone() :no_wb {
/* Create the new task PMC, of the same type of this one (we may
* have been subclassed). */

PMC * const copy = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
Parrot_Task_attributes * const new_struct = PARROT_TASK(copy);
const Parrot_Task_attributes * const old_struct = PARROT_TASK(SELF);
Expand All @@ -263,7 +262,7 @@ Gets the value of an attribute for this task.
VTABLE PMC *get_attr_str(STRING *name) :no_wb {
Parrot_Task_attributes * const core_struct = PARROT_TASK(SELF);
PMC * value = PMCNULL;

if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "birthtime"))) {
value = Parrot_pmc_new(INTERP, enum_class_Float);
VTABLE_set_number_native(INTERP, value, core_struct->birthtime);
Expand Down Expand Up @@ -453,7 +452,6 @@ Send a message to this task.
UNLOCK(tdata->mailbox_lock);

if (tdata->partner) {
PARROT_GC_WRITE_BARRIER(interp, SELF);
PMC * const partner = tdata->partner;
Parrot_Task_attributes * const pdata = PARROT_TASK(partner);
LOCK(tdata->mailbox_lock);
Expand Down
1 change: 1 addition & 0 deletions src/pmc/unmanagedstruct.pmc
Expand Up @@ -954,6 +954,7 @@ Sets the size of the C<struct>.
*/

VTABLE void set_integer_native(INTVAL size) :no_wb {
UNUSED(INTERP)
PARROT_UNMANAGEDSTRUCT(SELF)->size = size;
}

Expand Down

0 comments on commit 287f951

Please sign in to comment.