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

commits at source.squeak.org commits at source.squeak.org
Tue Dec 10 02:59:06 UTC 2013


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

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

Name: VMMaker.oscog-eem.552
Author: eem
Time: 9 December 2013, 6:56:18.851 pm
UUID: d9a4ccd9-8b55-4220-b356-053cf0de2d9d
Ancestors: VMMaker.oscog-eem.551

Implement machine-code at:put: for strings (64) and objects (61)
for Spur, although 61 is disabled (not yet working).
Add support for MoveR:Xbr:R: to CogIA32Compiler.

Refactor genStoreSourceReg:slotIndex:destReg:scratchReg: into
genStoreCheckReceiverReg:valueReg:scratchReg: for the at:put:
store check.

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

Item was changed:
  ----- Method: CogIA32Compiler>>computeMaximumSize (in category 'generate machine code') -----
  computeMaximumSize
  	"Compute the maximum size for each opcode.  This allows jump offsets to
  	 be determined, provided that all backward branches are long branches."
  	"N.B.  The ^maxSize := N forms are to get around the compiler's long branch
  	 limits which are exceeded when each case jumps around the otherwise."
  	opcode caseOf: {
  		"Noops & Pseudo Ops"
  		[Label]					-> [^maxSize := 0].
  		[AlignmentNops]		-> [^maxSize := (operands at: 0) - 1].
  		[Fill16]					-> [^maxSize := 2].
  		[Fill32]					-> [^maxSize := 4].
  		[FillFromWord]			-> [^maxSize := 4].
  		[Nop]					-> [^maxSize := 1].
  		"Specific Control/Data Movement"
  		[CDQ]					-> [^maxSize := 1].
  		[IDIVR]					-> [^maxSize := 2].
  		[IMULRR]				-> [^maxSize := 3].
  		[CPUID]					-> [^maxSize := 2].
  		[CMPXCHGAwR]			-> [^maxSize := 7].
  		[CMPXCHGMwrR]		-> [^maxSize := 8].
  		[LFENCE]				-> [^maxSize := 3].
  		[MFENCE]				-> [^maxSize := 3].
  		[SFENCE]				-> [^maxSize := 3].
  		[LOCK]					-> [^maxSize := 1].
  		[XCHGAwR]				-> [^maxSize := 6].
  		[XCHGMwrR]			-> [^maxSize := 7].
  		[XCHGRR]				-> [^maxSize := 2].
  		"Control"
  		[Call]					-> [^maxSize := 5].
  		[JumpR]					-> [^maxSize := 2].
  		[Jump]					-> [self resolveJumpTarget. ^maxSize := 5].
  		[JumpLong]				-> [self resolveJumpTarget. ^maxSize := 5].
  		[JumpZero]				-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpNonZero]			-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpNegative]			-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpNonNegative]		-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpOverflow]			-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpNoOverflow]		-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpCarry]				-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpNoCarry]			-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpLess]				-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpGreaterOrEqual]	-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpGreater]			-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpLessOrEqual]		-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpBelow]				-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpAboveOrEqual]		-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpAbove]			-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpBelowOrEqual]		-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpLongZero]			-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpLongNonZero]		-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpFPEqual]			-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpFPNotEqual]		-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpFPLess]			-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpFPGreaterOrEqual]	-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpFPGreater]			-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpFPLessOrEqual]	-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpFPOrdered]		-> [self resolveJumpTarget. ^maxSize := 6].
  		[JumpFPUnordered]		-> [self resolveJumpTarget. ^maxSize := 6].
  		[RetN]					-> [^maxSize := (operands at: 0) = 0
  													ifTrue: [1]
  													ifFalse: [3]].
  		"Arithmetic"
  		[AddCqR]		-> [^maxSize := (self isQuick: (operands at: 0))
  											ifTrue: [3]
  											ifFalse: [(self concreteRegister: (operands at: 1)) = EAX
  														ifTrue: [5]
  														ifFalse: [6]]].
  		[AndCqR]		-> [^maxSize := (self isQuick: (operands at: 0))
  											ifTrue: [3]
  											ifFalse: [(self concreteRegister: (operands at: 1)) = EAX
  														ifTrue: [5]
  														ifFalse: [6]]].
  		[CmpCqR]		-> [^maxSize := (self isQuick: (operands at: 0))
  											ifTrue: [3]
  											ifFalse: [(self concreteRegister: (operands at: 1)) = EAX
  														ifTrue: [5]
  														ifFalse: [6]]].
  		[OrCqR]			-> [^maxSize := (self isQuick: (operands at: 0))
  											ifTrue: [3]
  											ifFalse: [(self concreteRegister: (operands at: 1)) = EAX
  														ifTrue: [5]
  														ifFalse: [6]]].
  		[SubCqR]		-> [^maxSize := (self isQuick: (operands at: 0))
  											ifTrue: [3]
  											ifFalse: [(self concreteRegister: (operands at: 1)) = EAX
  														ifTrue: [5]
  														ifFalse: [6]]].
  		[AddCwR]		-> [^maxSize := (self concreteRegister: (operands at: 1)) = EAX
  														ifTrue: [5]
  														ifFalse: [6]].
  		[AndCwR]		-> [^maxSize := (self concreteRegister: (operands at: 1)) = EAX
  														ifTrue: [5]
  														ifFalse: [6]].
  		[CmpCwR]		-> [^maxSize := (self concreteRegister: (operands at: 1)) = EAX
  														ifTrue: [5]
  														ifFalse: [6]].
  		[OrCwR]		-> [^maxSize := (self concreteRegister: (operands at: 1)) = EAX
  														ifTrue: [5]
  														ifFalse: [6]].
  		[SubCwR]		-> [^maxSize := (self concreteRegister: (operands at: 1)) = EAX
  														ifTrue: [5]
  														ifFalse: [6]].
  		[XorCwR]		-> [^maxSize := (self concreteRegister: (operands at: 1)) = EAX
  														ifTrue: [5]
  														ifFalse: [6]].
  		[AddRR]			-> [^maxSize := 2].
  		[AndRR]			-> [^maxSize := 2].
  		[CmpRR]		-> [^maxSize := 2].
  		[OrRR]			-> [^maxSize := 2].
  		[XorRR]			-> [^maxSize := 2].
  		[SubRR]			-> [^maxSize := 2].
  		[NegateR]		-> [^maxSize := 2].
  		[LoadEffectiveAddressMwrR]
  						-> [^maxSize := ((self isQuick: (operands at: 0))
  											ifTrue: [3]
  											ifFalse: [6])
  										+ ((self concreteRegister: (operands at: 1)) = ESP
  											ifTrue: [1]
  											ifFalse: [0])].
  		[LogicalShiftLeftCqR]		-> [^maxSize := (operands at: 0) = 1
  														ifTrue: [2]
  														ifFalse: [3]].
  		[LogicalShiftRightCqR]	-> [^maxSize := (operands at: 0) = 1
  														ifTrue: [2]
  														ifFalse: [3]].
  		[ArithmeticShiftRightCqR]	-> [^maxSize := (operands at: 0) = 1
  														ifTrue: [2]
  														ifFalse: [3]].
  		[LogicalShiftLeftRR]		-> [self computeShiftRRSize].
  		[LogicalShiftRightRR]		-> [self computeShiftRRSize].
  		[ArithmeticShiftRightRR]	-> [self computeShiftRRSize].
  		[AddRdRd]				-> [^maxSize := 4].
  		[CmpRdRd]				-> [^maxSize := 4].
  		[SubRdRd]				-> [^maxSize := 4].
  		[MulRdRd]				-> [^maxSize := 4].
  		[DivRdRd]				-> [^maxSize := 4].
  		[SqrtRd]					-> [^maxSize := 4].
  		"Data Movement"
  		[MoveCqR]		-> [^maxSize := (operands at: 0) = 0 ifTrue: [2] ifFalse: [5]].
  		[MoveCwR]		-> [^maxSize := 5].
  		[MoveRR]		-> [^maxSize := 2].
  		[MoveRdRd]		-> [^maxSize := 4].
  		[MoveAwR]		-> [^maxSize := (self concreteRegister: (operands at: 1)) = EAX
  											ifTrue: [5]
  											ifFalse: [6]].
  		[MoveRAw]		-> [^maxSize := (self concreteRegister: (operands at: 0)) = EAX
  											ifTrue: [5]
  											ifFalse: [6]].
  		[MoveRMwr]		-> [^maxSize := ((self isQuick: (operands at: 1))
  											ifTrue: [3]
  											ifFalse: [6])
  										+ ((self concreteRegister: (operands at: 2)) = ESP
  											ifTrue: [1]
  											ifFalse: [0])].
  		[MoveRdM64r]	-> [^maxSize := ((self isQuick: (operands at: 1))
  											ifTrue: [5]
  											ifFalse: [8])
  										+ ((self concreteRegister: (operands at: 2)) = ESP
  											ifTrue: [1]
  											ifFalse: [0])].
  		[MoveMbrR]		-> [^maxSize := ((self isQuick: (operands at: 0))
  											ifTrue: [3]
  											ifFalse: [6])
  										+ ((self concreteRegister: (operands at: 1)) = ESP
  											ifTrue: [1]
  											ifFalse: [0])].
  		[MoveRMbr]		-> [^maxSize := ((self isQuick: (operands at: 1))
  											ifTrue: [3]
  											ifFalse: [6])
  										+ ((self concreteRegister: (operands at: 2)) = ESP
  											ifTrue: [1]
  											ifFalse: [0])].
  		[MoveM16rR]	-> [^maxSize := ((self isQuick: (operands at: 0))
  											ifTrue: [4]
  											ifFalse: [7])
  										+ ((self concreteRegister: (operands at: 1)) = ESP
  											ifTrue: [1]
  											ifFalse: [0])].
  		[MoveM64rRd]	-> [^maxSize := ((self isQuick: (operands at: 0))
  											ifTrue: [5]
  											ifFalse: [8])
  										+ ((self concreteRegister: (operands at: 1)) = ESP
  											ifTrue: [1]
  											ifFalse: [0])].
  		[MoveMwrR]		-> [^maxSize := ((self isQuick: (operands at: 0))
  											ifTrue: [3]
  											ifFalse: [6])
  										+ ((self concreteRegister: (operands at: 1)) = ESP
  											ifTrue: [1]
  											ifFalse: [0])].
  		[MoveXbrRR]	-> [self assert: (self concreteRegister: (operands at: 0)) ~= ESP.
  							^maxSize := (self concreteRegister: (operands at: 1)) = EBP
  											ifTrue: [5]
  											ifFalse: [4]].
