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

commits at source.squeak.org commits at source.squeak.org
Fri Oct 19 04:02:35 UTC 2018

Eliot Miranda uploaded a new version of VMMaker to project VM Maker:

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

Name: VMMaker.oscog-eem.2464
Author: eem
Time: 18 October 2018, 9:01:58.401001 pm
UUID: 0b1fa0a3-a781-4fd5-b1cf-1809796ccbbf
Ancestors: VMMaker.oscog-eem.2463

Cogit Slang Reflection:
Fix nasty bug with CogAbstractInstruction computing opcodes via reflection caused by full blocks.  We must use method allLiterals to include literals in blocks now.  SysV is referenced only from blocks in CogX64Compiler class>>#initialize and so with full blocks SysV was being moved to Undeclared, causing invalid source generation for the X64 cogits.

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

Item was changed:
  ----- Method: CogAbstractInstruction class>>initializeSpecificOpcodes:in: (in category 'class initialization') -----
  initializeSpecificOpcodes: opcodeSymbolSequence in: initializeMethod
  	"Declare as class variables, the opcodes in opcodeSymbolSequence.
  	 Assign values to them from LastRTLOpcode on.  Undeclare any obsolete
  	 class vars.  The assumption is that initializeMethod defines all class vars
  	 in the class. This method should be used by subclasses wishing to declare
  	 their own specific opcodes."
  	| pool classVariablesDefinedInMethod |
  	self assert: self ~~ CogAbstractInstruction.
  	pool := initializeMethod methodClass classPool.
  	LastRTLCode ifNil:
  		[CogRTLOpcodes initialize].
+ 	classVariablesDefinedInMethod := (initializeMethod allLiterals select: [:l| l isVariableBinding and: [pool includesKey: l key]]) collect:
- 	classVariablesDefinedInMethod := (initializeMethod literals select: [:l| l isVariableBinding and: [pool includesKey: l key]]) collect:
  											[:ea| ea key].
  	"Undeclare any class var not defined in opcodeSymbolSequence or by the method."
  	(pool keys reject: [:k| (opcodeSymbolSequence includes: k) or: [classVariablesDefinedInMethod includes: k]]) do:
  		Undeclared declare: k from: pool].
  	"Declare opcodeSymbolSequence's elements from LastRTLCode on up."
  	opcodeSymbolSequence withIndexDo:
  		[:classVarName :value|
  			declare: classVarName from: Undeclared;
  			at: classVarName put: value + LastRTLCode - 1]!

More information about the Vm-dev mailing list