VM Maker: VMMaker.oscog-eem.2464.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VM Maker: VMMaker.oscog-eem.2464.mcz

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

==================== 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:
  [:k|
  Undeclared declare: k from: pool].
  "Declare opcodeSymbolSequence's elements from LastRTLCode on up."
  opcodeSymbolSequence withIndexDo:
  [:classVarName :value|
  pool
  declare: classVarName from: Undeclared;
  at: classVarName put: value + LastRTLCode - 1]!