+ 		[MoveRXbrR]	->	[self assert: (self concreteRegister: (operands at: 1)) ~= ESP.
+ 							^maxSize := (self concreteRegister: (operands at: 2)) = EBP
+ 											ifTrue: [4]
+ 											ifFalse: [3]].
  		[MoveXwrRR]	-> [self assert: (self concreteRegister: (operands at: 0)) ~= ESP.
  							^maxSize := (self concreteRegister: (operands at: 1)) = EBP
  											ifTrue: [4]
  											ifFalse: [3]].
  		[MoveRXwrR]	-> [self assert: (self concreteRegister: (operands at: 1)) ~= ESP.
  							^maxSize := (self concreteRegister: (operands at: 2)) = EBP
  											ifTrue: [4]
  											ifFalse: [3]].
  		[PopR]			-> [^maxSize := 1].
  		[PushR]			-> [^maxSize := 1].
  		[PushCw]		-> [^maxSize := 5].
  		[PrefetchAw]	-> [^maxSize := self hasSSEInstructions ifTrue: [7] ifFalse: [0]].
  		"Conversion"
  		[ConvertRRd]	-> [^maxSize := 4] }.
  	^0 "to keep C compiler quiet"!

Item was added:
+ ----- Method: CogIA32Compiler>>concretizeMoveRXbrR (in category 'generate machine code') -----
+ concretizeMoveRXbrR
+ 	"Will get inlined into concretizeAt: switch."
+ 	<inline: true>
+ 	| src index base |
+ 	src := self concreteRegister: (operands at: 0).
+ 	index := self concreteRegister: (operands at: 1).
+ 	base := self concreteRegister: (operands at: 2).
+ 	base ~= EBP ifTrue:
+ 		[machineCode
+ 			at: 0 put: 16r88;
+ 			at: 1 put: (self mod: ModRegInd RM: 4 RO: src);
+ 			at: 2 put: (self s: SIB1 i: index b: base).
+ 		 ^machineCodeSize := 3].
+ 	machineCode
+ 		at: 0 put: 16r88;
+ 		at: 1 put: (self mod: ModRegRegDisp8 RM: 4 RO: src);
+ 		at: 2 put: (self s: SIB1 i: index b: base);
+ 		at: 3 put: 0.
+ 	 ^machineCodeSize := 4!

Item was changed:
  ----- Method: CogIA32Compiler>>dispatchConcretize (in category 'generate machine code') -----
  dispatchConcretize
  	"Attempt to generate concrete machine code for the instruction at address.
  	 This is the inner dispatch of concretizeAt: actualAddress which exists only
  	 to get around the branch size limits in the SqueakV3 (blue book derived)
  	 bytecode set."
  	<returnTypeC: #void>
  	opcode caseOf: {
  		"Noops & Pseudo Ops"
  		[Label]				-> [^self concretizeLabel].
  		[AlignmentNops]	-> [^self concretizeAlignmentNops].
  		[Fill16]				-> [^self concretizeFill16].
  		[Fill32]				-> [^self concretizeFill32].
  		[FillFromWord]		-> [^self concretizeFillFromWord].
  		[Nop]				-> [^self concretizeNop].
  		"Specific Control/Data Movement"
  		[CDQ]					-> [^self concretizeCDQ].
  		[IDIVR]					-> [^self concretizeIDIVR].
  		[IMULRR]				-> [^self concretizeMulRR].
  		[CPUID]					-> [^self concretizeCPUID].
  		[CMPXCHGAwR]			-> [^self concretizeCMPXCHGAwR].
  		[CMPXCHGMwrR]		-> [^self concretizeCMPXCHGMwrR].
  		[LFENCE]				-> [^self concretizeFENCE: 5].
  		[MFENCE]				-> [^self concretizeFENCE: 6].
  		[SFENCE]				-> [^self concretizeFENCE: 7].
  		[LOCK]					-> [^self concretizeLOCK].
  		[XCHGAwR]				-> [^self concretizeXCHGAwR].
  		[XCHGMwrR]			-> [^self concretizeXCHGMwrR].
  		[XCHGRR]				-> [^self concretizeXCHGRR].
  		"Control"
  		[Call]					-> [^self concretizeCall].
  		[JumpR]					-> [^self concretizeJumpR].
  		[JumpLong]				-> [^self concretizeJumpLong].
  		[JumpLongZero]		-> [^self concretizeConditionalJumpLong: 16r4].
  		[JumpLongNonZero]	-> [^self concretizeConditionalJumpLong: 16r5].
  		[Jump]					-> [^self concretizeJump].
  		"Table B-1 Intel® 64 and IA-32 Architectures Software Developer's Manual Volume 1: Basic Architecture"
  		[JumpZero]				-> [^self concretizeConditionalJump: 16r4].
  		[JumpNonZero]			-> [^self concretizeConditionalJump: 16r5].
  		[JumpNegative]			-> [^self concretizeConditionalJump: 16r8].
  		[JumpNonNegative]		-> [^self concretizeConditionalJump: 16r9].
  		[JumpOverflow]			-> [^self concretizeConditionalJump: 16r0].
  		[JumpNoOverflow]		-> [^self concretizeConditionalJump: 16r1].
  		[JumpCarry]			-> [^self concretizeConditionalJump: 16r2].
  		[JumpNoCarry]			-> [^self concretizeConditionalJump: 16r3].
  		[JumpLess]				-> [^self concretizeConditionalJump: 16rC].
  		[JumpGreaterOrEqual]	-> [^self concretizeConditionalJump: 16rD].
  		[JumpGreater]			-> [^self concretizeConditionalJump: 16rF].
  		[JumpLessOrEqual]		-> [^self concretizeConditionalJump: 16rE].
  		[JumpBelow]			-> [^self concretizeConditionalJump: 16r2].
  		[JumpAboveOrEqual]	-> [^self concretizeConditionalJump: 16r3].
  		[JumpAbove]			-> [^self concretizeConditionalJump: 16r7].
  		[JumpBelowOrEqual]	-> [^self concretizeConditionalJump: 16r6].
  		[JumpFPEqual]				-> [^self concretizeConditionalJump: 16r4].
  		[JumpFPNotEqual]			-> [^self concretizeConditionalJump: 16r5].
  		[JumpFPLess]				-> [^self concretizeConditionalJump: 16r2].
  		[JumpFPGreaterOrEqual]	-> [^self concretizeConditionalJump: 16r3].
  		[JumpFPGreater]			-> [^self concretizeConditionalJump: 16r7].
  		[JumpFPLessOrEqual]		-> [^self concretizeConditionalJump: 16r6].
  		[JumpFPOrdered]			-> [^self concretizeConditionalJump: 16rB].
  		[JumpFPUnordered]			-> [^self concretizeConditionalJump: 16rA].
  		[RetN]						-> [^self concretizeRetN].
  		"Arithmetic"
  		[AddCqR]					-> [^self concretizeAddCqR].
  		[AddCwR]					-> [^self concretizeAddCwR].
  		[AddRR]						-> [^self concretizeAddRR].
  		[AddRdRd]					-> [^self concretizeSEE2OpRdRd: 16r58].
  		[AndCqR]					-> [^self concretizeAndCqR].
  		[AndCwR]					-> [^self concretizeAndCwR].
  		[AndRR]						-> [^self concretizeAndRR].
  		[CmpCqR]					-> [^self concretizeCmpCqR].
  		[CmpCwR]					-> [^self concretizeCmpCwR].
  		[CmpRR]					-> [^self concretizeCmpRR].
  		[CmpRdRd]					-> [^self concretizeCmpRdRd].
  		[DivRdRd]					-> [^self concretizeSEE2OpRdRd: 16r5E].
  		[MulRdRd]					-> [^self concretizeSEE2OpRdRd: 16r59].
  		[OrCqR]						-> [^self concretizeOrCqR].
  		[OrCwR]					-> [^self concretizeOrCwR].
  		[OrRR]						-> [^self concretizeOrRR].
  		[SubCqR]					-> [^self concretizeSubCqR].
  		[SubCwR]					-> [^self concretizeSubCwR].
  		[SubRR]						-> [^self concretizeSubRR].
  		[SubRdRd]					-> [^self concretizeSEE2OpRdRd: 16r5C].
  		[SqrtRd]						-> [^self concretizeSqrtRd].
  		[XorCwR]						-> [^self concretizeXorCwR].
  		[XorRR]							-> [^self concretizeXorRR].
  		[NegateR]						-> [^self concretizeNegateR].
  		[LoadEffectiveAddressMwrR]	-> [^self concretizeLoadEffectiveAddressMwrR].
  		[ArithmeticShiftRightCqR]		-> [^self concretizeArithmeticShiftRightCqR].
  		[LogicalShiftRightCqR]			-> [^self concretizeLogicalShiftRightCqR].
  		[LogicalShiftLeftCqR]			-> [^self concretizeLogicalShiftLeftCqR].
  		[ArithmeticShiftRightRR]			-> [^self concretizeArithmeticShiftRightRR].
  		[LogicalShiftLeftRR]				-> [^self concretizeLogicalShiftLeftRR].
  		"Data Movement"
  		[MoveCqR]			-> [^self concretizeMoveCqR].
  		[MoveCwR]			-> [^self concretizeMoveCwR].
  		[MoveRR]			-> [^self concretizeMoveRR].
  		[MoveAwR]			-> [^self concretizeMoveAwR].
  		[MoveRAw]			-> [^self concretizeMoveRAw].
  		[MoveMbrR]			-> [^self concretizeMoveMbrR].
  		[MoveRMbr]			-> [^self concretizeMoveRMbr].
  		[MoveM16rR]		-> [^self concretizeMoveM16rR].
  		[MoveM64rRd]		-> [^self concretizeMoveM64rRd].
  		[MoveMwrR]		-> [^self concretizeMoveMwrR].
  		[MoveXbrRR]		-> [^self concretizeMoveXbrRR].
+ 		[MoveRXbrR]		-> [^self concretizeMoveRXbrR].
  		[MoveXwrRR]		-> [^self concretizeMoveXwrRR].
  		[MoveRXwrR]		-> [^self concretizeMoveRXwrR].
  		[MoveRMwr]		-> [^self concretizeMoveRMwr].
  		[MoveRdM64r]		-> [^self concretizeMoveRdM64r].
  		[PopR]				-> [^self concretizePopR].
  		[PushR]				-> [^self concretizePushR].
  		[PushCw]			-> [^self concretizePushCw].
  		[PrefetchAw]		-> [^self concretizePrefetchAw].
  		"Conversion"
  		[ConvertRRd]		-> [^self concretizeConvertRRd] }!

