[Vm-dev] VM Maker: VMMaker.oscog-eem.2343.mcz

Tobias Pape Das.Linux at gmx.de
Wed Mar 7 18:24:12 UTC 2018


> On 07.03.2018, at 18:26, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> 
> Hi Tobias,
> 
> On Tue, Mar 6, 2018 at 10:31 PM, Tobias Pape <Das.Linux at gmx.de> wrote:
> 
> Hi Eliot,
> 
> > On 06.03.2018, at 21:22, commits at source.squeak.org wrote:
> >
> >
> > Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
> > http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2343.mcz
> >
> > ==================== Summary ====================
> >
> > Name: VMMaker.oscog-eem.2343
> > Author: eem
> > Time: 6 March 2018, 12:21:51.336493 pm
> > UUID: e603efa4-c652-41e1-a981-6814acaca9f3
> > Ancestors: VMMaker.oscog-topa.2342
> >
> > Better comment Tobias' inclusion of config.h in all plugins.  Also ensure (almost) no duplications can occur.
> >
> 
> Thanks for making this better :D
> 
> 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. 
> 

Hey, there's nothing to ask for forgiveness for o_O.
Everything's fine.
Also, the screencast is fine :D

Best regards
	-Tobias


> Best regards
>         -Tobias
> 
> > Fix a typo in primitiveVMParameter and a compiler warning in primitiveSignalAtMilliseconds (deltaMsecs < 0 implies that deltaMsecs is signed).
> >
> > =============== Diff against VMMaker.oscog-topa.2342 ===============
> >
> > Item was changed:
> >  ----- Method: StackInterpreterPrimitives>>primitiveSignalAtMilliseconds (in category 'system control primitives') -----
> >  primitiveSignalAtMilliseconds
> >       "Cause the time semaphore, if one has been registered, to be
> >        signalled when the microsecond clock is greater than or equal to
> >        the given tick value. A tick value of zero turns off timer interrupts."
> >       | msecsObj msecs deltaMsecs sema |
> >       <var: #msecs type: #usqInt>
> > +     <var: #deltaMsecs type: #sqLong>
> > -     <var: #deltaMsecs type: #usqLong>
> >       msecsObj := self stackTop.
> >       sema := self stackValue: 1.
> >       msecs := self positive32BitValueOf: msecsObj.
> >
> >       self successful ifTrue:
> >               [(objectMemory isSemaphoreOop: sema) ifTrue:
> >                       [objectMemory splObj: TheTimerSemaphore put: sema.
> >                        deltaMsecs := msecs - (self ioMSecs bitAnd: MillisecondClockMask).
> >                        deltaMsecs < 0 ifTrue:
> >                               [deltaMsecs := deltaMsecs + MillisecondClockMask + 1].
> >                        nextWakeupUsecs := self ioUTCMicroseconds + (deltaMsecs * 1000).
> >                        ^self pop: 2].
> >                sema = objectMemory nilObject ifTrue:
> >                       [objectMemory
> >                               storePointer: TheTimerSemaphore
> >                               ofObject: objectMemory specialObjectsOop
> >                               withValue: objectMemory nilObject.
> >                        nextWakeupUsecs := 0.
> >                        ^self pop: 2]].
> >       self primitiveFailFor: PrimErrBadArgument!
> >
> > Item was changed:
> >  ----- Method: StackInterpreterPrimitives>>primitiveVMParameter (in category 'system control primitives') -----
> > (excessive size, no diff calculated)
> >
> > Item was changed:
> >  ----- Method: VMPluginCodeGenerator>>emitCHeaderOn: (in category 'C code generator') -----
> >  emitCHeaderOn: aStream
> > +     "Write a C file header onto the given stream, adding include files and some basic definitions."
> > +     | standardHeaders |
> > +     aStream nextPutAll: (self fileHeaderVersionStampForSourceClass: pluginClass); cr; cr.
> > -     "Write a C file header onto the given stream."
> >
> > +     "config.h should always go first because config.h properly defines flags.
> > +      One of those is _GNU_SOURCE, as explained in https://www.gnu.org/software/autoconf/manual/autoconf.html#Posix-Variants,
> > +      where the Autoconf macro AC_USE_SYSTEM_EXTENSIONS makes sure this is defined."
> > +     standardHeaders := #('"config.h"' '<math.h>' '<stdio.h>' '<stdlib.h>' '<string.h>' '<time.h>').
> > +     self emitHeaderFiles: standardHeaders on: aStream.
> > -     aStream nextPutAll: (self fileHeaderVersionStampForSourceClass: pluginClass).
> > -     aStream cr; cr.
> >
> > +     headerFiles := headerFiles copyWithoutAll: standardHeaders.
> > -     #('<math.h>' '<stdio.h>' '<stdlib.h>' '<string.h>' '<time.h>') reverseDo:
> > -             [:hdr| self addHeaderFileFirst: hdr].
> > -     self addHeaderFileFirst: '"config.h"'. "Should always go first"
> > -
> >       "Additional header files; include C library ones first."
> >       self emitHeaderFiles: (headerFiles select: [:hdr| hdr includes: $<]) on: aStream.
> >
> > +     aStream cr; nextPutAll: '/* Default EXPORT macro that does nothing (see comment in sq.h): */
> > -     aStream cr; nextPutAll:'/* Default EXPORT macro that does nothing (see comment in sq.h): */
> >  #define EXPORT(returnType) returnType
> >
> >  /* Do not include the entire sq.h file but just those parts needed. */
> >  #include "sqConfig.h"                        /* Configuration options */
> >  #include "sqVirtualMachine.h"        /*  The virtual machine proxy definition */
> >  #include "sqPlatformSpecific.h"      /* Platform specific definitions */
> >
> >  #define true 1
> >  #define false 0
> >  #define null 0  /* using ''null'' because nil is predefined in Think C */
> >  #ifdef SQUEAK_BUILTIN_PLUGIN
> >  # undef EXPORT
> >  # define EXPORT(returnType) static returnType
> >  #endif'; cr; cr.
> >       self addHeaderFile: '"sqMemoryAccess.h"'.
> >       "Additional header files; include squeak VM ones last"
> >       self emitHeaderFiles: (headerFiles reject: [:hdr| hdr includes: $<]) on: aStream.
> >       self maybePutPreambleFor: pluginClass on: aStream.
> >       aStream cr!
> >
> 
> 
> 
> 
> -- 
> _,,,^..^,,,_
> best, Eliot



More information about the Vm-dev mailing list