[Vm-dev] [Cog] Cannot generate code anymore

Igor Stasenko siguctua at gmail.com
Thu Dec 20 03:12:04 UTC 2012

yeah.. just looked again at #buildCodeGeneratorForCogit: getAPIMethods

	cogitClasses := OrderedCollection new.
	[cogitClasses addFirst: cogitClass.
	 cogitClass ~~ Cogit
	 and: [cogitClass inheritsFrom: Cogit]] whileTrue:
		[cogitClass := cogitClass superclass].
	cogitClasses addFirst: VMClass.
	cogitClasses addAllLast: self cogitClass ancilliaryClasses.
	cogitClasses do: [:cgc| cg addClass: cgc].
	(cg structClassesForTranslationClasses: cogitClasses) do:
		[:structClass| cg addStructClass: structClass].

see what wrong there?

it letting vmmaker to decide for a class what to do, instead letting
class to decide for itself.
This logic is clearly do not belongs to right place.

More information about the Vm-dev mailing list