'From Squeak3.2alpha of 10 October 2001 [latest update: #4599] on 24 December 2001 at 1:32:46 am'! "Change Set: TestInterpreterPlugin-cleanup-sr Date: 24 December 2001 Author: Stephan Rudlof Precondition: [FIX] assert: LargeIntegers (assertFIX-md.1.cs.gz), since it changes a method there. Some cleanups: LargeIntegersPlugin>>debugCode moved to Object, since it is a general feature available for TestInterpreterPlugins. Comment explaining the functionality added. LargeIntegersPlugin>>sqAssert moved to TestInterpreterPlugin, since it has general functionality. Code simplified. TestInterpreterPlugin class: one more translation method for comfort. LargeIntegersTest: one simple test method for simulation of the plugin."! !Object methodsFor: 'translation support' stamp: 'sr 12/23/2001 21:38'! debugCode: aBlock "Sending this message tells the code generator that there is debug code in aBlock. Debug code will be be generated only, if the correponding flag has been set by TestCodeGenerator>>generateDebugCode:. In ST simulation just perform the debug code." aBlock value! ! !LargeIntegersTest methodsFor: 'manually' stamp: 'sr 12/23/2001 23:52'! add: aLargeInteger to: anotherLargeInteger "Doesn't normalize!!" "LargeIntegersTest new add: SmallInteger maxVal to: 1" ^ LargeIntegersPlugin doPrimitive: 'primDigitAdd:with:' withArguments: {aLargeInteger. anotherLargeInteger}! ! !TestInterpreterPlugin methodsFor: 'debugging' stamp: 'sr 12/24/2001 00:29'! sqAssert: aBool self debugCode: [aBool ifFalse: [self error: 'Assertion failed!!']. ^ aBool]! ! !TestInterpreterPlugin class methodsFor: 'translation' stamp: 'sr 12/23/2001 22:24'! translateDoInlining: inlineFlag locally: localFlag debug: debugFlag ^ self translate: self moduleName , '.c' doInlining: inlineFlag locally: localFlag debug: debugFlag! ! LargeIntegersPlugin removeSelector: #debugCode:! LargeIntegersPlugin removeSelector: #sqAssert:!