[svn:parrot] r40193 - in trunk: docs docs/pdds lib/Parrot/Pmc2c/PMC src src/pmc tools/dev
bacek at svn.parrot.org
bacek at svn.parrot.org
Tue Jul 21 13:11:19 UTC 2009
Author: bacek
Date: Tue Jul 21 13:11:18 2009
New Revision: 40193
URL: https://trac.parrot.org/parrot/changeset/40193
Log:
[cage] Remove deprecate nextkey_keyed* VTABLE. Part of TT#866
Modified:
trunk/docs/embed.pod
trunk/docs/pdds/pdd17_pmc.pod
trunk/lib/Parrot/Pmc2c/PMC/ParrotClass.pm
trunk/src/pmc/default.pmc
trunk/src/pmc/key.pmc
trunk/src/vtable.tbl
trunk/tools/dev/vtablize.pl
Modified: trunk/docs/embed.pod
==============================================================================
--- trunk/docs/embed.pod Tue Jul 21 12:56:53 2009 (r40192)
+++ trunk/docs/embed.pod Tue Jul 21 13:11:18 2009 (r40193)
@@ -1412,12 +1412,6 @@
=item C<Parrot_PMC_newclass>
-=item C<Parrot_PMC_nextkey_keyed>
-
-=item C<Parrot_PMC_nextkey_keyed_int>
-
-=item C<Parrot_PMC_nextkey_keyed_str>
-
=item C<Parrot_PMC_null>
=item C<Parrot_PMC_pop_float>
Modified: trunk/docs/pdds/pdd17_pmc.pod
==============================================================================
--- trunk/docs/pdds/pdd17_pmc.pod Tue Jul 21 12:56:53 2009 (r40192)
+++ trunk/docs/pdds/pdd17_pmc.pod Tue Jul 21 13:11:18 2009 (r40193)
@@ -1062,15 +1062,6 @@
Delete the element indexed by a PMC, integer, or string key.
-=item nextkey_keyed
-
- PMC* nextkey_keyed(INTERP, PMC *self, PMC *key, INTVAL what)
- PMC* nextkey_keyed_int(INTERP, PMC *self, INTVAL key, INTVAL what)
- PMC* nextkey_keyed_str(INTERP, PMC *self, STRING *key, INTVAL what)
-
-Advance to the next position while iterating through an aggregate. [NOTE: this
-feature needs review together with the Iterator PMC.]
-
=back
=head4 Math Vtable Functions
Modified: trunk/lib/Parrot/Pmc2c/PMC/ParrotClass.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMC/ParrotClass.pm Tue Jul 21 12:56:53 2009 (r40192)
+++ trunk/lib/Parrot/Pmc2c/PMC/ParrotClass.pm Tue Jul 21 13:11:18 2009 (r40193)
@@ -43,7 +43,6 @@
getprops
is_same
morph
- nextkey_keyed_int
set_integer_keyed_int
set_number_keyed_int
set_pmc_keyed_int
Modified: trunk/src/pmc/default.pmc
==============================================================================
--- trunk/src/pmc/default.pmc Tue Jul 21 12:56:53 2009 (r40192)
+++ trunk/src/pmc/default.pmc Tue Jul 21 13:11:18 2009 (r40193)
@@ -829,22 +829,6 @@
/*
-=item C<PMC *nextkey_keyed_int(INTVAL key, INTVAL w)>
-
-Converts C<key> to a PMC key and returns the result of calling
-C<nextkey_keyed()> with it.
-
-=cut
-
-*/
-
- VTABLE PMC *nextkey_keyed_int(INTVAL key, INTVAL w) {
- PMC *const r_key = INT2KEY(INTERP, key);
- return SELF.nextkey_keyed(r_key, w);
- }
-
-/*
-
=item C<INTVAL can(STRING *method)>
Reports whether the PMC "can" perform C<method>.
Modified: trunk/src/pmc/key.pmc
==============================================================================
--- trunk/src/pmc/key.pmc Tue Jul 21 12:56:53 2009 (r40192)
+++ trunk/src/pmc/key.pmc Tue Jul 21 13:11:18 2009 (r40193)
@@ -306,95 +306,6 @@
/*
-=item C<PMC *nextkey_keyed(PMC *key, INTVAL what)>
-
-Returns the next key relative to the location specified in C<what>.
-int_key == -1 means end of iteration.
-
-=cut
-
-*/
-
- VTABLE PMC *nextkey_keyed(PMC *agg, INTVAL what) {
- PMC * const ret = SELF;
- const INTVAL n = VTABLE_elements(INTERP, agg);
- INTVAL int_key;
-
- switch (what) {
- case ITERATE_FROM_START_KEYS:
- /*
- * OrderedHash supports two iterators: by key
- * or by ordered values
- */
- PObj_get_FLAGS(ret) &= ~KEY_type_FLAGS;
- PObj_get_FLAGS(ret) |= KEY_integer_FLAG;
-
- if (agg->vtable->base_type == enum_class_OrderedHash)
- PObj_get_FLAGS(ret) |= KEY_number_FLAG;
-
- goto init;
- case ITERATE_FROM_START: /* reset key */
- PObj_get_FLAGS(ret) &= ~KEY_type_FLAGS;
- PObj_get_FLAGS(ret) |= KEY_integer_FLAG;
-
- /*
- * KEY_hash_iterator_FLAGS, which is the same as
- * KEY_integer_FLAG | KEY_number_FLAG
- * indicates a hash iterator operation
- * KEY_integer_FLAG alone is an indexed hash lookup
- * with an Integer KEY
- */
-
- if (VTABLE_isa(INTERP, agg, CONST_STRING(interp, "Hash"))
- && agg->vtable->base_type != enum_class_OrderedHash)
- PObj_get_FLAGS(ret) |= KEY_hash_iterator_FLAGS;
- init:
- if (!n) {
- SET_ATTR_int_key(INTERP, ret, -1);
- }
- else {
- SET_ATTR_int_key(INTERP, ret, 0);
- }
-
- /* iterating over a hash additionally needs the Bucket index */
- if (KEY_IS_HASH_ITERATOR(ret))
- SET_ATTR_next_key(INTERP, ret, (PMC *)INITBucketIndex);
-
- break;
- case ITERATE_GET_NEXT:
- /*
- * src/hash.c:parrot_hash_get_idx() advances to next
- * so, if we are iterating over a hash do nothing
- * */
- if (!KEY_IS_HASH_ITERATOR(ret)) {
- GET_ATTR_int_key(INTERP, ret, int_key);
- if (int_key < n - 1) {
- SET_ATTR_int_key(INTERP, ret, int_key+1);
- }
- else {
- SET_ATTR_int_key(INTERP, ret, -1);
- }
- }
- break;
- case ITERATE_GET_PREV:
- GET_ATTR_int_key(INTERP, ret, int_key);
- if (int_key >= 0)
- SET_ATTR_int_key(INTERP, ret, int_key-1);
- break;
- case ITERATE_FROM_END:
- PObj_get_FLAGS(ret) &= ~KEY_type_FLAGS;
- PObj_get_FLAGS(ret) |= KEY_integer_FLAG;
- SET_ATTR_int_key(INTERP, ret, n-1);
- break;
- default:
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_INVALID_OPERATION,
- "Unknown iterator type in Key.nextkey_keyed: %d", what);
- }
- return ret;
- }
-/*
-
=item C<void visit(visit_info *info)>
This is used by freeze/thaw to visit the contents of the Key.
Modified: trunk/src/vtable.tbl
==============================================================================
--- trunk/src/vtable.tbl Tue Jul 21 12:56:53 2009 (r40192)
+++ trunk/src/vtable.tbl Tue Jul 21 13:11:18 2009 (r40193)
@@ -316,9 +316,6 @@
void delete_keyed_str(STRING* key)
[MAIN]
-PMC* nextkey_keyed(PMC* key, INTVAL what)
-PMC* nextkey_keyed_int(INTVAL key, INTVAL what)
-PMC* nextkey_keyed_str(STRING* key, INTVAL what)
PMC* get_iter()
opcode_t* invoke(void* next)
Modified: trunk/tools/dev/vtablize.pl
==============================================================================
--- trunk/tools/dev/vtablize.pl Tue Jul 21 12:56:53 2009 (r40192)
+++ trunk/tools/dev/vtablize.pl Tue Jul 21 13:11:18 2009 (r40193)
@@ -243,9 +243,6 @@
s/^(\s*)(void\s+delete_keyed\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
s/^(\s*)(void\s+delete_keyed_int\(INTVAL\s+\w*\)\s+{)/$1VTABLE $2/;
s/^(\s*)(void\s+delete_keyed_str\(STRING\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*nextkey_keyed\(PMC\s+\*\w*,\s+INTVAL\s+\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*nextkey_keyed_int\(INTVAL\s+\w*,\s+INTVAL\s+\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*nextkey_keyed_str\(STRING\s+\*\w*,\s+INTVAL\s+\w*\)\s+{)/$1VTABLE $2/;
s/^(\s*)(PMC\s+\*get_iter\(\)\s+{)/$1VTABLE $2/;
s/^(\s*)(opcode_t\s+\*invoke\(void\s+\*\w*\)\s+{)/$1VTABLE $2/;
s/^(\s*)(INTVAL\s+can\(STRING\s+\*\w*\)\s+{)/$1VTABLE $2/;
More information about the parrot-commits
mailing list