[Vm-dev] Squeak3D plugin code generation broken by latest update

David T. Lewis lewis at mail.msen.com
Thu Dec 3 02:23:25 UTC 2015


Hi Tim,

The latest update in Balloon3D-Plugins-tpr.9 breaks code generation for VMM trunk.
A fixed version is attached.

This keeps your changes for #inferTypesForImplicitlyTypedVariablesAndMethods and
#pruneUnusedInterpreterPluginMethodsIn: but reverts the change that removed
B3DEnginePlugin from the classes being added to the code generator (I am not
sure if that was just a mistake or if there is something different about how
the code generator is being assembled on oscog).

I can confirm that this works again on VMM trunk but I can't easily check it
on oscog right now. Can you please review and commit back to the Balloon3D
repository as needed (I don't have write access).

Note, there is a monitor job at http://build.squeak.org/job/InterpreterVM/ that
should turn green again once this update is done.

Thanks,
Dave

-------------- next part --------------
'From Squeak4.5 of 23 November 2015 [latest update: #1193] on 2 December 2015 at 9:12:59 pm'!

!B3DEnginePlugin class methodsFor: 'translation' stamp: 'dtl 12/1/2015 22:51'!
translateInDirectory: directory doInlining: inlineFlag
"Special case for the 3D code. Check all the classes' timestamps, not just one"
	| cg fname fstat tStamp|
	 fname := self moduleName, '.c'.
	tStamp := 0.

	tStamp := { B3DEnginePlugin. B3DTransformerPlugin. B3DVertexBufferPlugin. B3DShaderPlugin. B3DClipperPlugin. B3DPickerPlugin. B3DRasterizerPlugin} inject: 0 into: [:tS :cl|
		tS max: cl timeStamp].

	"don't translate if the file is newer than my timeStamp"
	fstat := directory entryAt: fname ifAbsent:[nil].
	fstat ifNotNil:[tStamp < fstat modificationTime ifTrue:[^nil]].

	self initialize.

	cg := self buildCodeGeneratorUpTo: InterpreterPlugin.

	{  B3DEnginePlugin. B3DTransformerPlugin. B3DVertexBufferPlugin. B3DShaderPlugin. B3DClipperPlugin. B3DPickerPlugin. B3DRasterizerPlugin} do: 
		[:theClass | 
		theClass initialize.
		cg addClass: theClass.
		theClass declareCVarsIn: cg].
	cg inferTypesForImplicitlyTypedVariablesAndMethods.
	self pruneUnusedInterpreterPluginMethodsIn: cg.
	cg storeCodeOnFile: (directory fullNameFor: fname)  doInlining: inlineFlag.
	^cg exportedPrimitiveNames asArray! !


More information about the Vm-dev mailing list