Skip to content
Browse files

[cage] Add remaining missing UNUSED(arg) declarations from pmc

  • Loading branch information...
1 parent aa54fcd commit 97eac131d44f6b77981020dc600fd8b10a2eb634 @rurban rurban committed Dec 11, 2012
View
3 src/pmc/imageiosize.pmc
@@ -181,12 +181,15 @@ Returns the flags describing the visit action
Pushes the integer C<v> onto the end of the image.
+The argument C<v> is currently ignored.
+
=cut
*/
VTABLE void push_integer(INTVAL v) {
UNUSED(INTERP)
+ UNUSED(v)
const size_t len = PF_size_integer() * sizeof (opcode_t);
PARROT_IMAGEIOSIZE(SELF)->size += len;
}
View
17 src/pmc/imageiostrings.pmc
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2010-2011, Parrot Foundation.
+Copyright (C) 2010-2012, Parrot Foundation.
=head1 NAME
@@ -79,6 +79,7 @@ Gets the result PMC after a thaw.
*/
VTABLE PMC *get_pmc() {
+ UNUSED(INTERP)
return PARROT_IMAGEIOSTRINGS(SELF)->list;
}
@@ -93,6 +94,8 @@ Returns the flags describing the visit action
*/
VTABLE INTVAL get_integer() {
+ UNUSED(INTERP)
+ UNUSED(SELF)
return VISIT_FREEZE_NORMAL;
}
@@ -107,7 +110,11 @@ Do nothing.
*/
- VTABLE void push_integer(INTVAL v) { }
+ VTABLE void push_integer(INTVAL v) {
+ UNUSED(INTERP)
+ UNUSED(SELF)
+ UNUSED(v)
+ }
/*
@@ -120,7 +127,11 @@ Do nothing.
*/
- VTABLE void push_float(FLOATVAL v) { }
+ VTABLE void push_float(FLOATVAL v) {
+ UNUSED(INTERP)
+ UNUSED(SELF)
+ UNUSED(v)
+ }
/*
View
5 src/pmc/imageiothaw.pmc
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2010-2011, Parrot Foundation.
+Copyright (C) 2010-2012, Parrot Foundation.
=head1 NAME
@@ -199,6 +199,8 @@ Get the visit action.
*/
VTABLE INTVAL get_integer() {
+ UNUSED(INTERP)
+ UNUSED(SELF)
return VISIT_THAW_NORMAL;
}
@@ -214,6 +216,7 @@ Set an exterior constant table to use for cross-referencing constants.
*/
VTABLE void set_pointer(void *value) {
+ UNUSED(INTERP)
PObj_flag_SET(private1, SELF);
PARROT_IMAGEIOTHAW(SELF)->pf_ct = (PackFile_ConstTable *)value;
}
View
6 src/pmc/imccompiler.pmc
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2011, Parrot Foundation.
+Copyright (C) 2011-2012, Parrot Foundation.
=head1 NAME
@@ -97,6 +97,7 @@ pmclass IMCCompiler auto_attrs provides HLLCompiler provide invokable {
ATTR INTVAL current_eval;
VTABLE void init() {
+ 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)");
}
@@ -162,11 +163,13 @@ pmclass IMCCompiler auto_attrs provides HLLCompiler provide invokable {
}
VTABLE void *get_pointer() {
+ UNUSED(INTERP)
const Parrot_IMCCompiler_attributes * const attrs = PARROT_IMCCOMPILER(SELF);
return attrs->imcc_info;
}
VTABLE INTVAL get_integer() {
+ UNUSED(INTERP)
const Parrot_IMCCompiler_attributes * const attrs = PARROT_IMCCOMPILER(SELF);
return attrs->is_pasm;
}
@@ -180,6 +183,7 @@ pmclass IMCCompiler auto_attrs provides HLLCompiler provide invokable {
}
VTABLE void destroy() {
+ UNUSED(INTERP)
Parrot_IMCCompiler_attributes * const attrs = PARROT_IMCCOMPILER(SELF);
imcc_destroy((imc_info_t*)(attrs->imcc_info));
attrs->imcc_info = NULL;
View
5 src/pmc/lexinfo.pmc
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2008-2011, Parrot Foundation.
+Copyright (C) 2008-2012, Parrot Foundation.
=head1 NAME
@@ -37,6 +37,8 @@ pmclass LexInfo extends Hash provides hash no_ro auto_attrs {
Initialize the LexInfo PMC and remember the associate
subroutine.
+The C<sub> argument is currently ignored.
+
=cut
*/
@@ -47,6 +49,7 @@ subroutine.
}
VTABLE void init_pmc(PMC *sub) {
+ UNUSED(sub)
/* Set value type to INTVAL */
SELF.init_int((INTVAL)enum_type_INTVAL);
}
View
6 src/pmc/namespace.pmc
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2005-2011, Parrot Foundation.
+Copyright (C) 2005-2012, Parrot Foundation.
=head1 NAME
@@ -710,8 +710,8 @@ Return the name of this namespace part.
*/
VTABLE STRING *get_string() {
+ UNUSED(INTERP)
const Parrot_NameSpace_attributes * const nsinfo = PARROT_NAMESPACE(SELF);
- UNUSED(INTERP);
return nsinfo->name;
}
@@ -1195,7 +1195,7 @@ Sets the class or role PMC that is associated with this namespace.
*/
METHOD set_class(PMC *class_or_role) {
- PARROT_ASSERT_INTERP(class_or_role, interp);
+ PARROT_ASSERT_INTERP(class_or_role, INTERP);
PARROT_NAMESPACE(SELF)->_class = class_or_role;
}
View
12 src/pmc/nativepccmethod.pmc
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2010-2011, Parrot Foundation.
+Copyright (C) 2010-2012, Parrot Foundation.
=head1 NAME
@@ -38,6 +38,7 @@ Initializes the PMC with a C<NULL> function pointer.
*/
VTABLE void init() {
+ UNUSED(INTERP)
Parrot_NativePCCMethod_attributes * const attrs = PARROT_NATIVEPCCMETHOD(SELF);
attrs->func = NULL;
@@ -64,10 +65,12 @@ Set the pointer to the native function and the PCC signature.
VTABLE void *get_pointer() {
+ UNUSED(INTERP)
return PARROT_NATIVEPCCMETHOD(SELF)->func;
}
VTABLE void set_pointer_keyed_str(STRING *sig, void *func) {
+ UNUSED(INTERP)
PARROT_NATIVEPCCMETHOD(SELF)->signature = sig;
PARROT_NATIVEPCCMETHOD(SELF)->func = func;
}
@@ -85,6 +88,7 @@ NULLness check.
*/
VTABLE INTVAL defined() {
+ UNUSED(INTERP)
return !! PARROT_NATIVEPCCMETHOD(SELF)->func;
}
@@ -148,9 +152,9 @@ Mark contained elements for GC.
VTABLE void mark() {
const Parrot_NativePCCMethod_attributes * const attrs = PARROT_NATIVEPCCMETHOD(SELF);
- Parrot_gc_mark_STRING_alive(interp, attrs->signature);
- Parrot_gc_mark_STRING_alive(interp, attrs->mmd_long_signature);
- Parrot_gc_mark_PMC_alive(interp, attrs->mmd_multi_sig);
+ Parrot_gc_mark_STRING_alive(INTERP, attrs->signature);
+ Parrot_gc_mark_STRING_alive(INTERP, attrs->mmd_long_signature);
+ Parrot_gc_mark_PMC_alive(INTERP, attrs->mmd_multi_sig);
}
/*
View
5 src/pmc/null.pmc
@@ -43,10 +43,7 @@ Overrides the default to do nothing.
*/
- VTABLE void init() {
- UNUSED(INTERP)
- UNUSED(SELF)
- }
+ VTABLE void init() {}
VTABLE void *get_pointer() {
UNUSED(INTERP)
View
18 src/pmc/object.pmc
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2011, Parrot Foundation.
+Copyright (C) 2001-2012, Parrot Foundation.
=head1 NAME
@@ -289,6 +289,7 @@ Raises an exception; you can only instantiate objects from a class.
*/
VTABLE void init() {
+ UNUSED(SELF)
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
"Object must be created by a class.");
}
@@ -305,6 +306,8 @@ Raises an exception; you can only instantiate objects from a class.
*/
VTABLE void init_pmc(PMC *worreva) {
+ UNUSED(SELF)
+ UNUSED(worreva)
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
"Object must be created by a class.");
}
@@ -320,6 +323,8 @@ Just to avoid the automatic generation of one.
*/
VTABLE void destroy() {
+ UNUSED(INTERP)
+ UNUSED(SELF)
}
@@ -627,6 +632,7 @@ Get the class PMC representing the class that this object is an instance of.
*/
VTABLE PMC *get_class() {
+ UNUSED(INTERP)
return PARROT_OBJECT(SELF)->_class;
}
@@ -913,14 +919,22 @@ C<*info> is the visit info, (see F<include/parrot/pmc_freeze.h>).
Realias magically generated methods so they don't wreak havoc.
+The C<info> arguments are ignored.
+
=cut
*/
VTABLE void freeze(PMC *info) {
+ UNUSED(INTERP)
+ UNUSED(SELF)
+ UNUSED(info)
}
VTABLE void thaw(PMC *info) {
+ UNUSED(INTERP)
+ UNUSED(SELF)
+ UNUSED(info)
}
@@ -935,6 +949,8 @@ Called after the object has been thawed.
*/
VTABLE void thawfinish(PMC *info) {
+ UNUSED(INTERP)
+ UNUSED(info)
/* Set custom GC mark and destroy on the object. */
PObj_custom_mark_SET(SELF);
PObj_custom_destroy_SET(SELF);
View
2 src/pmc/orderedhashiterator.pmc
@@ -124,6 +124,7 @@ Returns this Iterator's Hash.
*/
VTABLE PMC* get_pmc() {
+ UNUSED(INTERP)
return PARROT_ORDEREDHASHITERATOR(SELF)->pmc_hash;
}
@@ -152,6 +153,7 @@ Returns the number of remaining elements in the Hash.
*/
VTABLE INTVAL elements() {
+ UNUSED(INTERP)
return PARROT_ORDEREDHASHITERATOR(SELF)->elements;
}
View
5 src/pmc/packfileannotation.pmc
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2011, Parrot Foundation.
+Copyright (C) 2001-2012, Parrot Foundation.
=head1 NAME
@@ -42,6 +42,7 @@ Create empty PackfileAnnotation.
*/
VTABLE void init() {
+ UNUSED(INTERP)
Parrot_PackfileAnnotation_attributes * const attrs =
PMC_data_typed(SELF, Parrot_PackfileAnnotation_attributes*);
@@ -228,6 +229,7 @@ Set the integer value of the annotation.
*/
VTABLE void set_integer_native(INTVAL value) {
+ UNUSED(INTERP)
Parrot_PackfileAnnotation_attributes * const attrs = PARROT_PACKFILEANNOTATION(SELF);
attrs->value_type = PF_ANNOTATION_KEY_TYPE_INT;
attrs->int_value = value;
@@ -261,6 +263,7 @@ Set the string value of the annotation.
*/
VTABLE void set_string_native(STRING * value) {
+ UNUSED(INTERP)
Parrot_PackfileAnnotation_attributes * const attrs = PARROT_PACKFILEANNOTATION(SELF);
attrs->value_type = PF_ANNOTATION_KEY_TYPE_STR;
attrs->str_value = value;
View
10 src/pmc/packfilesegment.pmc
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2011, Parrot Foundation.
+Copyright (C) 2001-2012, Parrot Foundation.
=head1 NAME
@@ -44,6 +44,7 @@ Initialize PackfileSegment.
*/
VTABLE void init() {
+ UNUSED(INTERP)
Parrot_PackfileSegment_attributes * const attrs =
PMC_data_typed(SELF, Parrot_PackfileSegment_attributes*);
@@ -75,10 +76,15 @@ Marks the object as live.
Initialize PMC internals.
+The C<ptr> argument is ignored.
+
=cut
*/
VTABLE void set_pointer(void *ptr) {
+ UNUSED(INTERP)
+ UNUSED(SELF)
+ UNUSED(ptr)
}
/*
@@ -91,6 +97,8 @@ Initialize PMC internals.
*/
VTABLE void *get_pointer() {
+ UNUSED(INTERP)
+ UNUSED(SELF)
return NULL;
}
View
9 src/pmc/packfileview.pmc
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2011, Parrot Foundation.
+Copyright (C) 2011-2012, Parrot Foundation.
=head1 NAME
@@ -175,6 +175,7 @@ Mark the PMC and the PackFile* contents
}
VTABLE void init() {
+ UNUSED(INTERP)
Parrot_PackfileView_attributes * const attrs =
PARROT_PACKFILEVIEW(SELF);
attrs->pf = NULL;
@@ -224,10 +225,12 @@ otherwise.
}
VTABLE void *get_pointer() {
+ UNUSED(INTERP)
return PARROT_PACKFILEVIEW(SELF)->pf;
}
VTABLE INTVAL get_bool() {
+ UNUSED(INTERP)
return (PARROT_PACKFILEVIEW(SELF)->pf != NULL);
}
@@ -242,10 +245,12 @@ otherwise.
*/
VTABLE void set_string_native(STRING * path) {
+ UNUSED(INTERP)
PARROT_PACKFILEVIEW(SELF)->path = path;
}
VTABLE STRING * get_string() {
+ UNUSED(INTERP)
Parrot_PackfileView_attributes * const attrs =
PARROT_PACKFILEVIEW(SELF);
return attrs->path ? attrs->path : STRINGNULL;
@@ -395,7 +400,7 @@ Determine if the given tag has been marked initialized
}
METHOD all_tags() {
- PMC * const array = Parrot_pf_all_tags_list(interp, SELF);
+ PMC * const array = Parrot_pf_all_tags_list(INTERP, SELF);
RETURN(PMC *array);
}
View
4 src/pmc/pmcproxy.pmc
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2011, Parrot Foundation.
+Copyright (C) 2001-2012, Parrot Foundation.
=head1 NAME
@@ -319,6 +319,7 @@ Returns the integer type of the class.
VTABLE INTVAL type() {
+ UNUSED(INTERP)
const Parrot_Class_attributes * const _class = PARROT_CLASS(SELF);
return _class->id;
}
@@ -466,6 +467,7 @@ Return the name of the low-level class (without the HLL namespace).
*/
VTABLE STRING *get_string() {
+ UNUSED(INTERP)
const Parrot_Class_attributes * const proxy_info = PARROT_CLASS(SELF);
return proxy_info->name;
}
View
8 src/pmc/scheduler.pmc
@@ -206,8 +206,8 @@ Frees the scheduler's underlying struct.
*/
VTABLE void destroy() {
- UNUSED(SELF)
UNUSED(INTERP)
+ UNUSED(SELF)
}
@@ -311,12 +311,10 @@ Finishes thawing the scheduler.
*/
VTABLE void thawfinish(PMC *info) {
-#if 1
UNUSED(INTERP)
UNUSED(SELF)
-#else
- Parrot_cx_refresh_task_list(INTERP, SELF);
-#endif
+ UNUSED(info)
+ /* Parrot_cx_refresh_task_list(INTERP, SELF); */
}
View
7 src/pmc/timer.pmc
@@ -173,9 +173,9 @@ Returns the timer info for C<key>.
*/
VTABLE INTVAL get_integer_keyed_int(INTVAL key) {
+ UNUSED(INTERP)
const Parrot_Timer_attributes * const core_struct = PARROT_TIMER(SELF);
const FLOATVAL absolute_time = core_struct->birthtime + core_struct->duration;
- UNUSED(INTERP);
switch (key) {
case PARROT_TIMER_SEC:
@@ -204,7 +204,8 @@ Returns the PMC associated with C<key>.
*/
VTABLE PMC *get_pmc_keyed_int(INTVAL key) {
- UNUSED(INTERP);
+ UNUSED(INTERP)
+
if (key == PARROT_TIMER_HANDLER) {
const Parrot_Timer_attributes * const core_struct = PARROT_TIMER(SELF);
return core_struct->code;
@@ -224,8 +225,8 @@ Returns the number associated with C<key>.
*/
VTABLE FLOATVAL get_number_keyed_int(INTVAL key) {
+ UNUSED(INTERP)
const Parrot_Timer_attributes * const core_struct = PARROT_TIMER(SELF);
- UNUSED(INTERP);
switch (key) {
case PARROT_TIMER_NSEC:

0 comments on commit 97eac13

Please sign in to comment.
Something went wrong with that request. Please try again.