The Trunk: MethodMassage-dtl.69.mcz
| Newsgroups | gmane.comp.lang.smalltalk.squeak.general |
|---|---|
| Message-ID | <[email protected]> |
David T. Lewis uploaded a new version of MethodMassage to project The Trunk: http://source.squeak.org/trunk/MethodMassage-dtl.69.mcz ==================== Summary ==================== Name: MethodMassage-dtl.69 Author: dtl Time: 8 May 2026, 6:35:31.944484 pm UUID: 05ab3247-5447-4f06-ba28-1027dbbc9d8c Ancestors: MethodMassage-ct.69 Additional MethodMassage test coverage. BytecodeAssemblerMethodHeaderTest verifies that method header values are preserved when a compiled method is disassembled and reassembled. See CompiledCode class comment for reference on method header format. =============== Diff against MethodMassage-ct.69 =============== Item was added: + MethodMassageTests subclass: #BytecodeAssemblerMethodHeaderTest + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'MethodMassage-Tests'! + + !BytecodeAssemblerMethodHeaderTest commentStamp: 'dtl 3/14/2026 22:05' prior: 0! + BytecodeAssemblerMethodHeaderTest verifies that method header values are preserved when a compiled method is disassembled and reassembled.! Item was added: + ----- Method: BytecodeAssemblerMethodHeaderTest>>checkHeader: (in category 'header check') ----- + checkHeader: compiledMethod + "Verify that a method header generated by the bytecode assembler matches that + of the original compiled method header." + + | assemblerMethod recompiledMethod | + assemblerMethod := BytecodeDisassembler new disassemble: compiledMethod. + recompiledMethod := BytecodeAssembler new assemble: assemblerMethod. + self assert: compiledMethod header equals: assemblerMethod header description: compiledMethod asString. + self assert: compiledMethod header equals: recompiledMethod header description: compiledMethod asString.! Item was added: + ----- Method: BytecodeAssemblerMethodHeaderTest>>testManyMethodHeaders (in category 'tests') ----- + testManyMethodHeaders + "Verify that the method header generated by the bytecode assembler matches + that of the original compiled method headers for a large set of compiled methods" + + self thisPackage + actualMethodsDo: [:compiledMethod | self checkHeader: compiledMethod]. + (PackageInfo named: #Kernel) + actualMethodsDo: [:compiledMethod | self checkHeader: compiledMethod]. + (PackageInfo named: #Morphic) + actualMethodsDo: [:compiledMethod | self checkHeader: compiledMethod]. + (PackageInfo named: #System) + actualMethodsDo: [:compiledMethod | self checkHeader: compiledMethod]. + ! Item was added: + ----- Method: BytecodeAssemblerMethodHeaderTest>>testMethodHeader (in category 'tests') ----- + testMethodHeader + "Verify that the method header generated by the bytecode assembler matches + that of an original compiled method header. Test with a non-trivial method that + requires largeBit to be set in the header." + + self checkHeader: LargePositiveInteger>>#digitMul23: + ! Squeak-dev mailing list -- [email protected] To unsubscribe send an email to [email protected]