Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/embryo

Dir     : e17/libs/embryo/src/lib


Modified Files:
        Embryo.h embryo_amx.c 


Log Message:


woop! it works... 64bit cleanliness left.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/lib/Embryo.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- Embryo.h    24 Mar 2004 09:48:28 -0000      1.1
+++ Embryo.h    26 Mar 2004 04:12:36 -0000      1.2
@@ -1,10 +1,5 @@
 #ifndef _EMBRYO_H
 #define _EMBRYO_H
-/*
- * FIXME:
- * handle the case where:
- * [C] -> [vm] -> [native call] -> [same or other func in same vm]
- */
 
 #ifdef  __cplusplus
 extern "C" {
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/embryo/src/lib/embryo_amx.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- embryo_amx.c        26 Mar 2004 03:26:09 -0000      1.9
+++ embryo_amx.c        26 Mar 2004 04:12:36 -0000      1.10
@@ -626,7 +626,7 @@
    Embryo_Header    *hdr;
    Embryo_Func_Stub *func;
    unsigned char    *code, *data;
-   Embryo_Cell      pri, alt, stk, frm, hea;
+   Embryo_Cell      pri, alt, stk, frm, hea, hea_start;
    Embryo_Cell      reset_stk, reset_hea, *cip;
    Embryo_UCell     codesize;
    int              i;
@@ -635,10 +635,8 @@
    int              num;
 
    if (!ep) return EMBRYO_PROGRAM_FAIL;
-   if (ep->run_count > 0) return EMBRYO_PROGRAM_BUSY;
    if (!(ep->flags & EMBRYO_FLAG_RELOC))
      {
-   
        ep->error = EMBRYO_ERROR_INIT;
        return EMBRYO_PROGRAM_FAIL;
      }
@@ -647,13 +645,19 @@
        ep->error = EMBRYO_ERROR_INIT;
        return EMBRYO_PROGRAM_FAIL;
      }
+   if (ep->run_count > 0)
+     {
+       /* return EMBRYO_PROGRAM_BUSY; */
+       /* FIXME: test C->vm->C->vm recursion more fully */
+       /* it seems to work... just fine!!! - strange! */
+     }
    
    /* set up the registers */
    hdr = (Embryo_Header *)ep->base;
    codesize = (Embryo_UCell)(hdr->dat - hdr->cod);
    code = ep->base + (int)hdr->cod;
    data = ep->base + (int)hdr->dat;
-   hea = ep->hea;
+   hea_start = hea = ep->hea;
    stk = ep->stk;
    reset_stk = stk;
    reset_hea = hea;
@@ -773,6 +777,7 @@
    /* check stack/heap before starting to run */
    CHKMARGIN();
 
+   /* track recursion depth */
    ep->run_count++;
    
    /* start running */
@@ -1500,6 +1505,10 @@
          }
      }
    ep->run_count--;
+   
+   //
+   ep->hea = hea_start;
+   
    return EMBRYO_PROGRAM_OK;
 }
 




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to