Author: leo
Date: Thu Feb 23 10:38:39 2006
New Revision: 11713

Modified:
   trunk/src/packfile.c
   trunk/src/pmc/coroutine.pmc
   trunk/src/pmc/eval.pmc
Log:
Misc fixes - HLL_id, PF destroy

* set current_HLL in Coroutine.invoke too
* NULLify bytecode pointers to other segments in destroy


Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c        (original)
+++ trunk/src/packfile.c        Thu Feb 23 10:38:39 2006
@@ -1844,6 +1844,10 @@ byte_code_destroy (Interp* interpreter, 
            byte_code->prederef.branches = NULL;
        }
     }
+    byte_code->fixups = NULL;
+    byte_code->debugs = NULL;
+    byte_code->const_table = NULL;
+    byte_code->pic_index = NULL;
 }
 
 /*

Modified: trunk/src/pmc/coroutine.pmc
==============================================================================
--- trunk/src/pmc/coroutine.pmc (original)
+++ trunk/src/pmc/coroutine.pmc Thu Feb 23 10:38:39 2006
@@ -160,6 +160,7 @@ Swaps the "context".
             ctx->caller_ctx = caller_ctx;
             PMC_cont(ccont)->from_ctx = ctx;
             ctx->current_sub = SELF;
+            ctx->current_HLL = co->HLL_id;
             ctx->current_cont = ccont;
             ctx->current_object = NULL;
             INTERP->current_object = NULL;

Modified: trunk/src/pmc/eval.pmc
==============================================================================
--- trunk/src/pmc/eval.pmc      (original)
+++ trunk/src/pmc/eval.pmc      Thu Feb 23 10:38:39 2006
@@ -174,8 +174,9 @@ Invokes the first subroutine in the eval
             PackFile_Segment_destroy(INTERP, seg);
         }
         seg = (struct PackFile_Segment *)cur_cs->fixups;
-        if (cur_cs->fixups) {
+        if (seg) {
             PackFile_Segment_destroy(INTERP, seg);
+            cur_cs->fixups = NULL;
         }
         seg = cur_cs->pic_index;
         if (seg) {

Reply via email to