Item was added:
+ ----- Method: CogObjectRepresentation>>genInnerPrimitiveAtPut: (in category 'primitive generators') -----
+ genInnerPrimitiveAtPut: retNoffset
+ 	"subclasses override if they can"
+ 	^cogit unimplementedPrimitive!

Item was added:
+ ----- Method: CogObjectRepresentation>>genInnerPrimitiveStringAtPut: (in category 'primitive generators') -----
+ genInnerPrimitiveStringAtPut: retNoffset
+ 	"subclasses override if they can"
+ 	^cogit unimplementedPrimitive!

Item was changed:
  ----- Method: CogObjectRepresentationFor32BitSpur>>genInnerPrimitiveAt: (in category 'primitive generators') -----
  genInnerPrimitiveAt: retNoffset
+ 	"Implement the guts of primitiveAt"
- 	"Implement the guts of primitiveAt; dispatch on size"
  	| formatReg jumpNotIndexable jumpSmallSize jumpImmediate jumpBadIndex
  	  jumpBytesDone jumpShortsDone jumpWordsDone jumpFixedFieldsDone
  	  jumpIsBytes jumpIsShorts jumpIsWords jumpWordTooBig jumpIsArray jumpHasFixedFields jumpIsContext
  	  jumpBytesOutOfBounds jumpShortsOutOfBounds jumpWordsOutOfBounds jumpArrayOutOfBounds jumpFixedFieldsOutOfBounds |
  	<inline: true>
  	"c.f. StackInterpreter>>stSizeOf: SpurMemoryManager>>lengthOf:format: fixedFieldsOf:format:length:"
  	<var: #jumpIsBytes type: #'AbstractInstruction *'>
  	<var: #jumpIsShorts type: #'AbstractInstruction *'>
  	<var: #jumpBadIndex type: #'AbstractInstruction *'>
  	<var: #jumpSmallSize type: #'AbstractInstruction *'>
  	<var: #jumpIsContext type: #'AbstractInstruction *'>
  	<var: #jumpImmediate type: #'AbstractInstruction *'>
  	<var: #jumpBytesDone type: #'AbstractInstruction *'>
  	<var: #jumpShortsDone type: #'AbstractInstruction *'>
  	<var: #jumpWordsDone type: #'AbstractInstruction *'>
  	<var: #jumpWordTooBig type: #'AbstractInstruction *'>
  	<var: #jumpNotIndexable type: #'AbstractInstruction *'>
  	<var: #jumpHasFixedFields type: #'AbstractInstruction *'>
  	<var: #jumpFixedFieldsDone type: #'AbstractInstruction *'>
  	<var: #jumpArrayOutOfBounds type: #'AbstractInstruction *'>
  	<var: #jumpBytesOutOfBounds type: #'AbstractInstruction *'>
  	<var: #jumpShortsOutOfBounds type: #'AbstractInstruction *'>
  	<var: #jumpWordsOutOfBounds type: #'AbstractInstruction *'>
  	<var: #jumpFixedFieldsOutOfBounds type: #'AbstractInstruction *'>
  
  	cogit MoveR: ReceiverResultReg R: TempReg.
  	jumpImmediate := self genJumpImmediateInScratchReg: TempReg.
  	cogit MoveR: Arg0Reg R: TempReg.
  	cogit MoveR: Arg0Reg R: Arg1Reg.
  	jumpBadIndex := self genJumpNotSmallIntegerInScratchReg: TempReg.
  	self genConvertSmallIntegerToIntegerInReg: Arg1Reg.
  	cogit SubCq: 1 R: Arg1Reg. "1-rel => 0-rel"
  
  	formatReg := SendNumArgsReg.
  	cogit
  		MoveMw: 0 r: ReceiverResultReg R: formatReg;		"formatReg := least significant half of self baseHeader: receiver"
  		MoveR: formatReg R: TempReg;
  		LogicalShiftRightCq: objectMemory formatShift R: formatReg;
  		AndCq: objectMemory formatMask R: formatReg.	"formatReg := self formatOfHeader: destReg"
  
  	"get numSlots into ClassReg."
  	cogit MoveCq: 0 R: ClassReg. "N.B. MoveMb:r:R: does not zero other bits"
  	cogit MoveMb: 7 r: ReceiverResultReg R: ClassReg. "MSB of header"
  	cogit CmpCq: objectMemory numSlotsMask R: ClassReg.
+ 	jumpSmallSize := cogit JumpBelow: 0.
- 	jumpSmallSize := cogit JumpLess: 0.
  	cogit MoveMw: -8 r: ReceiverResultReg R: ClassReg. "LSW of overflow size header"
  
  	"dispatch on format in a combination of highest dynamic frequency order first and convenience.
  		  0 = 0 sized objects (UndefinedObject True False et al)
  		  1 = non-indexable objects with inst vars (Point et al)
  		  2 = indexable objects with no inst vars (Array et al)
  		  3 = indexable objects with inst vars (MethodContext AdditionalMethodState et al)
  		  4 = weak indexable objects with inst vars (WeakArray et al)
  		  5 = weak non-indexable objects with inst vars (ephemerons) (Ephemeron)
  		  6 unused, reserved for exotic pointer objects?
  		  7 Forwarded Object, 1st field is pointer, rest of fields are ignored
  		  8 unused, reserved for exotic non-pointer objects?
  		  9 (?) 64-bit indexable
  		10 - 11 32-bit indexable
  		12 - 15 16-bit indexable
  		16 - 23 byte indexable
  		24 - 31 compiled method"
  	jumpSmallSize jmpTarget:
  					(cogit CmpCq: objectMemory firstByteFormat R: formatReg).
+ 	jumpIsBytes := cogit JumpAboveOrEqual: 0.
- 	jumpIsBytes := cogit JumpGreaterOrEqual: 0.
  					cogit CmpCq: objectMemory arrayFormat R: formatReg.
  	jumpIsArray := cogit JumpZero: 0.
+ 	jumpNotIndexable := cogit JumpBelow: 0.
- 	jumpNotIndexable := cogit JumpLess: 0.
  					cogit CmpCq: objectMemory weakArrayFormat R: formatReg.
+ 	jumpHasFixedFields := cogit JumpBelowOrEqual: 0.
- 	jumpHasFixedFields := cogit JumpLessOrEqual: 0.
  					cogit CmpCq: objectMemory firstShortFormat R: formatReg.
+ 	jumpIsShorts := cogit JumpAboveOrEqual: 0.
- 	jumpIsShorts := cogit JumpGreaterOrEqual: 0.
  					cogit CmpCq: objectMemory firstLongFormat R: formatReg.
