Hi all,<br>       I just checked out svn and tryied to compile in linux.  Igor already sent a mail about this, this commit added alien support but didn&#39;t change platforms/unix/src, so in Unix you get a lot undefined reference errors.<br>

       Regenerating C from slang should be enough (I think), but, may I ask why you didn&#39;t also commit the updated platform/unix/src? It won&#39;t compile as it is now.<br><br>Regards,<br>          Javier.<br><br><div class="gmail_quote">

On Sun, Apr 25, 2010 at 4:53 PM,  <span dir="ltr">&lt;<a href="mailto:commits@squeakvm.org">commits@squeakvm.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
Author: lewis<br>
Date: 2010-04-25 12:53:47 -0700 (Sun, 25 Apr 2010)<br>
New Revision: 2203<br>
<br>
Modified:<br>
   trunk/platforms/Cross/vm/sqVirtualMachine.c<br>
   trunk/platforms/Cross/vm/sqVirtualMachine.h<br>
Log:<br>
Update for Alien support. Set VM_PROXY_MINOR to 8. Requires interpreter<br>
functions in SqueakSource/Alien Alien-VMMaker-Support package. These are<br>
now incorporated in SqueakSource/VMMaker VMMaker-dtl.170.<br>
<br>
<br>
Modified: trunk/platforms/Cross/vm/sqVirtualMachine.c<br>
===================================================================<br>
--- trunk/platforms/Cross/vm/sqVirtualMachine.c 2010-04-13 18:55:21 UTC (rev 2202)<br>
+++ trunk/platforms/Cross/vm/sqVirtualMachine.c 2010-04-25 19:53:47 UTC (rev 2203)<br>
@@ -73,6 +73,8 @@<br>
 sqInt isWordsOrBytes(sqInt oop);<br>
 sqInt includesBehaviorThatOf(sqInt aClass, sqInt aSuperClass);<br>
 sqInt isArray(sqInt oop);<br>
+sqInt internalIsMutable(sqInt oop);<br>
+sqInt internalIsImmutable(sqInt oop);<br>
<br>
 /* InterpreterProxy methodsFor: &#39;converting&#39; */<br>
 sqInt  booleanValueOf(sqInt obj);<br>
@@ -128,6 +130,7 @@<br>
 sqInt fullGC(void);<br>
 sqInt incrementalGC(void);<br>
 sqInt primitiveFail(void);<br>
+sqInt primitiveFailFor(sqInt reasonCode);<br>
 sqInt showDisplayBitsLeftTopRightBottom(sqInt aForm, sqInt l, sqInt t, sqInt r, sqInt b);<br>
 sqInt signalSemaphoreWithIndex(sqInt semaIndex);<br>
 sqInt success(sqInt aBoolean);<br>
@@ -144,17 +147,29 @@<br>
 sqInt copyBitsFromtoat(sqInt leftX, sqInt rightX, sqInt yValue);<br>
<br>
 /* InterpreterProxy methodsFor: &#39;FFI support&#39; */<br>
-sqInt classExternalAddress(void);<br>
+sqInt classExternalAddress(void); /* Old Squeak FFI */<br>
 sqInt classExternalData(void);<br>
 sqInt classExternalFunction(void);<br>
 sqInt classExternalLibrary(void);<br>
 sqInt classExternalStructure(void);<br>
+sqInt classAlien(void); /* Newsqueak FFI */<br>
+sqInt classUnsafeAlien(void); /* Newsqueak FFI */<br>
+sqInt getStackPointer(void);  /* Newsqueak FFI */<br>
+sqInt sendInvokeCallbackStackRegistersJmpbuf(sqInt thunkPtrAsInt, sqInt stackPtrAsInt, sqInt regsPtrAsInt, sqInt jmpBufPtrAsInt); /* Newsqueak FFI */<br>
+sqInt reestablishContextPriorToCallback(sqInt callbackContext); /* Newsqueak FFI */<br>
 sqInt ioLoadModuleOfLength(sqInt moduleNameIndex, sqInt moduleNameLength);<br>
 sqInt ioLoadSymbolOfLengthFromModule(sqInt functionNameIndex, sqInt functionNameLength, sqInt moduleHandle);<br>
 sqInt isInMemory(sqInt address);<br>
<br>
 void *ioLoadFunctionFrom(char *fnName, char *modName);<br>
<br>
+<br>
+/* Proxy declarations for v1.8 */<br>
+sqInt callbackEnter(sqInt *callbackID);<br>
+sqInt callbackLeave(sqInt  callbackID);<br>
+sqInt addGCRoot(sqInt *varLoc);<br>
+sqInt removeGCRoot(sqInt *varLoc);<br>
+<br>
 struct VirtualMachine *VM = NULL;<br>
<br>
 static sqInt majorVersion(void) {<br>
@@ -325,16 +340,36 @@<br>
 #endif<br>
<br>
 #if VM_PROXY_MINOR &gt; 5<br>
+<br>
        VM-&gt;isArray = isArray;<br>
        VM-&gt;forceInterruptCheck = forceInterruptCheck;<br>
+<br>
 #endif<br>
<br>
 #if VM_PROXY_MINOR &gt; 6<br>
+<br>
        VM-&gt;fetchLong32ofObject = fetchLong32ofObject;<br>
        VM-&gt;getThisSessionID = getThisSessionID;<br>
        VM-&gt;ioFilenamefromStringofLengthresolveAliases = ioFilenamefromStringofLengthresolveAliases;<br>
        VM-&gt;vmEndianness = vmEndianness;<br>
+<br>
 #endif<br>
<br>
+#if VM_PROXY_MINOR &gt; 7<br>
+<br>
+       VM-&gt;internalIsImmutable = internalIsImmutable;<br>
+       VM-&gt;internalIsMutable   = internalIsMutable;<br>
+       VM-&gt;primitiveFailFor    = primitiveFailFor;<br>
+       VM-&gt;classAlien          = classAlien;<br>
+       VM-&gt;getStackPointer     = (sqInt *(*)(void))getStackPointer;<br>
+       VM-&gt;sendInvokeCallbackStackRegistersJmpbuf = sendInvokeCallbackStackRegistersJmpbuf;<br>
+       VM-&gt;reestablishContextPriorToCallback = reestablishContextPriorToCallback;<br>
+       VM-&gt;classUnsafeAlien    = classUnsafeAlien;<br>
+       VM-&gt;callbackEnter = callbackEnter;<br>
+       VM-&gt;callbackLeave = callbackLeave;<br>
+       VM-&gt;addGCRoot = addGCRoot;<br>
+       VM-&gt;removeGCRoot = removeGCRoot;<br>
+<br>
+#endif<br>
        return VM;<br>
 }<br>
