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

commits at source.squeak.org commits at source.squeak.org
Thu Jul 16 23:52:36 UTC 2020


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

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

Name: VMMaker.oscog-eem.2776
Author: eem
Time: 16 July 2020, 4:52:27.299313 pm
UUID: 9f8a0f46-28c8-4139-8366-088e6e75e4cd
Ancestors: VMMaker.oscog-eem.2775

Oops!  Fix a regression from VMMaker.oscog-eem.2774.  Slang isn't smart enough to emit types for C's funky example typing for functions that return pointers to functions, so we have to manually type genInvokeInterpretTrampoline.

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

Item was changed:
  ----- Method: Cogit>>genInvokeInterpretTrampoline (in category 'initialization') -----
  genInvokeInterpretTrampoline
  	"Switch to the C stack (do *not* save the Smalltalk stack pointers;
  	 this is the caller's responsibility), and invoke interpret PDQ."
+ 	<returnTypeC: 'void (*genInvokeInterpretTrampoline(void))(void)'>
  	| startAddress |
  	<inline: false>
  	startAddress := methodZoneBase.
  	self zeroOpcodeIndex.
  	backEnd hasVarBaseRegister ifTrue:
  		[self MoveCq: self varBaseAddress R: VarBaseReg]. "Must happen first; value may be used in genLoadStackPointers"
  	cFramePointerInUse
  		ifTrue: [backEnd genLoadCStackPointers]
  		ifFalse: [backEnd genLoadCStackPointer].
  	"Sideways call interpret so that the stack looks correct, for exception handling etc"
  	backEnd genMarshallNArgs: 0 arg: nil arg: nil arg: nil arg: nil.
  	backEnd hasLinkRegister
  		ifTrue:
  			[self MoveAw: coInterpreter cReturnAddressAddress R: LinkReg]
  		ifFalse:
  			[self MoveAw: coInterpreter cReturnAddressAddress R: ABIResultReg.
  			 backEnd genSubstituteReturnAddressR: ABIResultReg].
  	self JumpFullRT: (self
  						cCode: [#interpret asUnsignedInteger]
  						inSmalltalk: [self simulatedTrampolineFor: #interpret]).
  	self outputInstructionsForGeneratedRuntimeAt: startAddress.
  	self recordGeneratedRunTime: 'ceInvokeInterpret' address: startAddress.
  	^self cCoerceSimple: startAddress to: #'void (*)(void)'!



More information about the Vm-dev mailing list