+ 	jumpIsWords := cogit JumpAboveOrEqual: 0.
- 	jumpIsWords := cogit JumpGreaterOrEqual: 0.
  	"For now ignore 64-bit indexability."
  	jumpNotIndexable jmpTarget: cogit Label.
  	jumpNotIndexable := cogit Jump: 0.
  
  	jumpIsBytes jmpTarget:
  		(cogit LogicalShiftLeftCq: objectMemory shiftForWord R: ClassReg).
  		cogit AndCq: objectMemory wordSize - 1 R: formatReg.
  		cogit SubR: formatReg R: ClassReg;
  		CmpR: Arg1Reg R: ClassReg.
  	jumpBytesOutOfBounds := cogit JumpBelowOrEqual: 0.
  	cogit AddCq: objectMemory baseHeaderSize R: Arg1Reg.
  	cogit MoveXbr: Arg1Reg R: ReceiverResultReg R: ReceiverResultReg.
  	self genConvertIntegerToSmallIntegerInReg: ReceiverResultReg.
  	jumpBytesDone := cogit Jump: 0.
  
  	jumpIsShorts jmpTarget:
  		(cogit LogicalShiftLeftCq: objectMemory shiftForWord - 1 R: ClassReg).
  		cogit AndCq: 1 R: formatReg.
  		cogit SubR: formatReg R: ClassReg;
  		CmpR: Arg1Reg R: ClassReg.
  	jumpShortsOutOfBounds := cogit JumpBelowOrEqual: 0.
  	cogit AddR: Arg1Reg R: ReceiverResultReg.
  	cogit MoveM16: objectMemory baseHeaderSize r: ReceiverResultReg R: ReceiverResultReg.
  	self genConvertIntegerToSmallIntegerInScratchReg: ReceiverResultReg.
  	jumpShortsDone := cogit Jump: 0.
  
  	jumpIsWords jmpTarget:
  		(cogit CmpR: Arg1Reg R: ClassReg).
  	jumpWordsOutOfBounds := cogit JumpBelowOrEqual: 0.
  	cogit AddCq: objectMemory baseHeaderSize >> objectMemory shiftForWord R: Arg1Reg.
  	cogit MoveXwr: Arg1Reg R: ReceiverResultReg R: TempReg.
  	cogit SubCq: objectMemory baseHeaderSize >> objectMemory shiftForWord R: Arg1Reg.
  	jumpWordTooBig := self jumpNotSmallIntegerUnsignedValueInRegister: TempReg.
  	cogit MoveR: TempReg R: ReceiverResultReg.
  	self genConvertIntegerToSmallIntegerInScratchReg: ReceiverResultReg.
  	jumpWordsDone := cogit Jump: 0.
  
  	jumpHasFixedFields jmpTarget:
  		(cogit AndCq: objectMemory classIndexMask R: TempReg).
  	cogit CmpCq: ClassMethodContextCompactIndex R: TempReg.
  	cogit MoveR: TempReg R: formatReg.
  	cogit CmpCq: ClassMethodContextCompactIndex R: TempReg.
  	jumpIsContext := cogit JumpZero: 0.
  	cogit PushR: ClassReg.
  	self genGetClassObjectOfClassIndex: formatReg into: ClassReg scratchReg: TempReg.
  	self genLoadSlot: InstanceSpecificationIndex sourceReg: ClassReg destReg: formatReg.
  	cogit PopR: ClassReg.
  	self genConvertSmallIntegerToIntegerInReg: formatReg.
  	cogit
  		AndCq: objectMemory fixedFieldsOfClassFormatMask R: formatReg;
  		SubR: formatReg R: ClassReg;
  		CmpR: Arg1Reg R: ClassReg.
  	jumpFixedFieldsOutOfBounds := cogit JumpBelowOrEqual: 0.
  	"index is (formatReg (fixed fields) + Arg1Reg (0-rel index)) * wordSize + baseHeaderSize"
  	cogit AddR: formatReg R: Arg1Reg.
  	cogit AddCq: objectMemory baseHeaderSize >> objectMemory shiftForWord R: Arg1Reg.
  	cogit MoveXwr: Arg1Reg R: ReceiverResultReg R: ReceiverResultReg.
  	jumpFixedFieldsDone := cogit Jump: 0.
  
  	jumpIsArray jmpTarget:
  		(cogit CmpR: Arg1Reg R: ClassReg).
  	jumpArrayOutOfBounds := cogit JumpBelowOrEqual: 0.	
  	cogit AddCq: objectMemory baseHeaderSize >> objectMemory shiftForWord R: Arg1Reg.
  	cogit MoveXwr: Arg1Reg R: ReceiverResultReg R: ReceiverResultReg.
  
  	jumpFixedFieldsDone jmpTarget:
  	(jumpWordsDone jmpTarget:
  	(jumpShortsDone jmpTarget:
  	(jumpBytesDone jmpTarget:
  		(cogit RetN: retNoffset)))).
  
  	jumpFixedFieldsOutOfBounds jmpTarget:
  	(jumpArrayOutOfBounds jmpTarget:
  	(jumpBytesOutOfBounds jmpTarget:
  	(jumpShortsOutOfBounds jmpTarget:
  	(jumpWordsOutOfBounds jmpTarget:
  	(jumpWordTooBig jmpTarget:
  	(jumpNotIndexable jmpTarget:
  	(jumpIsContext jmpTarget:
  	(jumpBadIndex jmpTarget:
  	(jumpImmediate jmpTarget: cogit Label))))))))).
  
  	^0!

