'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! !