[Vm-dev] VM Maker: VMMaker.oscog-mt.3136.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Jan 11 12:47:19 UTC 2022
Marcel Taeumel uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-mt.3136.mcz
==================== Summary ====================
Name: VMMaker.oscog-mt.3136
Author: mt
Time: 11 January 2022, 1:45:31.576763 pm
UUID: 0cac7e2e-8274-de48-8822-a05e61d28997
Ancestors: VMMaker.oscog-mt.3135
Addition to previous commit. #primitiveZipSendBlock is invoked from ZipEncoder, which is a WriteStream, not a ReadStream.
=============== Diff against VMMaker.oscog-mt.3135 ===============
Item was changed:
----- Method: DeflatePlugin>>primitiveZipSendBlock (in category 'primitives') -----
primitiveZipSendBlock
| distTree litTree distStream litStream rcvr result |
<export: true>
interpreterProxy methodArgumentCount = 4
ifFalse:[^interpreterProxy primitiveFail].
distTree := interpreterProxy stackObjectValue: 0.
litTree := interpreterProxy stackObjectValue: 1.
distStream := interpreterProxy stackObjectValue: 2.
litStream := interpreterProxy stackObjectValue: 3.
rcvr := interpreterProxy stackObjectValue: 4.
interpreterProxy failed ifTrue:[^nil].
(self loadZipEncoderFrom: rcvr)
ifFalse:[^interpreterProxy primitiveFail].
((interpreterProxy isPointers: distTree) and:[
(interpreterProxy slotSizeOf: distTree) >= 2])
ifFalse:[^interpreterProxy primitiveFail].
((interpreterProxy isPointers: litTree) and:[
(interpreterProxy slotSizeOf: litTree) >= 2])
ifFalse:[^interpreterProxy primitiveFail].
((interpreterProxy isPointers: litStream) and:[
(interpreterProxy slotSizeOf: litStream) >= 3])
ifFalse:[^interpreterProxy primitiveFail].
((interpreterProxy isPointers: distStream) and:[
(interpreterProxy slotSizeOf: distStream) >= 3])
ifFalse:[^interpreterProxy primitiveFail].
self cCode:'' inSmalltalk:[
zipMatchLengthCodes := CArrayAccessor on: ZipWriteStream matchLengthCodes.
zipDistanceCodes := CArrayAccessor on: ZipWriteStream distanceCodes.
zipExtraLengthBits := CArrayAccessor on: ZipWriteStream extraLengthBits.
zipExtraDistanceBits := CArrayAccessor on: ZipWriteStream extraDistanceBits.
zipBaseLength := CArrayAccessor on: ZipWriteStream baseLength.
zipBaseDistance := CArrayAccessor on: ZipWriteStream baseDistance].
result := self sendBlock: litStream with: distStream with: litTree with: distTree.
interpreterProxy failed ifFalse:[
interpreterProxy storeInteger: 1 ofObject: rcvr withValue: zipPosition.
+ interpreterProxy storeInteger: writeStreamInstSize + 0 ofObject: rcvr withValue: zipBitBuf.
+ interpreterProxy storeInteger: writeStreamInstSize + 1 ofObject: rcvr withValue: zipBitPos.
- interpreterProxy storeInteger: readStreamInstSize + 0 ofObject: rcvr withValue: zipBitBuf.
- interpreterProxy storeInteger: readStreamInstSize + 1 ofObject: rcvr withValue: zipBitPos.
].
interpreterProxy failed ifFalse:[
interpreterProxy pop: 5. "rcvr + args"
interpreterProxy pushInteger: result.
].!
More information about the Vm-dev
mailing list