Item was added:
+ ----- Method: CogObjectRepresentationFor32BitSpur>>genInnerPrimitiveAtPut: (in category 'primitive generators') -----
+ genInnerPrimitiveAtPut: retNoffset
+ 	"Implement the guts of primitiveAtPut"
+ 	| formatReg jumpNotIndexable jumpSmallSize jumpImmediate jumpBadIndex
+ 	  jumpArrayDone jumpBytesDone jumpWordsDone jumpBytesOutOfRange
+ 	  jumpIsBytes jumpIsWords jumpIsPointers jumpHasFixedFields jumpIsContext jumpIsCompiledMethod
+ 	  jumpBytesOutOfBounds jumpWordsOutOfBounds jumpArrayOutOfBounds jumpFixedFieldsOutOfBounds
+ 	  jumpNonSmallIntegerValue jumpShortsUnsupported |
+ 	<inline: true>
+ 	"c.f. StackInterpreter>>stSizeOf: SpurMemoryManager>>lengthOf:format: fixedFieldsOf:format:length:"
+ 	<var: #jumpIsBytes type: #'AbstractInstruction *'>
+ 	<var: #jumpIsShorts type: #'AbstractInstruction *'>
+ 	<var: #jumpBadIndex type: #'AbstractInstruction *'>
+ 	<var: #jumpSmallSize type: #'AbstractInstruction *'>
+ 	<var: #jumpIsContext type: #'AbstractInstruction *'>
+ 	<var: #jumpImmediate type: #'AbstractInstruction *'>
+ 	<var: #jumpArrayDone type: #'AbstractInstruction *'>
+ 	<var: #jumpBytesDone type: #'AbstractInstruction *'>
+ 	<var: #jumpWordsDone type: #'AbstractInstruction *'>
+ 	<var: #jumpNotIndexable type: #'AbstractInstruction *'>
+ 	<var: #jumpPointersDone type: #'AbstractInstruction *'>
+ 	<var: #jumpHasFixedFields type: #'AbstractInstruction *'>
+ 	<var: #jumpFixedFieldsDone type: #'AbstractInstruction *'>
+ 	<var: #jumpArrayOutOfBounds type: #'AbstractInstruction *'>
+ 	<var: #jumpBytesOutOfBounds type: #'AbstractInstruction *'>
+ 	<var: #jumpShortsUnsupported type: #'AbstractInstruction *'>
+ 	<var: #jumpWordsOutOfBounds type: #'AbstractInstruction *'>
+ 	<var: #jumpFixedFieldsOutOfBounds type: #'AbstractInstruction *'>
+ 
+ 	true ifTrue: [^cogit unimplementedPrimitive].
+ 	cogit MoveR: ReceiverResultReg R: TempReg.
+ 	jumpImmediate := self genJumpImmediateInScratchReg: TempReg.
+ 	cogit MoveR: Arg0Reg R: TempReg.
+ 	jumpBadIndex := self genJumpNotSmallIntegerInScratchReg: TempReg.
+ 	self genConvertSmallIntegerToIntegerInReg: Arg0Reg.
+ 	cogit SubCq: 1 R: Arg0Reg. "1-rel => 0-rel"
+ 
+ 	formatReg := SendNumArgsReg.
+ 	cogit
+ 		MoveMw: 0 r: ReceiverResultReg R: formatReg;		"formatReg := least significant half of self baseHeader: receiver"
+ 		MoveR: formatReg R: TempReg;
+ 		LogicalShiftRightCq: objectMemory formatShift R: formatReg;
+ 		AndCq: objectMemory formatMask R: formatReg.	"formatReg := self formatOfHeader: destReg"
+ 
+ 	"get numSlots into ClassReg."
+ 	cogit MoveCq: 0 R: ClassReg. "N.B. MoveMb:r:R: does not zero other bits"
+ 	cogit MoveMb: 7 r: ReceiverResultReg R: ClassReg. "MSB of header"
+ 	cogit CmpCq: objectMemory numSlotsMask R: ClassReg.
+ 	jumpSmallSize := cogit JumpBelow: 0.
+ 	cogit MoveMw: -8 r: ReceiverResultReg R: ClassReg. "LSW of overflow size header"
+ 
+ 	"dispatch on format in a combination of highest dynamic frequency order first and convenience.
+ 		  0 = 0 sized objects (UndefinedObject True False et al)
+ 		  1 = non-indexable objects with inst vars (Point et al)
+ 		  2 = indexable objects with no inst vars (Array et al)
+ 		  3 = indexable objects with inst vars (MethodContext AdditionalMethodState et al)
+ 		  4 = weak indexable objects with inst vars (WeakArray et al)
+ 		  5 = weak non-indexable objects with inst vars (ephemerons) (Ephemeron)
+ 		  6 unused, reserved for exotic pointer objects?
+ 		  7 Forwarded Object, 1st field is pointer, rest of fields are ignored
+ 		  8 unused, reserved for exotic non-pointer objects?
+ 		  9 (?) 64-bit indexable
+ 		10 - 11 32-bit indexable
+ 		12 - 15 16-bit indexable
+ 		16 - 23 byte indexable
+ 		24 - 31 compiled method"
+ 	jumpSmallSize jmpTarget:
+ 					(cogit CmpCq: objectMemory weakArrayFormat R: formatReg).
+ 	jumpIsPointers := cogit JumpBelowOrEqual: 0.
+ 					cogit CmpCq: objectMemory firstCompiledMethodFormat R: formatReg.
+ 	jumpIsCompiledMethod := cogit JumpAboveOrEqual: 0.
+ 	cogit MoveR: Arg1Reg R: TempReg.
+ 	jumpNonSmallIntegerValue := self genJumpNotSmallIntegerInScratchReg: TempReg.
+ 					cogit CmpCq: objectMemory firstByteFormat R: formatReg.
+ 	jumpIsBytes := cogit JumpGreaterOrEqual: 0.
+ 					cogit CmpCq: objectMemory firstShortFormat R: formatReg.
+ 	jumpShortsUnsupported := cogit JumpGreaterOrEqual: 0.
+ 					cogit CmpCq: objectMemory firstLongFormat R: formatReg.
+ 	jumpIsWords := cogit JumpGreaterOrEqual: 0.
+ 	"For now ignore 64-bit indexability."
+ 	jumpNotIndexable := cogit Jump: 0.
+ 
+ 	jumpIsBytes jmpTarget:
+ 		(cogit CmpCq: (objectMemory integerObjectOf: 255) R: Arg1Reg).
+ 	jumpBytesOutOfRange := cogit JumpAbove: 0.
+ 	cogit LogicalShiftLeftCq: objectMemory shiftForWord R: ClassReg.
+ 	cogit AndCq: objectMemory wordSize - 1 R: formatReg.
+ 	cogit SubR: formatReg R: ClassReg;
+ 	CmpR: Arg0Reg R: ClassReg.
+ 	jumpBytesOutOfBounds := cogit JumpBelowOrEqual: 0.
+ 	cogit MoveR: Arg1Reg R: TempReg.
+ 	self genConvertSmallIntegerToIntegerInReg: TempReg.
+ 	cogit AddCq: objectMemory baseHeaderSize R: Arg0Reg.
+ 	cogit MoveR: TempReg Xbr: Arg0Reg R: ReceiverResultReg.
+ 	cogit MoveR: Arg1Reg R: ReceiverResultReg.
+ 	jumpBytesDone := cogit Jump: 0.
+ 
+ 	"there are no shorts as yet.  so this is dead code:
+ 	jumpIsShorts jmpTarget:
+ 		(cogit CmpCq: (objectMemory integerObjectOf: 65535) R: Arg1Reg).
+ 	jumpShortsOutOfRange := cogit JumpAbove: 0.
+ 	cogit LogicalShiftLeftCq: objectMemory shiftForWord - 1 R: ClassReg.
+ 	cogit AndCq: 1 R: formatReg.
+ 	cogit SubR: formatReg R: ClassReg;
+ 	CmpR: Arg0Reg R: ClassReg.
+ 	jumpShortsOutOfBounds := cogit JumpBelowOrEqual: 0.
+ 	cogit MoveR: Arg1Reg R: TempReg.
+ 	cogit genConvertSmallIntegerToIntegerInReg: TempReg.
+ 	cogit AddR: Arg0Reg R: ReceiverResultReg.
+ 	cogit MoveR: TempReg M16: objectMemory baseHeaderSize r: ReceiverResultReg.
+ 	cogit MoveR: Arg1Reg R: ReceiverResultReg.
+ 	jumpShortsDone := cogit Jump: 0."
+ 
+ 	jumpIsWords jmpTarget:
+ 		(cogit CmpR: Arg0Reg R: ClassReg).
+ 	jumpWordsOutOfBounds := cogit JumpBelowOrEqual: 0.
+ 	cogit MoveR: Arg1Reg R: TempReg.
+ 	self genConvertSmallIntegerToIntegerInReg: TempReg.
+ 	cogit AddCq: objectMemory baseHeaderSize >> objectMemory shiftForWord R: Arg0Reg.
+ 	cogit MoveR: TempReg Xwr: Arg0Reg R: ReceiverResultReg.
+ 	cogit MoveR: Arg1Reg R: ReceiverResultReg.
+ 	jumpWordsDone := cogit Jump: 0.
+ 
+ 	jumpIsPointers jmpTarget: cogit Label.
+ 	"optimistic store check; assume index in range (almost always is)."
+ 	self genStoreCheckReceiverReg: ReceiverResultReg valueReg: Arg1Reg scratchReg: TempReg.
+ 
+ 	cogit CmpCq: objectMemory arrayFormat R: formatReg.
+ 	jumpHasFixedFields := cogit JumpNonZero: 0.
+ 
+ 	cogit CmpR: Arg0Reg R: ClassReg.
+ 	jumpArrayOutOfBounds := cogit JumpBelowOrEqual: 0.	
+ 	cogit AddCq: objectMemory baseHeaderSize >> objectMemory shiftForWord R: Arg0Reg.
+ 	cogit MoveR: Arg1Reg Xwr: Arg0Reg R: ReceiverResultReg.
+ 	cogit MoveR: Arg1Reg R: ReceiverResultReg.
+ 	jumpArrayDone := cogit Jump: 0.
+ 
+ 	jumpHasFixedFields jmpTarget:
+ 		(cogit AndCq: objectMemory classIndexMask R: TempReg).
+ 	cogit CmpCq: ClassMethodContextCompactIndex R: TempReg.
+ 	cogit MoveR: TempReg R: formatReg.
+ 	cogit CmpCq: ClassMethodContextCompactIndex R: TempReg.
+ 	jumpIsContext := cogit JumpZero: 0.
+ 	cogit PushR: ClassReg.
+ 	self genGetClassObjectOfClassIndex: formatReg into: ClassReg scratchReg: TempReg.
+ 	self genLoadSlot: InstanceSpecificationIndex sourceReg: ClassReg destReg: formatReg.
+ 	cogit PopR: ClassReg.
+ 	self genConvertSmallIntegerToIntegerInReg: formatReg.
+ 	cogit
+ 		AndCq: objectMemory fixedFieldsOfClassFormatMask R: formatReg;
+ 		SubR: formatReg R: ClassReg;
+ 		CmpR: Arg0Reg R: ClassReg.
+ 	jumpFixedFieldsOutOfBounds := cogit JumpBelowOrEqual: 0.
+ 	"index is (formatReg (fixed fields) + Arg0Reg (0-rel index)) * wordSize + baseHeaderSize"
+ 	cogit AddR: formatReg R: Arg0Reg.
+ 	cogit AddCq: objectMemory baseHeaderSize >> objectMemory shiftForWord R: Arg0Reg.
+ 	cogit MoveR: Arg1Reg Xwr: Arg0Reg R: ReceiverResultReg.
+ 	cogit MoveR: Arg1Reg R: ReceiverResultReg.
+ 	"fall through"
+ 
+ 	jumpArrayDone jmpTarget:
+ 	(jumpBytesDone jmpTarget:
+ 	(jumpWordsDone jmpTarget:
+ 		(cogit RetN: retNoffset))).
+ 
+ 	jumpIsContext jmpTarget: 
+ 	(jumpNotIndexable jmpTarget:
+ 	(jumpBytesOutOfRange jmpTarget:
+ 	(jumpIsCompiledMethod jmpTarget:
+ 	(jumpArrayOutOfBounds jmpTarget:
+ 	(jumpBytesOutOfBounds jmpTarget:
+ 	(jumpShortsUnsupported jmpTarget:
+ 	(jumpWordsOutOfBounds jmpTarget:
+ 	(jumpNonSmallIntegerValue jmpTarget:
+ 	(jumpFixedFieldsOutOfBounds jmpTarget:cogit Label))))))))).
+ 
+ 	cogit AddCq: 1 R: Arg0Reg. "0-rel => 1-rel"
+ 	self genConvertIntegerToSmallIntegerInScratchReg: Arg0Reg.
+ 
+ 	jumpBadIndex jmpTarget: (jumpImmediate jmpTarget: cogit Label).
+ 
+ 	^0!

