<div dir="ltr">Hi Tobias,<div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 6, 2018 at 10:31 PM, Tobias Pape <span dir="ltr"><<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi Eliot,<br>
<span class=""><br>
> On 06.03.2018, at 21:22, <a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a> wrote:<br>
><br>
><br>
> Eliot Miranda uploaded a new version of VMMaker to project VM Maker:<br>
> <a href="http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2343.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/<wbr>VMMaker/VMMaker.oscog-eem.<wbr>2343.mcz</a><br>
><br>
> ==================== Summary ====================<br>
><br>
> Name: VMMaker.oscog-eem.2343<br>
> Author: eem<br>
> Time: 6 March 2018, 12:21:51.336493 pm<br>
> UUID: e603efa4-c652-41e1-a981-<wbr>6814acaca9f3<br>
> Ancestors: VMMaker.oscog-topa.2342<br>
><br>
> Better comment Tobias' inclusion of config.h in all plugins.  Also ensure (almost) no duplications can occur.<br>
><br>
<br>
</span>Thanks for making this better :D<br></blockquote><div><br></div><div>Forgive the delay in generating the code.  I have to merge with Alistair's latest commit and got distracted watching and replying to Clément's wonderful screen cast.  It'll be done soon. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Best regards<br>
<span class="HOEnZb"><font color="#888888">        -Tobias<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> Fix a typo in primitiveVMParameter and a compiler warning in primitiveSignalAtMilliseconds (deltaMsecs < 0 implies that deltaMsecs is signed).<br>
><br>
> =============== Diff against VMMaker.oscog-topa.2342 ===============<br>
><br>
> Item was changed:<br>
>  ----- Method: StackInterpreterPrimitives>><wbr>primitiveSignalAtMilliseconds (in category 'system control primitives') -----<br>
>  primitiveSignalAtMilliseconds<br>
>       "Cause the time semaphore, if one has been registered, to be<br>
>        signalled when the microsecond clock is greater than or equal to<br>
>        the given tick value. A tick value of zero turns off timer interrupts."<br>
>       | msecsObj msecs deltaMsecs sema |<br>
>       <var: #msecs type: #usqInt><br>
> +     <var: #deltaMsecs type: #sqLong><br>
> -     <var: #deltaMsecs type: #usqLong><br>
>       msecsObj := self stackTop.<br>
>       sema := self stackValue: 1.<br>
>       msecs := self positive32BitValueOf: msecsObj.<br>
><br>
>       self successful ifTrue:<br>
>               [(objectMemory isSemaphoreOop: sema) ifTrue:<br>
>                       [objectMemory splObj: TheTimerSemaphore put: sema.<br>
>                        deltaMsecs := msecs - (self ioMSecs bitAnd: MillisecondClockMask).<br>
>                        deltaMsecs < 0 ifTrue:<br>
>                               [deltaMsecs := deltaMsecs + MillisecondClockMask + 1].<br>
>                        nextWakeupUsecs := self ioUTCMicroseconds + (deltaMsecs * 1000).<br>
>                        ^self pop: 2].<br>
>                sema = objectMemory nilObject ifTrue:<br>
>                       [objectMemory<br>
>                               storePointer: TheTimerSemaphore<br>
>                               ofObject: objectMemory specialObjectsOop<br>
>                               withValue: objectMemory nilObject.<br>
>                        nextWakeupUsecs := 0.<br>
>                        ^self pop: 2]].<br>
>       self primitiveFailFor: PrimErrBadArgument!<br>
><br>
> Item was changed:<br>
>  ----- Method: StackInterpreterPrimitives>><wbr>primitiveVMParameter (in category 'system control primitives') -----<br>
> (excessive size, no diff calculated)<br>
><br>
> Item was changed:<br>
>  ----- Method: VMPluginCodeGenerator>><wbr>emitCHeaderOn: (in category 'C code generator') -----<br>
>  emitCHeaderOn: aStream<br>
> +     "Write a C file header onto the given stream, adding include files and some basic definitions."<br>
> +     | standardHeaders |<br>
> +     aStream nextPutAll: (self fileHeaderVersionStampForSourc<wbr>eClass: pluginClass); cr; cr.<br>
> -     "Write a C file header onto the given stream."<br>
><br>
> +     "config.h should always go first because config.h properly defines flags.<br>
> +      One of those is _GNU_SOURCE, as explained in <a href="https://www.gnu.org/software/autoconf/manual/autoconf.html#Posix-Variants" rel="noreferrer" target="_blank">https://www.gnu.org/software/<wbr>autoconf/manual/autoconf.html#<wbr>Posix-Variants</a>,<br>
> +      where the Autoconf macro AC_USE_SYSTEM_EXTENSIONS makes sure this is defined."<br>
> +     standardHeaders := #('"config.h"' '<math.h>' '<stdio.h>' '<stdlib.h>' '<string.h>' '<time.h>').<br>
> +     self emitHeaderFiles: standardHeaders on: aStream.<br>
> -     aStream nextPutAll: (self fileHeaderVersionStampForSourc<wbr>eClass: pluginClass).<br>
> -     aStream cr; cr.<br>
><br>
> +     headerFiles := headerFiles copyWithoutAll: standardHeaders.<br>
> -     #('<math.h>' '<stdio.h>' '<stdlib.h>' '<string.h>' '<time.h>') reverseDo:<br>
> -             [:hdr| self addHeaderFileFirst: hdr].<br>
> -     self addHeaderFileFirst: '"config.h"'. "Should always go first"<br>
> -<br>
>       "Additional header files; include C library ones first."<br>
>       self emitHeaderFiles: (headerFiles select: [:hdr| hdr includes: $<]) on: aStream.<br>
><br>
> +     aStream cr; nextPutAll: '/* Default EXPORT macro that does nothing (see comment in sq.h): */<br>
> -     aStream cr; nextPutAll:'/* Default EXPORT macro that does nothing (see comment in sq.h): */<br>
>  #define EXPORT(returnType) returnType<br>
><br>
>  /* Do not include the entire sq.h file but just those parts needed. */<br>
>  #include "sqConfig.h"                        /* Configuration options */<br>
>  #include "sqVirtualMachine.h"        /*  The virtual machine proxy definition */<br>
>  #include "sqPlatformSpecific.h"      /* Platform specific definitions */<br>
><br>
>  #define true 1<br>
>  #define false 0<br>
>  #define null 0  /* using ''null'' because nil is predefined in Think C */<br>
>  #ifdef SQUEAK_BUILTIN_PLUGIN<br>
>  # undef EXPORT<br>
>  # define EXPORT(returnType) static returnType<br>
>  #endif'; cr; cr.<br>
>       self addHeaderFile: '"sqMemoryAccess.h"'.<br>
>       "Additional header files; include squeak VM ones last"<br>
>       self emitHeaderFiles: (headerFiles reject: [:hdr| hdr includes: $<]) on: aStream.<br>
>       self maybePutPreambleFor: pluginClass on: aStream.<br>
>       aStream cr!<br>
><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>