Skip to content
Browse files

Remove unused context_gc_mark variable

Also removes the Parrot_sub_mark_context_start function, whose only
purpose was to increment that variable.

It looks like the variable was designed to prevent corruption of
contexts while performing GC.  However, nothing has used the variable
since 540d4c3 "Merge context_pmc3 branch into trunk." back in 2009.

Found by nine++
  • Loading branch information...
1 parent c32af4b commit 7f7caad5afcf2a806900e46e572cf63580db6757 @Benabik Benabik committed Apr 4, 2012
Showing with 0 additions and 23 deletions.
  1. +0 −2 include/parrot/sub.h
  2. +0 −1 src/gc/mark_sweep.c
  3. +0 −20 src/sub.c
View
2 include/parrot/sub.h
@@ -235,7 +235,6 @@ INTVAL Parrot_sub_get_line_from_pc(PARROT_INTERP,
ARGIN_NULLOK(opcode_t *pc))
__attribute__nonnull__(1);
-void Parrot_sub_mark_context_start(void);
#define ASSERT_ARGS_Parrot_get_sub_pmc_from_subclass \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
@@ -275,7 +274,6 @@ void Parrot_sub_mark_context_start(void);
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_sub_get_line_from_pc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_Parrot_sub_mark_context_start __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/sub.c */
View
1 src/gc/mark_sweep.c
@@ -169,7 +169,6 @@ Parrot_gc_trace_root(PARROT_INTERP,
ASSERT_ARGS(Parrot_gc_trace_root)
/* note: adding locals here did cause increased GC runs */
- Parrot_sub_mark_context_start();
if (trace == GC_TRACE_SYSTEM_ONLY) {
trace_system_areas(interp, mem_pools);
View
20 src/sub.c
@@ -29,26 +29,6 @@ Subroutines, continuations, co-routines and other fun stuff...
/*
-=item C<void Parrot_sub_mark_context_start(void)>
-
-Indicate that a new round of context marking is about to take place.
-
-=cut
-
-*/
-
-static int context_gc_mark = 0;
-
-void
-Parrot_sub_mark_context_start(void)
-{
- ASSERT_ARGS(Parrot_sub_mark_context_start)
- if (++context_gc_mark == 0) context_gc_mark = 1;
-}
-
-
-/*
-
=item C<STRING* Parrot_sub_full_sub_name(PARROT_INTERP, PMC* sub_pmc)>
Return namespace, name, and location of subroutine.

0 comments on commit 7f7caad

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