[svn:parrot] r43861 - in branches/rm_cflags/src: . dynpmc pmc
coke at svn.parrot.org
coke at svn.parrot.org
Wed Feb 10 13:37:20 UTC 2010
Author: coke
Date: Wed Feb 10 13:37:19 2010
New Revision: 43861
URL: https://trac.parrot.org/parrot/changeset/43861
Log:
Cleanup more unused
Modified:
branches/rm_cflags/src/dynpmc/rational.pmc
branches/rm_cflags/src/pmc/orderedhash.pmc
branches/rm_cflags/src/thread.c
Modified: branches/rm_cflags/src/dynpmc/rational.pmc
==============================================================================
--- branches/rm_cflags/src/dynpmc/rational.pmc Wed Feb 10 13:24:36 2010 (r43860)
+++ branches/rm_cflags/src/dynpmc/rational.pmc Wed Feb 10 13:37:19 2010 (r43861)
@@ -193,34 +193,6 @@
/*
-=item * static void rat_power_int(PARROT_INTERP, PMC *self, int value)
-
-Calculates the power of a Rational-PMC to an exponent value in-place.
-
-=cut
-
-*/
-static void rat_power_int(PARROT_INTERP, PMC *self, int value) {
- #ifdef PARROT_HAS_GMP
- mpz_t num, den;
-
- mpq_get_num(num, RT(self));
- mpq_get_den(den, RT(self));
-
- mpz_pow_ui(num, num, (unsigned int) value);
- mpq_set_num(RT(self), num);
- mpz_clear(num);
-
- mpz_pow_ui(den, den, (unsigned int) value);
- mpq_set_den(RT(self), den);
- mpz_clear(den);
- #else
- RAISE_EXCEPTION
- #endif
-}
-
-/*
-
=back
=cut
Modified: branches/rm_cflags/src/pmc/orderedhash.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/orderedhash.pmc Wed Feb 10 13:24:36 2010 (r43860)
+++ branches/rm_cflags/src/pmc/orderedhash.pmc Wed Feb 10 13:37:19 2010 (r43861)
@@ -77,17 +77,6 @@
*/
-/* Create new stored item. FixedPMCArray of (key, value, prev, next). */
-static PMC*
-create_item(PARROT_INTERP, ARGIN(PMC *key), ARGIN(PMC *value)) {
- PMC *ret = pmc_new(interp, enum_class_FixedPMCArray);
- VTABLE_set_integer_native(interp, ret, ORDERED_HASH_ITEM_MAX);
-
- VTABLE_set_pmc_keyed_int(interp, ret, ORDERED_HASH_ITEM_KEY, key);
- VTABLE_set_pmc_keyed_int(interp, ret, ORDERED_HASH_ITEM_VALUE, value);
- return ret;
-}
-
/* Get list_item by index */
static PMC*
get_list_item(PARROT_INTERP, ARGIN(PMC *self), INTVAL idx) {
Modified: branches/rm_cflags/src/thread.c
==============================================================================
--- branches/rm_cflags/src/thread.c Wed Feb 10 13:24:36 2010 (r43860)
+++ branches/rm_cflags/src/thread.c Wed Feb 10 13:37:19 2010 (r43861)
@@ -97,10 +97,6 @@
__attribute__nonnull__(1);
PARROT_CAN_RETURN_NULL
-static QUEUE_ENTRY * remove_queued_suspend_gc(PARROT_INTERP)
- __attribute__nonnull__(1);
-
-PARROT_CAN_RETURN_NULL
static void* thread_func(ARGIN_NULLOK(void *arg));
#define ASSERT_ARGS_detach __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
@@ -140,8 +136,6 @@
, PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_pt_thread_wait __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_remove_queued_suspend_gc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_thread_func __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -963,62 +957,6 @@
/*
-=item C<static QUEUE_ENTRY * remove_queued_suspend_gc(PARROT_INTERP)>
-
-Removes an event requesting that the interpreter suspend itself for a
-garbage-collection run from the event queue.
-
-=cut
-
-*/
-
-PARROT_CAN_RETURN_NULL
-static QUEUE_ENTRY *
-remove_queued_suspend_gc(PARROT_INTERP)
-{
- ASSERT_ARGS(remove_queued_suspend_gc)
- parrot_event *ev = NULL;
- QUEUE * const queue = interp->task_queue;
- QUEUE_ENTRY *prev = NULL;
- QUEUE_ENTRY *cur;
-
- queue_lock(queue);
- cur = queue->head;
-
- while (cur) {
- ev = (parrot_event *)cur->data;
-
- if (ev->type == EVENT_TYPE_SUSPEND_FOR_GC)
- break;
-
- prev = cur;
- cur = cur->next;
- }
-
- if (cur) {
- if (prev)
- prev->next = cur->next;
- else
- queue->head = cur->next;
-
- if (cur == queue->tail)
- queue->tail = prev;
-
- if (cur == queue->head)
- queue->head = cur->next;
-
- mem_sys_free(ev);
- mem_sys_free(cur);
- cur = NULL;
- DEBUG_ONLY(fprintf(stderr, "%p: remove_queued_suspend_gc: got one\n", interp));
- }
-
- queue_unlock(queue);
- return cur;
-}
-
-/*
-
=item C<static int pt_gc_count_threads(PARROT_INTERP)>
Returns the number of active threads in the system (running or suspended). Be
More information about the parrot-commits
mailing list