<br>
Modified: trunk/platforms/Cross/vm/sqVirtualMachine.h<br>
===================================================================<br>
--- trunk/platforms/Cross/vm/sqVirtualMachine.h 2010-04-13 18:55:21 UTC (rev 2202)<br>
+++ trunk/platforms/Cross/vm/sqVirtualMachine.h 2010-04-25 19:53:47 UTC (rev 2203)<br>
@@ -9,11 +9,26 @@<br>
    should work with older VMs. */<br>
 #ifndef VM_PROXY_MINOR<br>
 /* Increment the following number if you add functions at the end */<br>
-#define VM_PROXY_MINOR 7<br>
+#define VM_PROXY_MINOR 8<br>
 #endif<br>
<br>
 #include &quot;sqMemoryAccess.h&quot;<br>
<br>
+#if VM_PROXY_MINOR &gt; 7<br>
+# define PrimErrNoErr 0<br>
+# define PrimErrGenericFailure 1<br>
+# define PrimErrBadReceiver 2<br>
+# define PrimErrBadArgument 3<br>
+# define PrimErrBadIndex 4<br>
+# define PrimErrBadNumArgs 5<br>
+# define PrimErrInappropriate 6<br>
+# define PrimErrUnsupported 7<br>
+# define PrimErrNoModification 8<br>
+# define PrimErrNoMemory 9<br>
+# define PrimErrNoCMemory 10<br>
+# define PrimErrNotFound 11<br>
+#endif<br>
+<br>
 typedef sqInt (*CompilerHook)();<br>
<br>
 struct VirtualMachine* sqGetInterpreterProxy(void);<br>
@@ -204,11 +219,52 @@<br>
 #if VM_PROXY_MINOR &gt; 6<br>
        sqInt  (*fetchLong32ofObject)(sqInt fieldFieldIndex, sqInt oop);<br>
        sqInt  (*getThisSessionID)(void);<br>
-       sqInt     (*ioFilenamefromStringofLengthresolveAliases)(char* aCharBuffer, char* filenameIndex, sqInt filenameLength, sqInt resolveFlag);<br>
+       sqInt  (*ioFilenamefromStringofLengthresolveAliases)(char* aCharBuffer, char* filenameIndex, sqInt filenameLength, sqInt resolveFlag);<br>
        sqInt  (*vmEndianness)(void);<br>
 #endif<br>
<br>
+#if VM_PROXY_MINOR &gt; 7<br>
+       sqInt  (*internalIsImmutable)(sqInt oop);<br>
+       sqInt  (*internalIsMutable)(sqInt oop);<br>
+       sqInt  (*primitiveFailFor)(sqInt code);<br>
+       sqInt  (*classAlien)(void);<br>
+       sqInt *(*getStackPointer)(void);<br>
+       sqInt  (*sendInvokeCallbackStackRegistersJmpbuf)(sqInt thunkPtrAsInt, sqInt stackPtrAsInt, sqInt regsPtrAsInt, sqInt jmpBufPtrAsInt);<br>
+       sqInt  (*reestablishContextPriorToCallback)(sqInt callbackContext);<br>
+       sqInt  (*classUnsafeAlien)(void);<br>
+       /* New methods for proxy version 1.8 */<br>
+<br>
+       /* callbackEnter: Re-enter the interpreter loop for a callback.<br>
+       Arguments:<br>
+       callbackID: Pointer to a location receiving the callback ID<br>
+       used in callbackLeave<br>
+       Returns: True if successful, false otherwise */<br>
+       sqInt (*callbackEnter)(sqInt *callbackID);<br>
+<br>
+       /* callbackLeave: Leave the interpreter from a previous callback<br>
+       Arguments:<br>
+       callbackID: The ID of the callback received from callbackEnter()<br>
+       Returns: True if succcessful, false otherwise. */<br>
+       sqInt (*callbackLeave)(sqInt  callbackID);<br>
+<br>
+       /* addGCRoot: Add a variable location to the garbage collector.<br>
+       The contents of the variable location will be updated accordingly.<br>
+       Arguments:<br>
+       varLoc: Pointer to the variable location<br>
+       Returns: True if successful, false otherwise. */<br>
+       sqInt (*addGCRoot)(sqInt *varLoc);<br>
+<br>
+       /* removeGCRoot: Remove a variable location from the garbage collector.<br>
+       Arguments:<br>
+       varLoc: Pointer to the variable location<br>
+       Returns: True if successful, false otherwise.<br>
+       */<br>
+       sqInt (*removeGCRoot)(sqInt *varLoc);<br>
+#endif<br>
<br>
+#if VM_PROXY_MINOR &gt; 8<br>
+#endif<br>
+<br>
 } VirtualMachine;<br>
<br>
 #endif /* _SqueakVM_H */<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Javier Pimás<br>Ciudad de Buenos Aires<br>