[svn:parrot] r38716 - trunk/compilers/imcc
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Tue May 12 16:02:17 UTC 2009
Author: NotFound
Date: Tue May 12 16:02:16 2009
New Revision: 38716
URL: https://trac.parrot.org/parrot/changeset/38716
Log:
[imcc] attempt to fix TT #629
Modified:
trunk/compilers/imcc/pbc.c
Modified: trunk/compilers/imcc/pbc.c
==============================================================================
--- trunk/compilers/imcc/pbc.c Tue May 12 14:16:29 2009 (r38715)
+++ trunk/compilers/imcc/pbc.c Tue May 12 16:02:16 2009 (r38716)
@@ -313,25 +313,29 @@
imcc_globals_destroy(PARROT_INTERP, SHIM(int ex), SHIM(void *param))
{
ASSERT_ARGS(imcc_globals_destroy)
- code_segment_t *cs = IMCC_INFO(interp)->globals->cs;
- while (cs) {
- subs_t *s = cs->subs;
- code_segment_t * const prev_cs = cs->prev;
+ /* This is an allowed condition? See TT #629 */
+ if (IMCC_INFO(interp)->globals) {
+ code_segment_t *cs = IMCC_INFO(interp)->globals->cs;
+
+ while (cs) {
+ subs_t *s = cs->subs;
+ code_segment_t * const prev_cs = cs->prev;
+
+ while (s) {
+ subs_t * const prev_s = s->prev;
+ clear_sym_hash(&s->fixup);
+ mem_sys_free(s);
+ s = prev_s;
+ }
- while (s) {
- subs_t * const prev_s = s->prev;
- clear_sym_hash(&s->fixup);
- mem_sys_free(s);
- s = prev_s;
+ clear_sym_hash(&cs->key_consts);
+ mem_sys_free(cs);
+ cs = prev_cs;
}
-
- clear_sym_hash(&cs->key_consts);
- mem_sys_free(cs);
- cs = prev_cs;
+ IMCC_INFO(interp)->globals->cs = NULL;
}
- IMCC_INFO(interp)->globals->cs = NULL;
}
More information about the parrot-commits
mailing list