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

commits at source.squeak.org commits at source.squeak.org
Fri Apr 24 04:42:43 UTC 2020

Eliot Miranda uploaded a new version of VMMaker to project VM Maker:

==================== Summary ====================

Name: VMMaker.oscog-eem.2744
Author: eem
Time: 23 April 2020, 9:42:29.275532 pm
UUID: 0273a0b2-9293-4e5f-b9ff-546a7d6a8270
Ancestors: VMMaker.oscog-eem.2743

Slang: Make sure plugins include sqMathShim.h immediately aftyer math.h so that BIT_IDENTICAL_FLOATING_POINT works for plugins too.

=============== Diff against VMMaker.oscog-eem.2743 ===============

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.
  	"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>' '"sqMathShim.h"' '<stdio.h>' '<stdlib.h>' '<string.h>' '<time.h>').
- 	standardHeaders := #('"config.h"' '<math.h>' '<stdio.h>' '<stdlib.h>' '<string.h>' '<time.h>').
  	self emitHeaderFiles: standardHeaders on: aStream.
  	headerFiles := headerFiles copyWithoutAll: standardHeaders.
  	"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): */
  #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 */
  # undef EXPORT
  # define EXPORT(returnType) static returnType
  # define INT_EXT "(i)"
  # define INT_EXT "(e)"
  #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!

More information about the Vm-dev mailing list