Item was added:
+ ----- Method: CogObjectRepresentationFor32BitSpur>>genInnerPrimitiveStringAtPut: (in category 'primitive generators') -----
+ genInnerPrimitiveStringAtPut: retNoffset
+ 	"Implement the guts of primitiveStringAtPut"
+ 	| formatReg jumpSmallSize jumpImmediate jumpBadIndex jumpBadArg
+ 	  jumpWordsDone jumpBytesOutOfRange
+ 	  jumpIsBytes jumpNotString jumpIsCompiledMethod
+ 	  jumpBytesOutOfBounds jumpWordsOutOfBounds jumpShortsUnsupported |
+ 	<inline: true>
+ 	"c.f. StackInterpreter>>stSizeOf: SpurMemoryManager>>lengthOf:format: fixedFieldsOf:format:length:"
+ 	<var: #jumpBadArg type: #'AbstractInstruction *'>
+ 	<var: #jumpIsBytes type: #'AbstractInstruction *'>
+ 	<var: #jumpBadIndex type: #'AbstractInstruction *'>
+ 	<var: #jumpSmallSize type: #'AbstractInstruction *'>
+ 	<var: #jumpImmediate type: #'AbstractInstruction *'>
+ 	<var: #jumpWordsDone type: #'AbstractInstruction *'>
+ 	<var: #jumpPointersDone type: #'AbstractInstruction *'>
+ 	<var: #jumpBytesOutOfBounds type: #'AbstractInstruction *'>
+ 	<var: #jumpShortsUnsupported type: #'AbstractInstruction *'>
+ 	<var: #jumpWordsOutOfBounds type: #'AbstractInstruction *'>
+ 
+ 	cogit MoveR: ReceiverResultReg R: TempReg.
+ 	jumpImmediate := self genJumpImmediateInScratchReg: TempReg.
+ 	cogit MoveR: Arg0Reg R: TempReg.
+ 	jumpBadIndex := self genJumpNotSmallIntegerInScratchReg: TempReg.
+ 	cogit MoveR: Arg1Reg R: TempReg.
+ 	jumpBadArg := self genJumpNotCharacterInScratchReg: TempReg.
+ 	self genConvertSmallIntegerToIntegerInReg: Arg0Reg.
+ 	cogit SubCq: 1 R: Arg0Reg. "1-rel => 0-rel"
+ 
+ 	formatReg := SendNumArgsReg.
+ 	cogit
+ 		MoveMw: 0 r: ReceiverResultReg R: formatReg;		"formatReg := least significant half of self baseHeader: receiver"
+ 		MoveR: formatReg R: TempReg;
+ 		LogicalShiftRightCq: objectMemory formatShift R: formatReg;
+ 		AndCq: objectMemory formatMask R: formatReg.	"formatReg := self formatOfHeader: destReg"
+ 
+ 	"get numSlots into ClassReg."
+ 	cogit MoveCq: 0 R: ClassReg. "N.B. MoveMb:r:R: does not zero other bits"
+ 	cogit MoveMb: 7 r: ReceiverResultReg R: ClassReg. "MSB of header"
+ 	cogit CmpCq: objectMemory numSlotsMask R: ClassReg.
+ 	jumpSmallSize := cogit JumpBelow: 0.
+ 	cogit MoveMw: -8 r: ReceiverResultReg R: ClassReg. "LSW of overflow size header"
+ 
+ 	"dispatch on format; words and/or bytes.
+ 		  0 to 8 = pointer objects, forwarders, reserved.
+ 		  9 (?) 64-bit indexable
+ 		10 - 11 32-bit indexable
+ 		12 - 15 16-bit indexable (but unused)
+ 		16 - 23 byte indexable
+ 		24 - 31 compiled method"
+ 	jumpSmallSize jmpTarget:
+ 					(cogit CmpCq: objectMemory firstLongFormat R: formatReg).
+ 	jumpNotString := cogit JumpBelowOrEqual: 0.
+ 					cogit CmpCq: objectMemory firstCompiledMethodFormat R: formatReg.
+ 	jumpIsCompiledMethod := cogit JumpAboveOrEqual: 0.
+ 					cogit CmpCq: objectMemory firstByteFormat R: formatReg.
+ 	jumpIsBytes := cogit JumpGreaterOrEqual: 0.
+ 					cogit CmpCq: objectMemory firstShortFormat R: formatReg.
+ 	jumpShortsUnsupported := cogit JumpGreaterOrEqual: 0.
+ 
+ 	cogit CmpR: Arg0Reg R: ClassReg.
+ 	jumpWordsOutOfBounds := cogit JumpBelowOrEqual: 0.
+ 	cogit MoveR: Arg1Reg R: TempReg.
+ 	self genConvertSmallIntegerToIntegerInReg: TempReg.
+ 	cogit AddCq: objectMemory baseHeaderSize >> objectMemory shiftForWord R: Arg0Reg.
+ 	cogit MoveR: TempReg Xwr: Arg0Reg R: ReceiverResultReg.
+ 	cogit MoveR: Arg1Reg R: ReceiverResultReg.
+ 	jumpWordsDone := cogit Jump: 0.
+ 
+ 	"there are no shorts as yet.  so this is dead code:
+ 	jumpIsShorts jmpTarget:
+ 		(cogit CmpCq: (objectMemory integerObjectOf: 65535) R: Arg1Reg).
+ 	jumpShortsOutOfRange := cogit JumpAbove: 0.
+ 	cogit LogicalShiftLeftCq: objectMemory shiftForWord - 1 R: ClassReg.
+ 	cogit AndCq: 1 R: formatReg.
+ 	cogit SubR: formatReg R: ClassReg;
+ 	CmpR: Arg0Reg R: ClassReg.
+ 	jumpShortsOutOfBounds := cogit JumpBelowOrEqual: 0.
+ 	cogit MoveR: Arg1Reg R: TempReg.
+ 	cogit genConvertSmallIntegerToIntegerInReg: TempReg.
+ 	cogit AddR: Arg0Reg R: ReceiverResultReg.
+ 	cogit MoveR: TempReg M16: objectMemory baseHeaderSize r: ReceiverResultReg.
+ 	cogit MoveR: Arg1Reg R: ReceiverResultReg.
+ 	jumpShortsDone := cogit Jump: 0."
+ 
+ 	jumpIsBytes jmpTarget:
+ 		(cogit CmpCq: (objectMemory characterObjectOf: 255) R: Arg1Reg).
+ 	jumpBytesOutOfRange := cogit JumpAbove: 0.
+ 	cogit LogicalShiftLeftCq: objectMemory shiftForWord R: ClassReg.
+ 	cogit AndCq: objectMemory wordSize - 1 R: formatReg.
+ 	cogit SubR: formatReg R: ClassReg;
+ 	CmpR: Arg0Reg R: ClassReg.
+ 	jumpBytesOutOfBounds := cogit JumpBelowOrEqual: 0.
+ 	cogit MoveR: Arg1Reg R: TempReg.
+ 	self genConvertCharacterToCodeInReg: TempReg.
+ 	cogit AddCq: objectMemory baseHeaderSize R: Arg0Reg.
+ 	cogit MoveR: TempReg Xbr: Arg0Reg R: ReceiverResultReg.
+ 	cogit MoveR: Arg1Reg R: ReceiverResultReg.
+ 
+ 	jumpWordsDone jmpTarget:
+ 		(cogit RetN: retNoffset).
+ 
+ 	jumpBadArg jmpTarget:
+ 	(jumpBadIndex jmpTarget:
+ 	(jumpNotString jmpTarget:
+ 	(jumpBytesOutOfRange jmpTarget:
+ 	(jumpIsCompiledMethod jmpTarget:
+ 	(jumpBytesOutOfBounds jmpTarget:
+ 	(jumpShortsUnsupported jmpTarget:
+ 	(jumpWordsOutOfBounds jmpTarget: cogit Label))))))).
+ 
+ 	cogit AddCq: 1 R: Arg0Reg. "0-rel => 1-rel"
+ 	self genConvertIntegerToSmallIntegerInScratchReg: Arg0Reg.
+ 
+ 	jumpBadIndex jmpTarget: (jumpImmediate jmpTarget: cogit Label).
+ 
+ 	^0!

Item was added:
+ ----- Method: CogObjectRepresentationForSpur>>genConvertCharacterToCodeInReg: (in category 'compile abstract instructions') -----
+ genConvertCharacterToCodeInReg: reg 
+ 	cogit LogicalShiftRightCq: objectMemory numTagBits R: reg.
+ 	^0!

Item was added:
+ ----- Method: CogObjectRepresentationForSpur>>genJumpNotCharacterInScratchReg: (in category 'compile abstract instructions') -----
+ genJumpNotCharacterInScratchReg: reg 
+ 	cogit AndCq: objectMemory tagMask R: reg.
+ 	cogit CmpCq: objectMemory characterTag R: reg.
+ 	^cogit JumpNonZero: 0!

