Dave Lewis uploaded a new version of VMMaker to project VM Maker: http://www.squeaksource.com/VMMaker/VMMaker-dtl.178.mcz ==================== Summary ==================== Name: VMMaker-dtl.178 Author: dtl Time: 31 May 2010, 4:50:57 am UUID: 650ed951-209c-4361-80f1-3cf6bdb4b0e9 Ancestors: VMMaker-dtl.177 Add ObjectMemoryVariablesTest to document the values of constants defined in ObjectMemory class>>initBytesPerWord: =============== Diff against VMMaker-dtl.177 =============== Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte5Shift (in category 'testing - constants') ----- + testByte5Shift + + "Note - unused for 32-bit object memory, so 32-bit test is no longer relevant + ObjectMemory initBytesPerWord: 4. + self assert: ObjectMemory byte5Shift = 0." + + self assert: ObjectMemory byte5Shift = 40! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte6Shift (in category 'testing - constants') ----- + testByte6Shift + + "Note - unused for 32-bit object memory, so 32-bit test is no longer relevant + ObjectMemory initBytesPerWord: 4. + self assert: ObjectMemory byte6Shift = 0." + + self assert: ObjectMemory byte6Shift = 48! Item was added: + ----- Method: ObjectMemory class>>byte4Mask (in category 'accessing') ----- + byte4Mask + ^Byte4Mask! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte0Mask (in category 'testing - constants') ----- + testByte0Mask + + self assert: ObjectMemory byte0Mask = 16r00000000000000FF! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte7ShiftNegated (in category 'testing - constants') ----- + testByte7ShiftNegated + "Note - signed values are not relevant for bit mask operations, can be recoded as positive" + + "Note - unused for 32-bit object memory, so 32-bit test is no longer relevant + ObjectMemory initBytesPerWord: 4. + self assert: ObjectMemory byte7ShiftNegated = 16r0000000000000000." + + self assert: ObjectMemory byte7ShiftNegated = -16r0000000000000038! Item was added: + ----- Method: ObjectMemory class>>byte5Mask (in category 'accessing') ----- + byte5Mask + ^Byte5Mask! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte1Mask (in category 'testing - constants') ----- + testByte1Mask + + self assert: ObjectMemory byte1Mask = 16r000000000000FF00! Item was added: + ----- Method: ObjectMemory class>>bytes7to4Mask (in category 'accessing') ----- + bytes7to4Mask + ^Bytes7to4Mask! Item was added: + ----- Method: ObjectMemory class>>byte6Mask (in category 'accessing') ----- + byte6Mask + ^Byte6Mask! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte2Mask (in category 'testing - constants') ----- + testByte2Mask + + self assert: ObjectMemory byte2Mask = 16r0000000000FF0000! Item was added: + ----- Method: ObjectMemory class>>byte4ShiftNegated (in category 'accessing') ----- + byte4ShiftNegated + ^Byte4ShiftNegated! Item was added: + ----- Method: ObjectMemory class>>byte1Shift (in category 'accessing') ----- + byte1Shift + ^Byte1Shift! Item was added: + ----- Method: ObjectMemory class>>byte2Shift (in category 'accessing') ----- + byte2Shift + ^Byte2Shift! Item was added: + ----- Method: ObjectMemory class>>byte7Mask (in category 'accessing') ----- + byte7Mask + ^Byte7Mask! Item was added: + ----- Method: ObjectMemory class>>byte6Shift (in category 'accessing') ----- + byte6Shift + ^Byte6Shift! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte3Mask (in category 'testing - constants') ----- + testByte3Mask + + self assert: ObjectMemory byte3Mask = 16r00000000FF000000! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte1ShiftNegated (in category 'testing - constants') ----- + testByte1ShiftNegated + "Note - signed values are not relevant for bit mask operations, can be recoded as positive" + + self assert: ObjectMemory byte1ShiftNegated = -16r0000000000000008.! Item was added: + ----- Method: ObjectMemory class>>byte3ShiftNegated (in category 'accessing') ----- + byte3ShiftNegated + ^Byte3ShiftNegated! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte4Mask (in category 'testing - constants') ----- + testByte4Mask + + "Note - unused for 32-bit object memory, so 32-bit test is no longer relevant + ObjectMemory initBytesPerWord: 4. + self assert: ObjectMemory byte4Mask = 16r0000000000000000." + + self assert: ObjectMemory byte4Mask = 16r000000FF00000000! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte2Shift (in category 'testing - constants') ----- + testByte2Shift + + self assert: ObjectMemory byte2Shift = 16! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte3Shift (in category 'testing - constants') ----- + testByte3Shift + + self assert: ObjectMemory byte3Shift = 24! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte5Mask (in category 'testing - constants') ----- + testByte5Mask + + "Note - unused for 32-bit object memory, so 32-bit test is no longer relevant + ObjectMemory initBytesPerWord: 4. + self assert: ObjectMemory byte5Mask = 16r0000000000000000." + + self assert: ObjectMemory byte5Mask = 16r0000FF0000000000! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte7Shift (in category 'testing - constants') ----- + testByte7Shift + + "Note - unused for 32-bit object memory, so 32-bit test is no longer relevant + ObjectMemory initBytesPerWord: 4. + self assert: ObjectMemory byte7Shift = 0." + + self assert: ObjectMemory byte7Shift = 56! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte3ShiftNegated (in category 'testing - constants') ----- + testByte3ShiftNegated + "Note - signed values are not relevant for bit mask operations, can be recoded as positive" + + self assert: ObjectMemory byte3ShiftNegated = -16r0000000000000018! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte6Mask (in category 'testing - constants') ----- + testByte6Mask + + "Note - unused for 32-bit object memory, so 32-bit test is no longer relevant + ObjectMemory initBytesPerWord: 4. + self assert: ObjectMemory byte6Mask = 16r0000000000000000." + + self assert: ObjectMemory byte6Mask = 16r00FF000000000000! Item was added: + ----- Method: ObjectMemory class>>byte5ShiftNegated (in category 'accessing') ----- + byte5ShiftNegated + ^Byte5ShiftNegated! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte7Mask (in category 'testing - constants') ----- + testByte7Mask + + "Note - unused for 32-bit object memory, so 32-bit test is no longer relevant + ObjectMemory initBytesPerWord: 4. + self assert: ObjectMemory byte7Mask = 16r0000000000000000." + + self assert: ObjectMemory byte7Mask = 16rFF00000000000000! Item was added: + ----- Method: ObjectMemory class>>byte3Shift (in category 'accessing') ----- + byte3Shift + ^Byte3Shift! Item was added: + ----- Method: ObjectMemory class>>byte7Shift (in category 'accessing') ----- + byte7Shift + ^Byte7Shift! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte5ShiftNegated (in category 'testing - constants') ----- + testByte5ShiftNegated + "Note - signed values are not relevant for bit mask operations, can be recoded as positive" + + "Note - unused for 32-bit object memory, so 32-bit test is no longer relevant + ObjectMemory initBytesPerWord: 4. + self assert: ObjectMemory byte5ShiftNegated = 16r0000000000000000." + + self assert: ObjectMemory byte5ShiftNegated = -16r0000000000000028! Item was added: + ----- Method: ObjectMemory class>>byte7ShiftNegated (in category 'accessing') ----- + byte7ShiftNegated + ^Byte7ShiftNegated! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte0Shift (in category 'testing - constants') ----- + testByte0Shift + + self assert: ObjectMemory byte0Shift = 0! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte4ShiftNegated (in category 'testing - constants') ----- + testByte4ShiftNegated + "Note - signed values are not relevant for bit mask operations, can be recoded as positive" + + "Note - unused for 32-bit object memory, so 32-bit test is no longer relevant + ObjectMemory initBytesPerWord: 4. + self assert: ObjectMemory byte4ShiftNegated = 16r0000000000000000." + + self assert: ObjectMemory byte4ShiftNegated = -16r0000000000000020! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte4Shift (in category 'testing - constants') ----- + testByte4Shift + + "Note - unused for 32-bit object memory, so 32-bit test is no longer relevant + ObjectMemory initBytesPerWord: 4. + self assert: ObjectMemoryConstantsAccess byte4Shift = 0." + + self assert: ObjectMemory byte4Shift = 32! Item was added: + TestCase subclass: #ObjectMemoryVariablesTest + instanceVariableNames: 'saveWordSize omv32 omv64' + classVariableNames: '' + poolDictionaries: '' + category: 'VMMaker-Tests'! + + !ObjectMemoryVariablesTest commentStamp: 'dtl 5/31/2010 16:47' prior: 0! + ObjectMemoryVariablesTest validates the values of the constants defined in ObjectMemory class>>initBytesPerWord: + + The intent is to enable rewriting these constants in a manner that permits them to be fully defined as C preprocessor macros at compile time, such that separate code generation is not required for 32-bit and 64-bit object memory. + + See CCodeGenerator>>emitDefineBytesPerWordOn: for the C preprocessor macro definitions.! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testBytes7to4Mask (in category 'testing - constants') ----- + testBytes7to4Mask + + "Note - unused for 32-bit object memory, so 32-bit test is no longer relevant + ObjectMemory initBytesPerWord: 4. + self assert: ObjectMemory bytes7to4Mask = 16r0000000000000000." + + self assert: ObjectMemory bytes7to4Mask = 16rFFFFFFFF00000000! Item was added: + ----- Method: ObjectMemory class>>byte1ShiftNegated (in category 'accessing') ----- + byte1ShiftNegated + ^Byte1ShiftNegated! Item was added: + ----- Method: ObjectMemory class>>byte0Mask (in category 'accessing') ----- + byte0Mask + ^Byte0Mask! Item was added: + ----- Method: ObjectMemory class>>byte0Shift (in category 'accessing') ----- + byte0Shift + ^Byte0Shift! Item was added: + ----- Method: ObjectMemory class>>byte1Mask (in category 'accessing') ----- + byte1Mask + ^Byte1Mask! Item was added: + ----- Method: ObjectMemory class>>byte4Shift (in category 'accessing') ----- + byte4Shift + ^Byte4Shift! Item was added: + ----- Method: ObjectMemory class>>byte5Shift (in category 'accessing') ----- + byte5Shift + ^Byte5Shift! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testBytes3to0Mask (in category 'testing - constants') ----- + testBytes3to0Mask + + "Note - unused for 32-bit object memory, so 32-bit test is no longer relevant + ObjectMemory initBytesPerWord: 4. + self assert: ObjectMemory bytes3to0Mask = 16r0000000000000000." + + self assert: ObjectMemory bytes3to0Mask = 16r00000000FFFFFFFF! Item was added: + ----- Method: ObjectMemory class>>byte2Mask (in category 'accessing') ----- + byte2Mask + ^Byte2Mask! Item was added: + ----- Method: ObjectMemory class>>bytes3to0Mask (in category 'accessing') ----- + bytes3to0Mask + ^Bytes3to0Mask! Item was added: + ----- Method: ObjectMemory class>>byte3Mask (in category 'accessing') ----- + byte3Mask + ^Byte3Mask! Item was added: + ----- Method: ObjectMemoryVariablesTest>>testByte1Shift (in category 'testing - constants') ----- + testByte1Shift + + self assert: ObjectMemory byte1Shift = 8! |
Free forum by Nabble | Edit this page |