Permalink
Browse files

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

  • Loading branch information...
Reini Urban
Reini Urban committed Dec 11, 2012
1 parent aa54fcd commit 97eac131d44f6b77981020dc600fd8b10a2eb634
View
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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;
}
@@ -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
@@ -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
@@ -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);
@@ -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;
}
@@ -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;
@@ -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;
}
Oops, something went wrong.

0 comments on commit 97eac13

Please sign in to comment.