Item was added:
+ ----- Method: CogObjectRepresentationForSpur>>genStoreCheckReceiverReg:valueReg:scratchReg: (in category 'compile abstract instructions') -----
+ genStoreCheckReceiverReg: destReg valueReg: valueReg scratchReg: scratchReg
+ 	"Generate the code for a store check of valueReg into destReg."
+ 	| jmpImmediate jmpDestYoung jmpSourceOld jmpAlreadyRemembered mask rememberedBitByteOffset |
+ 	<var: #jmpImmediate type: #'AbstractInstruction *'>
+ 	<var: #jmpDestYoung type: #'AbstractInstruction *'>
+ 	<var: #jmpSourceOld type: #'AbstractInstruction *'>
+ 	<var: #jmpAlreadyRemembered type: #'AbstractInstruction *'>
+ 	"Is value stored an integer?  If so we're done"
+ 	cogit MoveR: valueReg R: scratchReg.
+ 	cogit AndCq: objectMemory tagMask R: scratchReg.
+ 	jmpImmediate := cogit JumpNonZero: 0.
+ 	"Get the old/new boundary in scratchReg"
+ 	cogit MoveCw: objectMemory storeCheckBoundary R: scratchReg.
+ 	"Is target young?  If so we're done"
+ 	cogit CmpR: scratchReg R: destReg. "N.B. FLAGS := destReg - scratchReg"
+ 	jmpDestYoung := cogit JumpBelow: 0.
+ 	"Is value stored old?  If so we're done."
+ 	cogit CmpR: scratchReg R: valueReg. "N.B. FLAGS := valueReg - scratchReg"
+ 	jmpSourceOld := cogit JumpAboveOrEqual: 0.
+ 	"value is young and target is old.
+ 	 Need to remember this only if the remembered bit is not already set.
+ 	 Test the remembered bit.  Only need to fetch the byte containing it,
+ 	 which reduces the size of the mask constant."
+ 	rememberedBitByteOffset := jmpSourceOld isBigEndian
+ 									ifTrue: [objectMemory baseHeaderSize - 1 - (objectMemory rememberedBitShift // 8)]
+ 									ifFalse:[objectMemory rememberedBitShift // 8].
+ 	mask := 1 << (objectMemory rememberedBitShift \\ 8).
+ 	"N.B. MoveMb:r:R: does not zero other bits"
+ 	cogit MoveMb: rememberedBitByteOffset r: destReg R: scratchReg.
+ 	cogit AndCq: mask R: scratchReg.
+ 	jmpAlreadyRemembered := cogit JumpNonZero: 0.
+ 	"Remembered bit is not set.  Call store check to insert dest into remembered table."
+ 	self assert: destReg == ReceiverResultReg.
+ 	cogit CallRT: ceStoreCheckTrampoline.
+ 	jmpImmediate jmpTarget:
+ 	(jmpDestYoung jmpTarget:
+ 	(jmpSourceOld jmpTarget:
+ 	(jmpAlreadyRemembered jmpTarget:
+ 		cogit Label))).
+ 	^0!

Item was changed:
  ----- Method: CogObjectRepresentationForSpur>>genStoreSourceReg:slotIndex:destReg:scratchReg: (in category 'compile abstract instructions') -----
  genStoreSourceReg: sourceReg slotIndex: index destReg: destReg scratchReg: scratchReg
- 	| jmpImmediate jmpDestYoung jmpSourceOld jmpAlreadyRemembered mask rememberedBitByteOffset |
- 	<var: #jmpImmediate type: #'AbstractInstruction *'>
- 	<var: #jmpDestYoung type: #'AbstractInstruction *'>
- 	<var: #jmpSourceOld type: #'AbstractInstruction *'>
- 	<var: #jmpAlreadyRemembered type: #'AbstractInstruction *'>
  	"do the store"
  	cogit MoveR: sourceReg
  		   Mw: index * objectMemory wordSize + objectMemory baseHeaderSize
  		   r: destReg.
+ 	"now the check"
+ 	^self genStoreCheckReceiverReg: destReg valueReg: sourceReg scratchReg: scratchReg!
- 	"now the check.  Is value stored an integer?  If so we're done"
- 	cogit MoveR: sourceReg R: scratchReg.
- 	cogit AndCq: objectMemory tagMask R: scratchReg.
- 	jmpImmediate := cogit JumpNonZero: 0.
- 	"Get the old/new boundary in scratchReg"
- 	cogit MoveCw: objectMemory storeCheckBoundary R: scratchReg.
- 	"Is target young?  If so we're done"
- 	cogit CmpR: scratchReg R: destReg. "N.B. FLAGS := destReg - scratchReg"
- 	jmpDestYoung := cogit JumpBelow: 0.
- 	"Is value stored old?  If so we're done."
- 	cogit CmpR: scratchReg R: sourceReg. "N.B. FLAGS := sourceReg - scratchReg"
- 	jmpSourceOld := cogit JumpAboveOrEqual: 0.
- 	"value is young and target is old.
- 	 Need to remember this only if the remembered bit is not already set.
- 	 Test the remembered bit.  Only need to fetch the byte containing it,
- 	 which reduces the size of the mask constant."
- 	rememberedBitByteOffset := jmpSourceOld isBigEndian
- 									ifTrue: [objectMemory baseHeaderSize - 1 - (objectMemory rememberedBitShift // 8)]
- 									ifFalse:[objectMemory rememberedBitShift // 8].
- 	mask := 1 << (objectMemory rememberedBitShift \\ 8).
- 	"N.B. MoveMb:r:R: does not zero other bits"
- 	cogit MoveMb: rememberedBitByteOffset r: destReg R: scratchReg.
- 	cogit AndCq: mask R: scratchReg.
- 	jmpAlreadyRemembered := cogit JumpNonZero: 0.
- 	"Remembered bit is not set.  Call store check to insert dest into remembered table."
- 	self assert: destReg == ReceiverResultReg.
- 	cogit CallRT: ceStoreCheckTrampoline.
- 	jmpImmediate jmpTarget:
- 	(jmpDestYoung jmpTarget:
- 	(jmpSourceOld jmpTarget:
- 	(jmpAlreadyRemembered jmpTarget:
- 		cogit Label))).
- 	^0!

Item was added:
+ ----- Method: CogObjectRepresentationForSpur>>getStoreCheckReceiverReg:valueReg:scratchReg: (in category 'compile abstract instructions') -----
+ getStoreCheckReceiverReg: destReg valueReg: valueReg scratchReg: scratchReg
+ 	"Generate the code for a store check of valueReg into destReg."
+ 	| jmpImmediate jmpDestYoung jmpSourceOld jmpAlreadyRemembered mask rememberedBitByteOffset |
+ 	<var: #jmpImmediate type: #'AbstractInstruction *'>
+ 	<var: #jmpDestYoung type: #'AbstractInstruction *'>
+ 	<var: #jmpSourceOld type: #'AbstractInstruction *'>
+ 	<var: #jmpAlreadyRemembered type: #'AbstractInstruction *'>
+ 	"Is value stored an integer?  If so we're done"
+ 	cogit MoveR: valueReg R: scratchReg.
+ 	cogit AndCq: objectMemory tagMask R: scratchReg.
+ 	jmpImmediate := cogit JumpNonZero: 0.
+ 	"Get the old/new boundary in scratchReg"
+ 	cogit MoveCw: objectMemory storeCheckBoundary R: scratchReg.
+ 	"Is target young?  If so we're done"
+ 	cogit CmpR: scratchReg R: destReg. "N.B. FLAGS := destReg - scratchReg"
+ 	jmpDestYoung := cogit JumpBelow: 0.
+ 	"Is value stored old?  If so we're done."
+ 	cogit CmpR: scratchReg R: valueReg. "N.B. FLAGS := valueReg - scratchReg"
+ 	jmpSourceOld := cogit JumpAboveOrEqual: 0.
+ 	"value is young and target is old.
+ 	 Need to remember this only if the remembered bit is not already set.
+ 	 Test the remembered bit.  Only need to fetch the byte containing it,
+ 	 which reduces the size of the mask constant."
+ 	rememberedBitByteOffset := jmpSourceOld isBigEndian
+ 									ifTrue: [objectMemory baseHeaderSize - 1 - (objectMemory rememberedBitShift // 8)]
+ 									ifFalse:[objectMemory rememberedBitShift // 8].
+ 	mask := 1 << (objectMemory rememberedBitShift \\ 8).
+ 	"N.B. MoveMb:r:R: does not zero other bits"
+ 	cogit MoveMb: rememberedBitByteOffset r: destReg R: scratchReg.
+ 	cogit AndCq: mask R: scratchReg.
+ 	jmpAlreadyRemembered := cogit JumpNonZero: 0.
+ 	"Remembered bit is not set.  Call store check to insert dest into remembered table."
+ 	self assert: destReg == ReceiverResultReg.
+ 	cogit CallRT: ceStoreCheckTrampoline.
+ 	jmpImmediate jmpTarget:
+ 	(jmpDestYoung jmpTarget:
+ 	(jmpSourceOld jmpTarget:
+ 	(jmpAlreadyRemembered jmpTarget:
+ 		cogit Label))).
+ 	^0!

Item was added:
+ ----- Method: Cogit>>MoveR:Xbr:R: (in category 'abstract instructions') -----
+ MoveR: srcReg Xbr: indexReg R: baseReg
+ 	<inline: true>
+ 	<returnTypeC: #'AbstractInstruction *'>
+ 	^self gen: MoveRXbrR operand: srcReg operand: indexReg operand: baseReg!

Item was changed:
  ----- Method: SimpleStackBasedCogit class>>initializePrimitiveTableForSqueakV3 (in category 'class initialization') -----
  initializePrimitiveTableForSqueakV3
  	"Initialize the table of primitive generators.  This does not include normal primitives implemened in the coInterpreter."
  	"SimpleStackBasedCogit initializePrimitiveTableForSqueakV3"
  	MaxCompiledPrimitiveIndex := 222.
  	primitiveTable := CArrayAccessor on: (Array new: MaxCompiledPrimitiveIndex + 1).
  	self table: primitiveTable from: 
  	#(	"Integer Primitives (0-19)"
  		(1 genPrimitiveAdd				1)
  		(2 genPrimitiveSubtract			1)
  		(3 genPrimitiveLessThan		1)
  		(4 genPrimitiveGreaterThan		1)
  		(5 genPrimitiveLessOrEqual		1)
  		(6 genPrimitiveGreaterOrEqual	1)
  		(7 genPrimitiveEqual			1)
  		(8 genPrimitiveNotEqual		1)
  		(9 genPrimitiveMultiply			1	processorHasMultiply:)
  		(10 genPrimitiveDivide			1	processorHasDivQuoRem:)
  		(11 genPrimitiveMod			1	processorHasDivQuoRem:)
  		(12 genPrimitiveDiv				1	processorHasDivQuoRem:)
  		(13 genPrimitiveQuo			1	processorHasDivQuoRem:)
  		(14 genPrimitiveBitAnd			1)
  		(15 genPrimitiveBitOr			1)
  		(16 genPrimitiveBitXor			1)
  		(17 genPrimitiveBitShift			1)
  		"(18 primitiveMakePoint)"
  		"(19 primitiveFail)"					"Guard primitive for simulation -- *must* fail"
  
  		"LargeInteger Primitives (20-39)"
  		"(20 primitiveFail)"
  		"(21 primitiveAddLargeIntegers)"
  		"(22 primitiveSubtractLargeIntegers)"
  		"(23 primitiveLessThanLargeIntegers)"
  		"(24 primitiveGreaterThanLargeIntegers)"
  		"(25 primitiveLessOrEqualLargeIntegers)"
  		"(26 primitiveGreaterOrEqualLargeIntegers)"
  		"(27 primitiveEqualLargeIntegers)"
  		"(28 primitiveNotEqualLargeIntegers)"
  		"(29 primitiveMultiplyLargeIntegers)"
  		"(30 primitiveDivideLargeIntegers)"
  		"(31 primitiveModLargeIntegers)"
  		"(32 primitiveDivLargeIntegers)"
  		"(33 primitiveQuoLargeIntegers)"
  		"(34 primitiveBitAndLargeIntegers)"
  		"(35 primitiveBitOrLargeIntegers)"
  		"(36 primitiveBitXorLargeIntegers)"
  		"(37 primitiveBitShiftLargeIntegers)"
  
  		"Float Primitives (38-59)"
  		"(38 primitiveFloatAt)"
  		"(39 primitiveFloatAtPut)"
  		(40 genPrimitiveAsFloat					0	processorHasDoublePrecisionFloatingPointSupport:)
  		(41 genPrimitiveFloatAdd				1	processorHasDoublePrecisionFloatingPointSupport:)
  		(42 genPrimitiveFloatSubtract			1	processorHasDoublePrecisionFloatingPointSupport:)
  		(43 genPrimitiveFloatLessThan			1	processorHasDoublePrecisionFloatingPointSupport:)
  		(44 genPrimitiveFloatGreaterThan		1	processorHasDoublePrecisionFloatingPointSupport:)
  		(45 genPrimitiveFloatLessOrEqual		1	processorHasDoublePrecisionFloatingPointSupport:)
  		(46 genPrimitiveFloatGreaterOrEqual	1	processorHasDoublePrecisionFloatingPointSupport:)
  		(47 genPrimitiveFloatEqual				1	processorHasDoublePrecisionFloatingPointSupport:)
  		(48 genPrimitiveFloatNotEqual			1	processorHasDoublePrecisionFloatingPointSupport:)
  		(49 genPrimitiveFloatMultiply			1	processorHasDoublePrecisionFloatingPointSupport:)
  		(50 genPrimitiveFloatDivide				1	processorHasDoublePrecisionFloatingPointSupport:)
  		"(51 primitiveTruncated)"
  		"(52 primitiveFractionalPart)"
  		"(53 primitiveExponent)"
  		"(54 primitiveTimesTwoPower)"
  		(55 genPrimitiveFloatSquareRoot		0	processorHasDoublePrecisionFloatingPointSupport:)
  		"(56 primitiveSine)"
  		"(57 primitiveArctan)"
  		"(58 primitiveLogN)"
  		"(59 primitiveExp)"
  
  		"Subscript and Stream Primitives (60-67)"
+ 		(60 genPrimitiveAt				1)
+ 		(61 genPrimitiveAtPut			2)
+ 		(62 genPrimitiveSize			0)
+ 		(63 genPrimitiveStringAt		1)
+ 		(64 genPrimitiveStringAtPut		2)
- 		(60 genPrimitiveAt			1)
- 		"(61 primitiveAtPut)"
- 		(62 genPrimitiveSize		0)
- 		(63 genPrimitiveStringAt	1)
- 		"(64 primitiveStringAtPut)"
  		"The stream primitives no longer pay their way; normal Smalltalk code is faster."
  		"(65 primitiveFail)""was primitiveNext"
  		"(66 primitiveFail)" "was primitiveNextPut"
  		"(67 primitiveFail)" "was primitiveAtEnd"
  
  		"StorageManagement Primitives (68-79)"
  		"(68 primitiveObjectAt)"
  		"(69 primitiveObjectAtPut)"
  		(70 genPrimitiveNew			0)
  		(71 genPrimitiveNewWithArg	1)
  		"(72 primitiveArrayBecomeOneWay)"		"Blue Book: primitiveBecome"
  		"(73 primitiveInstVarAt)"
  		"(74 primitiveInstVarAtPut)"
  		(75 genPrimitiveIdentityHash	0)
  		"(76 primitiveStoreStackp)"					"Blue Book: primitiveAsObject"
  		"(77 primitiveSomeInstance)"
  		"(78 primitiveNextInstance)"
  		(79 genPrimitiveNewMethod	2)
  
  		"Control Primitives (80-89)"
  		"(80 primitiveFail)"							"Blue Book: primitiveBlockCopy"
  		"(81 primitiveFail)"							"Blue Book: primitiveValue"
  		"(82 primitiveFail)"							"Blue Book: primitiveValueWithArgs"
  		"(83 primitivePerform)"
  		"(84 primitivePerformWithArgs)"
  		"(85 primitiveSignal)"
  		"(86 primitiveWait)"
  		"(87 primitiveResume)"
  		"(88 primitiveSuspend)"
  		"(89 primitiveFlushCache)"
  
  		"Input/Output Primitives (90-109); We won't compile any of these"
  
  		"System Primitives (110-119)"
  		(110 genPrimitiveIdentical 1)
  		(111 genPrimitiveClass)
  		"(112 primitiveBytesLeft)"
  		"(113 primitiveQuit)"
  		"(114 primitiveExitToDebugger)"
  		"(115 primitiveChangeClass)"					"Blue Book: primitiveOopsLeft"
  		"(116 primitiveFlushCacheByMethod)"
  		"(117 primitiveExternalCall)"
  		"(118 primitiveDoPrimitiveWithArgs)"
  		"(119 primitiveFlushCacheSelective)"
  			"Squeak 2.2 and earlier use 119.  Squeak 2.3 and later use 116.
  			Both are supported for backward compatibility."
  
  		"Miscellaneous Primitives (120-127); We won't compile any of these"
  
  		"Squeak Primitives Start Here"
  
  		"Squeak Miscellaneous Primitives (128-149); We won't compile any of these"
  
  		"File Primitives (150-169) - NO LONGER INDEXED; We won't compile any of these"
  		(169 genPrimitiveNotIdentical 1)
  
  		"Sound Primitives (170-199) - NO LONGER INDEXED; We won't compile any of these"
  
  		"Old closure primitives"
  		"(186 primitiveFail)" "was primitiveClosureValue"
  		"(187 primitiveFail)" "was primitiveClosureValueWithArgs"
  
  		"Perform method directly"
  		"(188 primitiveExecuteMethodArgsArray)"
  		"(189 primitiveExecuteMethod)"
  
  		"Sound Primitives (continued) - NO LONGER INDEXED; We won't compile any of these"
  		"(190 194 primitiveFail)"
  
  		"Unwind primitives"
  		"(195 primitiveFindNextUnwindContext)"
  		"(196 primitiveTerminateTo)"
  		"(197 primitiveFindHandlerContext)"
  		(198 genFastPrimFail "primitiveMarkUnwindMethod")
  		(199 genFastPrimFail "primitiveMarkHandlerMethod")
  
  		"new closure primitives (were Networking primitives)"
  		"(200 primitiveClosureCopyWithCopiedValues)"
  		(201 genPrimitiveClosureValue	0) "value"
  		(202 genPrimitiveClosureValue	1) "value:"
  		(203 genPrimitiveClosureValue	2) "value:value:"
  		(204 genPrimitiveClosureValue	3) "value:value:value:"
  		(205 genPrimitiveClosureValue	4) "value:value:value:value:"
  		"(206 genPrimitiveClosureValueWithArgs)" "valueWithArguments:"
  
  		"(207 209 primitiveFail)"	"reserved for Cog primitives"
  
  		"(210 primitiveContextAt)"
  		"(211 primitiveContextAtPut)"
  		"(212 primitiveContextSize)"
  		"(213 217 primitiveFail)"	"reserved for Cog primitives"
  		"(218 primitiveDoNamedPrimitiveWithArgs)"
  		"(219 primitiveFail)"	"reserved for Cog primitives"
  
  		"(220 primitiveFail)"		"reserved for Cog primitives"
  
  		(221 genPrimitiveClosureValue	0) "valueNoContextSwitch"
  		(222 genPrimitiveClosureValue	1) "valueNoContextSwitch:"
  
  		"(223 229 primitiveFail)"	"reserved for Cog primitives"
  	)!

Item was added:
+ ----- Method: SimpleStackBasedCogit>>genPrimitiveAtPut (in category 'primitive generators') -----
+ genPrimitiveAtPut
+ 	| r |
+ 	self MoveMw: BytesPerWord * 2 r: SPReg R: Arg0Reg.
+ 	self MoveMw: BytesPerWord r: SPReg R: Arg1Reg.
+ 	((r := objectRepresentation genInnerPrimitiveAtPut: BytesPerWord * 3) < 0
+ 	 and: [r ~= UnimplementedPrimitive]) ifTrue:
+ 		[^r].
+ 	^self compileFallbackToInterpreterPrimitive!

Item was added:
+ ----- Method: SimpleStackBasedCogit>>genPrimitiveStringAtPut (in category 'primitive generators') -----
+ genPrimitiveStringAtPut
+ 	| r |
+ 	self MoveMw: BytesPerWord * 2 r: SPReg R: Arg0Reg.
+ 	self MoveMw: BytesPerWord r: SPReg R: Arg1Reg.
+ 	((r := objectRepresentation genInnerPrimitiveStringAtPut: BytesPerWord * 3) < 0
+ 	 and: [r ~= UnimplementedPrimitive]) ifTrue:
+ 		[^r].
+ 	^self compileFallbackToInterpreterPrimitive!

Item was added:
+ ----- Method: StackToRegisterMappingCogit>>genPrimitiveAtPut (in category 'primitive generators') -----
+ genPrimitiveAtPut
+ 	| r |
+ 	((r := objectRepresentation genInnerPrimitiveAtPut: 0) < 0
+ 	 and: [r ~= UnimplementedPrimitive]) ifTrue:
+ 		[^r].
+ 	^self compileFallbackToInterpreterPrimitive!

Item was added:
+ ----- Method: StackToRegisterMappingCogit>>genPrimitiveStringAtPut (in category 'primitive generators') -----
+ genPrimitiveStringAtPut
+ 	| r |
+ 	((r := objectRepresentation genInnerPrimitiveStringAtPut: 0) < 0
+ 	 and: [r ~= UnimplementedPrimitive]) ifTrue:
+ 		[^r].
+ 	^self compileFallbackToInterpreterPrimitive!



More information about the Vm-dev mailing list