[Vm-dev] VM Maker: VMMaker.oscog-eem.3174.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Mar 10 19:49:31 UTC 2022


Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3174.mcz

==================== Summary ====================

Name: VMMaker.oscog-eem.3174
Author: eem
Time: 10 March 2022, 11:45:52.513666 am
UUID: 2edcc3c8-ba87-4012-b4f4-ea60094be91f
Ancestors: VMMaker.oscog-eem.3173

Fix https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/618 by redefining the extended Push Character bytecode 233. Since character values are unsigned it makes more sense to redefine the bytecode to take extA, the unsigned extension.  While this is potentially dangerous for older images I'm taking this approach because
- AFAICT the exctended bytecode isn't in use in typical code
- those who are affected (primarily Marcel working on extended character support) can upgrade to a fixed VM
- Nicolas has deployed a patch to the compiler that avoids using the extension, and this can be elaborated to check if the VM is new enough before using extA.
- longer term using the unsigned extension is the more correct fix.

=============== Diff against VMMaker.oscog-eem.3173 ===============

Item was changed:
  ----- Method: SimpleStackBasedCogit>>genExtPushCharacterBytecode (in category 'bytecode generators') -----
  genExtPushCharacterBytecode
+ 	"SistaV1:		233		11101001	iiiiiiii		Push Character #iiiiiiii (+ Extend A * 256)"
- 	"SistaV1:		233		11101001	iiiiiiii		Push Character #iiiiiiii (+ Extend B * 256)"
  	| value |
+ 	value := byte1 + (extA << 8).
+ 	extA := 0.
- 	value := byte1 + (extB << 8).
- 	extB := 0.
- 	numExtB := 0.
  	^self genPushLiteral: (objectMemory characterObjectOf: value)!

Item was changed:
  ----- Method: StackInterpreter>>extPushCharacterBytecode (in category 'stack bytecodes') -----
  extPushCharacterBytecode
+ 	"SistaV1:	*	233		11101001	iiiiiiii		Push Character #iiiiiiii (+ Extend A * 256)"
- 	"SistaV1:	*	233		11101001	iiiiiiii		Push Character #iiiiiiii (+ Extend B * 256)"
  	| value |
+ 	value := self fetchByte + (extA << 8).
- 	value := self fetchByte + (extB << 8).
  	self fetchNextBytecode.
  	self internalPush: (objectMemory characterObjectOf: value).
+ 	extA := 0!
- 	numExtB := extB := 0!



More information about the Vm-dev mailing list