[svn:parrot] r46006 - trunk/src/pmc
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Sun Apr 25 11:22:29 UTC 2010
Author: NotFound
Date: Sun Apr 25 11:22:28 2010
New Revision: 46006
URL: https://trac.parrot.org/parrot/changeset/46006
Log:
[cage] fix a lot of 'pmc' usages that must be SELF
Modified:
trunk/src/pmc/default.pmc
trunk/src/pmc/hash.pmc
trunk/src/pmc/object.pmc
trunk/src/pmc/sub.pmc
trunk/src/pmc/unmanagedstruct.pmc
Modified: trunk/src/pmc/default.pmc
==============================================================================
--- trunk/src/pmc/default.pmc Sun Apr 25 10:32:09 2010 (r46005)
+++ trunk/src/pmc/default.pmc Sun Apr 25 11:22:28 2010 (r46006)
@@ -358,7 +358,7 @@
else
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_ILL_INHERIT,
"init_pmc() not implemented in class '%Ss'",
- caller(interp, pmc));
+ caller(interp, SELF));
}
/*
Modified: trunk/src/pmc/hash.pmc
==============================================================================
--- trunk/src/pmc/hash.pmc Sun Apr 25 10:32:09 2010 (r46005)
+++ trunk/src/pmc/hash.pmc Sun Apr 25 11:22:28 2010 (r46006)
@@ -541,7 +541,7 @@
VTABLE FLOATVAL get_number_keyed(PMC *key) {
PMC *nextkey;
PMC *valpmc;
- const Hash * const hash = (Hash *)VTABLE_get_pointer(interp, pmc);
+ const Hash * const hash = (Hash *)SELF.get_pointer();
void * const keystr = hash_key_from_pmc(INTERP, hash, key);
HashBucket * const b = parrot_hash_get_bucket(INTERP, hash, keystr);
Modified: trunk/src/pmc/object.pmc
==============================================================================
--- trunk/src/pmc/object.pmc Sun Apr 25 10:32:09 2010 (r46005)
+++ trunk/src/pmc/object.pmc Sun Apr 25 11:22:28 2010 (r46006)
@@ -496,7 +496,7 @@
*/
VTABLE INTVAL get_integer() {
- Parrot_Object_attributes * const obj = PARROT_OBJECT(pmc);
+ Parrot_Object_attributes * const obj = PARROT_OBJECT(SELF);
Parrot_Class_attributes * const _class = PARROT_CLASS(obj->_class);
STRING * const meth_name = CONST_STRING(interp, "get_integer");
@@ -511,7 +511,7 @@
cur_class, meth_name);
if (!PMC_IS_NULL(meth)) {
INTVAL result;
- Parrot_pcc_invoke_sub_from_c_args(interp, meth, "Pi->I", pmc, &result);
+ Parrot_pcc_invoke_sub_from_c_args(interp, meth, "Pi->I", SELF, &result);
return result;
}
@@ -519,7 +519,7 @@
if (cur_class->vtable->base_type == enum_class_PMCProxy) {
/* Get the PMC instance and call the vtable function on that. */
STRING * const proxy = CONST_STRING(interp, "proxy");
- PMC * const del_object = VTABLE_get_attr_str(interp, pmc, proxy);
+ PMC * const del_object = VTABLE_get_attr_str(interp, SELF, proxy);
if (!PMC_IS_NULL(del_object)) {
return (INTVAL)VTABLE_get_integer(interp, del_object);
@@ -527,7 +527,7 @@
}
}
}
- return interp->vtables[enum_class_default]->get_integer(interp, pmc);
+ return interp->vtables[enum_class_default]->get_integer(interp, SELF);
}
/*
@@ -710,7 +710,7 @@
*/
opcode_t * invoke(void *next) {
- Parrot_Object_attributes * const obj = PARROT_OBJECT(pmc);
+ Parrot_Object_attributes * const obj = PARROT_OBJECT(SELF);
Parrot_Class_attributes * const _class = PARROT_CLASS(obj->_class);
/* Walk and search for the vtable. */
@@ -740,14 +740,14 @@
if (cur_class->vtable->base_type == enum_class_PMCProxy) {
/* Get the PMC instance and call the vtable function on that. */
PMC * const del_object =
- VTABLE_get_attr_keyed(interp, pmc, cur_class, proxy);
+ VTABLE_get_attr_keyed(interp, SELF, cur_class, proxy);
if (!PMC_IS_NULL(del_object))
return VTABLE_invoke(interp, del_object, next);
}
}
- return (opcode_t *)interp->vtables[enum_class_default]->invoke(interp, pmc, next);
+ return (opcode_t *)interp->vtables[enum_class_default]->invoke(interp, SELF, next);
}
/*
@@ -776,7 +776,7 @@
*/
VTABLE PMC * clone() {
- Parrot_Object_attributes * const obj = PARROT_OBJECT(pmc);
+ Parrot_Object_attributes * const obj = PARROT_OBJECT(SELF);
/* If we have a custom override, invoke it.
* If not, use the oo function. */
STRING * const meth_name = CONST_STRING(interp, "clone");
@@ -785,7 +785,7 @@
PMC *result;
if (!PMC_IS_NULL(meth)) {
- Parrot_pcc_invoke_sub_from_c_args(interp, meth, "Pi->P", pmc, &result);
+ Parrot_pcc_invoke_sub_from_c_args(interp, meth, "Pi->P", SELF, &result);
}
else {
result = Parrot_oo_clone_object(interp, SELF, NULL);
@@ -873,8 +873,8 @@
type_num = SELF->vtable->base_type;
/* make sure metadata doesn't go away unexpectedly */
- if (PMC_metadata(pmc))
- PMC_metadata(pmc) = pt_shared_fixup(interp, PMC_metadata(pmc));
+ if (PMC_metadata(SELF))
+ PMC_metadata(SELF) = pt_shared_fixup(interp, PMC_metadata(SELF));
PARROT_ASSERT(master->vtables[type_num]->pmc_class);
/* don't want the referenced class disappearing on us */
Modified: trunk/src/pmc/sub.pmc
==============================================================================
--- trunk/src/pmc/sub.pmc Sun Apr 25 10:32:09 2010 (r46005)
+++ trunk/src/pmc/sub.pmc Sun Apr 25 11:22:28 2010 (r46006)
@@ -675,7 +675,7 @@
VTABLE_push_integer(INTERP, info, (INTVAL) sub->start_offs);
VTABLE_push_integer(INTERP, info, (INTVAL) sub->end_offs);
VTABLE_push_integer(INTERP, info,
- (INTVAL)(PObj_get_FLAGS(pmc) & SUB_FLAG_PF_MASK));
+ (INTVAL)(PObj_get_FLAGS(SELF) & SUB_FLAG_PF_MASK));
VTABLE_push_string(INTERP, info, sub->name);
Modified: trunk/src/pmc/unmanagedstruct.pmc
==============================================================================
--- trunk/src/pmc/unmanagedstruct.pmc Sun Apr 25 10:32:09 2010 (r46005)
+++ trunk/src/pmc/unmanagedstruct.pmc Sun Apr 25 11:22:28 2010 (r46006)
@@ -957,7 +957,7 @@
VTABLE INTVAL get_integer_keyed_int(INTVAL ix) {
int type;
- const char * const p = char_offset_int(INTERP, pmc, ix, &type);
+ const char * const p = char_offset_int(INTERP, SELF, ix, &type);
return ret_int(INTERP, p, type);
}
@@ -973,7 +973,7 @@
VTABLE INTVAL get_integer_keyed(PMC *key) {
int type;
- char * const p = char_offset_key(INTERP, pmc, key, &type);
+ char * const p = char_offset_key(INTERP, SELF, key, &type);
return ret_int(INTERP, p, type);
}
@@ -989,7 +989,7 @@
VTABLE FLOATVAL get_number_keyed_int(INTVAL key) {
int type;
- char * const p = char_offset_int(INTERP, pmc, key, &type);
+ char * const p = char_offset_int(INTERP, SELF, key, &type);
return ret_float(INTERP, p, type);
}
@@ -1005,7 +1005,7 @@
VTABLE FLOATVAL get_number_keyed(PMC *key) {
int type;
- char * const p = char_offset_key(INTERP, pmc, key, &type);
+ char * const p = char_offset_key(INTERP, SELF, key, &type);
return ret_float(INTERP, p, type);
}
@@ -1021,7 +1021,7 @@
VTABLE STRING *get_string_keyed_int(INTVAL key) {
int type;
- char * const p = char_offset_int(INTERP, pmc, key, &type);
+ char * const p = char_offset_int(INTERP, SELF, key, &type);
return ret_string(INTERP, p, type);
}
@@ -1037,7 +1037,7 @@
VTABLE STRING *get_string_keyed(PMC *key) {
int type;
- char * const p = char_offset_key(INTERP, pmc, key, &type);
+ char * const p = char_offset_key(INTERP, SELF, key, &type);
return ret_string(INTERP, p, type);
}
@@ -1053,8 +1053,8 @@
VTABLE PMC *get_pmc_keyed_int(INTVAL key) {
int type;
- char * const p = char_offset_int(INTERP, pmc, key, &type);
- return ret_pmc(INTERP, pmc, p, type, key);
+ char * const p = char_offset_int(INTERP, SELF, key, &type);
+ return ret_pmc(INTERP, SELF, p, type, key);
}
/*
@@ -1069,8 +1069,8 @@
VTABLE PMC *get_pmc_keyed(PMC *key) {
int type;
- char * const p = char_offset_key(INTERP, pmc, key, &type);
- return ret_pmc(INTERP, pmc, p, type, key_2_idx(INTERP, pmc, key));
+ char * const p = char_offset_key(INTERP, SELF, key, &type);
+ return ret_pmc(INTERP, SELF, p, type, key_2_idx(INTERP, SELF, key));
}
/*
@@ -1113,7 +1113,7 @@
VTABLE void set_integer_keyed_int(INTVAL ix, INTVAL value) {
int type;
- char * const p = char_offset_int(INTERP, pmc, ix, &type);
+ char * const p = char_offset_int(INTERP, SELF, ix, &type);
set_int(INTERP, p, type, value);
}
@@ -1131,7 +1131,7 @@
VTABLE void set_integer_keyed(PMC *key, INTVAL value) {
int type;
- char * const p = char_offset_key(INTERP, pmc, key, &type);
+ char * const p = char_offset_key(INTERP, SELF, key, &type);
set_int(INTERP, p, type, value);
}
@@ -1147,7 +1147,7 @@
VTABLE void set_number_keyed_int(INTVAL key, FLOATVAL value) {
int type;
- char * const p = char_offset_int(INTERP, pmc, key, &type);
+ char * const p = char_offset_int(INTERP, SELF, key, &type);
set_float(INTERP, p, type, value);
}
@@ -1163,7 +1163,7 @@
VTABLE void set_number_keyed(PMC *key, FLOATVAL value) {
int type;
- char * const p = char_offset_key(INTERP, pmc, key, &type);
+ char * const p = char_offset_key(INTERP, SELF, key, &type);
set_float(INTERP, p, type, value);
}
@@ -1179,7 +1179,7 @@
VTABLE void set_string_keyed_int(INTVAL key, STRING *value) {
int type;
- char * const p = char_offset_int(INTERP, pmc, key, &type);
+ char * const p = char_offset_int(INTERP, SELF, key, &type);
set_string(INTERP, p, type, value);
}
@@ -1195,7 +1195,7 @@
VTABLE void set_string_keyed(PMC *key, STRING *value) {
int type;
- char * const p = char_offset_key(INTERP, pmc, key, &type);
+ char * const p = char_offset_key(INTERP, SELF, key, &type);
set_string(INTERP, p, type, value);
}
More information about the parrot-commits
mailing list