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

commits at source.squeak.org commits at source.squeak.org
Thu Oct 3 21:29:51 UTC 2013


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

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

Name: VMMaker.oscog-eem.431
Author: eem
Time: 3 October 2013, 2:27:02.905 pm
UUID: b08726c3-49b7-40b1-852e-6e895e8f070f
Ancestors: VMMaker.oscog-eem.430

Remap *prim*Equivalent* to *prim*Identical*.  == is not equivalence :)

Add framework to primitive table & objectRepresentation for
implementing basicNew, basicNew: & newMethod:header: in
machine code.

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

Item was added:
+ ----- Method: CogObjectRepresentation>>implementsNew (in category 'initialization') -----
+ implementsNew
+ 	^false!

Item was added:
+ ----- Method: CogObjectRepresentation>>implementsNewMethod (in category 'initialization') -----
+ implementsNewMethod
+ 	^false!

Item was added:
+ ----- Method: CogObjectRepresentation>>implementsNewWithArg (in category 'initialization') -----
+ implementsNewWithArg
+ 	^false!

Item was added:
+ ----- Method: CogObjectRepresentationForSpur>>implementsNew (in category 'initialization') -----
+ implementsNew
+ 	^true!

Item was added:
+ ----- Method: Cogit>>objectRepresentationImplementsNew: (in category 'initialization') -----
+ objectRepresentationImplementsNew: primitiveIndex
+ 	^objectRepresentation implementsNew!

Item was added:
+ ----- Method: Cogit>>objectRepresentationImplementsNewMethod: (in category 'initialization') -----
+ objectRepresentationImplementsNewMethod: primitiveIndex
+ 	^objectRepresentation implementsNewMethod!

Item was added:
+ ----- Method: Cogit>>objectRepresentationImplementsNewWithArg: (in category 'initialization') -----
+ objectRepresentationImplementsNewWithArg: primitiveIndex
+ 	^objectRepresentation implementsNewWithArg!

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:)
- 		(40 genPrimitiveAsFloat				0	processorHasDoublePrecisionFloatingPointSupport:)
  		(41 genPrimitiveFloatAdd				1	processorHasDoublePrecisionFloatingPointSupport:)
+ 		(42 genPrimitiveFloatSubtract			1	processorHasDoublePrecisionFloatingPointSupport:)
+ 		(43 genPrimitiveFloatLessThan			1	processorHasDoublePrecisionFloatingPointSupport:)
+ 		(44 genPrimitiveFloatGreaterThan		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:)
- 		(47 genPrimitiveFloatEqual			1	processorHasDoublePrecisionFloatingPointSupport:)
- 		(48 genPrimitiveFloatNotEqual		1	processorHasDoublePrecisionFloatingPointSupport:)
  		(49 genPrimitiveFloatMultiply			1	processorHasDoublePrecisionFloatingPointSupport:)
+ 		(50 genPrimitiveFloatDivide				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)
- 		(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 primitiveNew				0			objectRepresentationImplementsNew:)
+ 		(71 primitiveNewWithArg		1			objectRepresentationImplementsNewWithArg:)
- 		"(70 primitiveNew)"
- 		"(71 primitiveNewWithArg)"
  		"(72 primitiveArrayBecomeOneWay)"	"Blue Book: primitiveBecome"
  		"(73 primitiveInstVarAt)"
  		"(74 primitiveInstVarAtPut)"
  		(75 genPrimitiveIdentityHash	0)
  		"(76 primitiveStoreStackp)"					"Blue Book: primitiveAsObject"
  		"(77 primitiveSomeInstance)"
  		"(78 primitiveNextInstance)"
+ 		(79 primitiveNewMethod		2			objectRepresentationImplementsNewMethod:)
- 		"(79 primitiveNewMethod)"
  
  		"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)
- 		(110 genPrimitiveEquivalent 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)
- 		(169 genPrimitiveNotEquivalent 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:"
- 		(201 genPrimitiveClosureValue) "value"
- 		(202 genPrimitiveClosureValue) "value:"
- 		(203 genPrimitiveClosureValue) "value:value:"
- 		(204 genPrimitiveClosureValue) "value:value:value:"
- 		(205 genPrimitiveClosureValue) "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:"
- 		(221 genPrimitiveClosureValue) "valueNoContextSwitch"
- 		(222 genPrimitiveClosureValue) "valueNoContextSwitch:"
  
  		"(223 229 primitiveFail)"	"reserved for Cog primitives"
  	)!

Item was removed:
- ----- Method: SimpleStackBasedCogit>>genPrimitiveEquivalent (in category 'primitive generators') -----
- genPrimitiveEquivalent
- 	"Stack looks like
- 		receiver (also in ResultReceiverReg)
- 		arg
- 		return address"
- 	| jumpFalse |
- 	<var: #jumpFalse type: #'AbstractInstruction *'>
- 	self MoveMw: BytesPerWord r: SPReg R: TempReg.
- 	self CmpR: TempReg R: ReceiverResultReg.
- 	jumpFalse := self JumpNonZero: 0.
- 	self annotate: (self MoveCw: objectMemory trueObject R: ReceiverResultReg)
- 		objRef: objectMemory trueObject.
- 	self flag: 'currently caller pushes result'.
- 	self RetN: BytesPerWord * 2.
- 	jumpFalse jmpTarget: (self annotate: (self MoveCw: objectMemory falseObject R: ReceiverResultReg)
- 								objRef: objectMemory falseObject).
- 	self RetN: BytesPerWord * 2.
- 	^0!

Item was added:
+ ----- Method: SimpleStackBasedCogit>>genPrimitiveIdentical (in category 'primitive generators') -----
+ genPrimitiveIdentical
+ 	"Stack looks like
+ 		receiver (also in ResultReceiverReg)
+ 		arg
+ 		return address"
+ 	| jumpFalse |
+ 	<var: #jumpFalse type: #'AbstractInstruction *'>
+ 	self MoveMw: BytesPerWord r: SPReg R: TempReg.
+ 	self CmpR: TempReg R: ReceiverResultReg.
+ 	jumpFalse := self JumpNonZero: 0.
+ 	self annotate: (self MoveCw: objectMemory trueObject R: ReceiverResultReg)
+ 		objRef: objectMemory trueObject.
+ 	self flag: 'currently caller pushes result'.
+ 	self RetN: BytesPerWord * 2.
+ 	jumpFalse jmpTarget: (self annotate: (self MoveCw: objectMemory falseObject R: ReceiverResultReg)
+ 								objRef: objectMemory falseObject).
+ 	self RetN: BytesPerWord * 2.
+ 	^0!

Item was removed:
- ----- Method: SimpleStackBasedCogit>>genPrimitiveNotEquivalent (in category 'primitive generators') -----
- genPrimitiveNotEquivalent
- 	"Stack looks like
- 		receiver (also in ResultReceiverReg)
- 		arg
- 		return address"
- 	| jumpFalse |
- 	<var: #jumpFalse type: #'AbstractInstruction *'>
- 	self MoveMw: BytesPerWord r: SPReg R: TempReg.
- 	self CmpR: TempReg R: ReceiverResultReg.
- 	jumpFalse := self JumpZero: 0.
- 	self annotate: (self MoveCw: objectMemory trueObject R: ReceiverResultReg)
- 		objRef: objectMemory trueObject.
- 	self flag: 'currently caller pushes result'.
- 	self RetN: BytesPerWord * 2.
- 	jumpFalse jmpTarget: (self annotate: (self MoveCw: objectMemory falseObject R: ReceiverResultReg)
- 								objRef: objectMemory falseObject).
- 	self RetN: BytesPerWord * 2.
- 	^0!

Item was added:
+ ----- Method: SimpleStackBasedCogit>>genPrimitiveNotIdentical (in category 'primitive generators') -----
+ genPrimitiveNotIdentical
+ 	"Stack looks like
+ 		receiver (also in ResultReceiverReg)
+ 		arg
+ 		return address"
+ 	| jumpFalse |
+ 	<var: #jumpFalse type: #'AbstractInstruction *'>
+ 	self MoveMw: BytesPerWord r: SPReg R: TempReg.
+ 	self CmpR: TempReg R: ReceiverResultReg.
+ 	jumpFalse := self JumpZero: 0.
+ 	self annotate: (self MoveCw: objectMemory trueObject R: ReceiverResultReg)
+ 		objRef: objectMemory trueObject.
+ 	self flag: 'currently caller pushes result'.
+ 	self RetN: BytesPerWord * 2.
+ 	jumpFalse jmpTarget: (self annotate: (self MoveCw: objectMemory falseObject R: ReceiverResultReg)
+ 								objRef: objectMemory falseObject).
+ 	self RetN: BytesPerWord * 2.
+ 	^0!

Item was changed:
  ----- Method: StackInterpreter class>>initializeBytecodeTableForNewspeakV3PlusClosures (in category 'initialization') -----
  initializeBytecodeTableForNewspeakV3PlusClosures
  	"StackInterpreter initializeBytecodeTableForNewspeakV3PlusClosures"
  	"Note: This table will be used to generate a C switch statement."
  
  	BytecodeTable := Array new: 256.
  	self table: BytecodeTable from:
  	#(
  		(  0  15 pushReceiverVariableBytecode)
  		( 16  31 pushTemporaryVariableBytecode)
  		( 32  63 pushLiteralConstantBytecode)
  		( 64  95 pushLiteralVariableBytecode)
  		( 96 103 storeAndPopReceiverVariableBytecode)
  		(104 111 storeAndPopTemporaryVariableBytecode)
  		(112 pushReceiverBytecode)
  		(113 pushConstantTrueBytecode)
  		(114 pushConstantFalseBytecode)
  		(115 pushConstantNilBytecode)
  		(116 pushConstantMinusOneBytecode)
  		(117 pushConstantZeroBytecode)
  		(118 pushConstantOneBytecode)
  		(119 pushConstantTwoBytecode)
  		(120 returnReceiver)
  		(121 returnTrue)
  		(122 returnFalse)
  		(123 returnNil)
  		(124 returnTopFromMethod)
  		(125 returnTopFromBlock)
  
  		"2 of the 3 Newspeak bytecodes"
  		(126 dynamicSuperSendBytecode)
  		(127 pushImplicitReceiverBytecode)
  
  		(128 extendedPushBytecode)
  		(129 extendedStoreBytecode)
  		(130 extendedStoreAndPopBytecode)
  		(131 singleExtendedSendBytecode)
  		(132 doubleExtendedDoAnythingBytecode)
  		(133 singleExtendedSuperBytecode)
  		(134 secondExtendedSendBytecode)
  		(135 popStackBytecode)
  		(136 duplicateTopBytecode)
  
  		(137 pushActiveContextBytecode)
  		(138 pushNewArrayBytecode)
  
  		"The last of 3 Newspeak bytecodes"
  		(139 pushExplicitOuterSendReceiverBytecode)
  
  		(140 pushRemoteTempLongBytecode)
  		(141 storeRemoteTempLongBytecode)
  		(142 storeAndPopRemoteTempLongBytecode)
  		(143 pushClosureCopyCopiedValuesBytecode)
  
  		(144 151 shortUnconditionalJump)
  		(152 159 shortConditionalJumpFalse)
  		(160 167 longUnconditionalJump)
  		(168 171 longJumpIfTrue)
  		(172 175 longJumpIfFalse)
  
  		"176-191 were sendArithmeticSelectorBytecode"
  		(176 bytecodePrimAdd)
  		(177 bytecodePrimSubtract)
  		(178 bytecodePrimLessThan)
  		(179 bytecodePrimGreaterThan)
  		(180 bytecodePrimLessOrEqual)
  		(181 bytecodePrimGreaterOrEqual)
  		(182 bytecodePrimEqual)
  		(183 bytecodePrimNotEqual)
  		(184 bytecodePrimMultiply)
  		(185 bytecodePrimDivide)
  		(186 bytecodePrimMod)
  		(187 bytecodePrimMakePoint)
  		(188 bytecodePrimBitShift)
  		(189 bytecodePrimDiv)
  		(190 bytecodePrimBitAnd)
  		(191 bytecodePrimBitOr)
  
  		"192-207 were sendCommonSelectorBytecode"
  		(192 bytecodePrimAt)
  		(193 bytecodePrimAtPut)
  		(194 bytecodePrimSize)
  		(195 bytecodePrimNext)
  		(196 bytecodePrimNextPut)
  		(197 bytecodePrimAtEnd)
+ 		(198 bytecodePrimIdentical)
- 		(198 bytecodePrimEquivalent)
  		(199 bytecodePrimClass)
  		(200 bytecodePrimSpecialSelector24)
  		(201 bytecodePrimValue)
  		(202 bytecodePrimValueWithArg)
  		(203 bytecodePrimDo)
  		(204 bytecodePrimNew)
  		(205 bytecodePrimNewWithArg)
  		(206 bytecodePrimPointX)
  		(207 bytecodePrimPointY)
  
  		(208 223 sendLiteralSelector0ArgsBytecode)
  		(224 239 sendLiteralSelector1ArgBytecode)
  		(240 255 sendLiteralSelector2ArgsBytecode)
  	)!

Item was changed:
  ----- Method: StackInterpreter class>>initializeBytecodeTableForNewspeakV4 (in category 'initialization') -----
  initializeBytecodeTableForNewspeakV4
  	"StackInterpreter initializeBytecodeTableForNewspeakV4"
  	"Note: This table will be used to generate a C switch statement."
  
  	BytecodeTable := Array new: 256.
  	self table: BytecodeTable from:
  	#(	"1 byte bytecodes"
  		(   0  15 pushReceiverVariableBytecode)
  		( 16  31 pushLiteralVariable16CasesBytecode)
  		( 32  63 pushLiteralConstantBytecode)
  		( 64  75 pushTemporaryVariableBytecode)
  		( 76	 pushReceiverBytecode)
  		( 77	 extPushPseudoVariableOrOuterBytecode)
  		( 78	 pushConstantZeroBytecode)
  		( 79	 pushConstantOneBytecode)
  
  		( 80	 bytecodePrimAdd)
  		( 81	 bytecodePrimSubtract)
  		( 82	 bytecodePrimLessThanV4) "for booleanCheatV4:"
  		( 83	 bytecodePrimGreaterThanV4) "for booleanCheatV4:"
  		( 84	 bytecodePrimLessOrEqualV4) "for booleanCheatV4:"
  		( 85	 bytecodePrimGreaterOrEqualV4) "for booleanCheatV4:"
  		( 86	 bytecodePrimEqualV4) "for booleanCheatV4:"
  		( 87	 bytecodePrimNotEqualV4) "for booleanCheatV4:"
  		( 88	 bytecodePrimMultiply)
  		( 89	 bytecodePrimDivide)
  		( 90	 bytecodePrimMod)
  		( 91	 bytecodePrimMakePoint)
  		( 92	 bytecodePrimBitShift)
  		( 93	 bytecodePrimDiv)
  		( 94	 bytecodePrimBitAnd)
  		( 95	 bytecodePrimBitOr)
  
  		( 96	 bytecodePrimAt)
  		( 97	 bytecodePrimAtPut)
  		( 98	 bytecodePrimSize)
  		( 99	 bytecodePrimNext)
  		(100	 bytecodePrimNextPut)
  		(101	 bytecodePrimAtEnd)
+ 		(102	 bytecodePrimIdenticalV4) "for booleanCheatV4:"
- 		(102	 bytecodePrimEquivalentV4) "for booleanCheatV4:"
  		(103	 bytecodePrimClass)
  		(104	 bytecodePrimSpecialSelector24) "was blockCopy:"
  		(105	 bytecodePrimValue)
  		(106	 bytecodePrimValueWithArg)
  		(107	 bytecodePrimDo)
  		(108	 bytecodePrimNew)
  		(109	 bytecodePrimNewWithArg)
  		(110	 bytecodePrimPointX)
  		(111	 bytecodePrimPointY)
  
  		(112 127	sendLiteralSelector0ArgsBytecode)
  		(128 143	sendLiteralSelector1ArgBytecode)
  		(144 159	sendLiteralSelector2ArgsBytecode)
  		(160 175	sendAbsentImplicit0ArgsBytecode)
  
  		(176 183	storeAndPopReceiverVariableBytecode)
  		(184 191	storeAndPopTemporaryVariableBytecode)
  
  		(192 199	shortUnconditionalJump)
  		(200 207	shortConditionalJumpTrue)
  		(208 215	shortConditionalJumpFalse)
  
  		(216		returnReceiver)
  		(217		returnTopFromMethod)
  		(218		extReturnTopFromBlock)
  
  		(219		duplicateTopBytecode)
  		(220		popStackBytecode)
  		(221		extNopBytecode)
  		(222 223	unknownBytecode)
  
  		"2 byte bytecodes"
  		(224		extABytecode)
  		(225		extBBytecode)
  
  		(226		extPushReceiverVariableBytecode)
  		(227		extPushLiteralVariableBytecode)
  		(228		extPushLiteralBytecode)
  		(229		extPushIntegerBytecode)
  		(230		longPushTemporaryVariableBytecode)
  		(231		pushNewArrayBytecode)
  		(232		extStoreReceiverVariableBytecode)
  		(233		extStoreLiteralVariableBytecode)
  		(234		longStoreTemporaryVariableBytecode)
  		(235		extStoreAndPopReceiverVariableBytecode)
  		(236		extStoreAndPopLiteralVariableBytecode)
  		(237		longStoreAndPopTemporaryVariableBytecode)
  
  		(238		extSendBytecode)
  		(239		extSendSuperBytecode)
  		(240		extSendAbsentImplicitBytecode)
  		(241		extSendAbsentDynamicSuperBytecode)
  
  		(242		extUnconditionalJump)
  		(243		extJumpIfTrue)
  		(244		extJumpIfFalse)
  
  		(245 248	unknownBytecode)
  
  		"3 byte bytecodes"
  		(249		callPrimitiveBytecode)
  
  		(250		pushRemoteTempLongBytecode)
  		(251		storeRemoteTempLongBytecode)
  		(252		storeAndPopRemoteTempLongBytecode)
  		(253		extPushClosureBytecode)
  
  		(254 255	unknownBytecode)
  	)!

Item was changed:
  ----- Method: StackInterpreter class>>initializeBytecodeTableForSqueakV3PlusClosures (in category 'initialization') -----
  initializeBytecodeTableForSqueakV3PlusClosures
  	"StackInterpreter initializeBytecodeTableForSqueakV3PlusClosures"
  	"Note: This table will be used to generate a C switch statement."
  
  	BytecodeTable := Array new: 256.
  	self table: BytecodeTable from:
  	#(
  		(  0  15 pushReceiverVariableBytecode)
  		( 16  31 pushTemporaryVariableBytecode)
  		( 32  63 pushLiteralConstantBytecode)
  		( 64  95 pushLiteralVariableBytecode)
  		( 96 103 storeAndPopReceiverVariableBytecode)
  		(104 111 storeAndPopTemporaryVariableBytecode)
  		(112 pushReceiverBytecode)
  		(113 pushConstantTrueBytecode)
  		(114 pushConstantFalseBytecode)
  		(115 pushConstantNilBytecode)
  		(116 pushConstantMinusOneBytecode)
  		(117 pushConstantZeroBytecode)
  		(118 pushConstantOneBytecode)
  		(119 pushConstantTwoBytecode)
  		(120 returnReceiver)
  		(121 returnTrue)
  		(122 returnFalse)
  		(123 returnNil)
  		(124 returnTopFromMethod)
  		(125 returnTopFromBlock)
  
  		(126 127 unknownBytecode)
  
  		(128 extendedPushBytecode)
  		(129 extendedStoreBytecode)
  		(130 extendedStoreAndPopBytecode)
  		(131 singleExtendedSendBytecode)
  		(132 doubleExtendedDoAnythingBytecode)
  		(133 singleExtendedSuperBytecode)
  		(134 secondExtendedSendBytecode)
  		(135 popStackBytecode)
  		(136 duplicateTopBytecode)
  
  		(137 pushActiveContextBytecode)
  		(138 pushNewArrayBytecode)
  		(139 unknownBytecode)
  		(140 pushRemoteTempLongBytecode)
  		(141 storeRemoteTempLongBytecode)
  		(142 storeAndPopRemoteTempLongBytecode)
  		(143 pushClosureCopyCopiedValuesBytecode)
  
  		(144 151 shortUnconditionalJump)
  		(152 159 shortConditionalJumpFalse)
  		(160 167 longUnconditionalJump)
  		(168 171 longJumpIfTrue)
  		(172 175 longJumpIfFalse)
  
  		"176-191 were sendArithmeticSelectorBytecode"
  		(176 bytecodePrimAdd)
  		(177 bytecodePrimSubtract)
  		(178 bytecodePrimLessThan)
  		(179 bytecodePrimGreaterThan)
  		(180 bytecodePrimLessOrEqual)
  		(181 bytecodePrimGreaterOrEqual)
  		(182 bytecodePrimEqual)
  		(183 bytecodePrimNotEqual)
  		(184 bytecodePrimMultiply)
  		(185 bytecodePrimDivide)
  		(186 bytecodePrimMod)
  		(187 bytecodePrimMakePoint)
  		(188 bytecodePrimBitShift)
  		(189 bytecodePrimDiv)
  		(190 bytecodePrimBitAnd)
  		(191 bytecodePrimBitOr)
  
  		"192-207 were sendCommonSelectorBytecode"
  		(192 bytecodePrimAt)
  		(193 bytecodePrimAtPut)
  		(194 bytecodePrimSize)
  		(195 bytecodePrimNext)
  		(196 bytecodePrimNextPut)
  		(197 bytecodePrimAtEnd)
+ 		(198 bytecodePrimIdentical)
- 		(198 bytecodePrimEquivalent)
  		(199 bytecodePrimClass)
  		(200 bytecodePrimSpecialSelector24)
  		(201 bytecodePrimValue)
  		(202 bytecodePrimValueWithArg)
  		(203 bytecodePrimDo)
  		(204 bytecodePrimNew)
  		(205 bytecodePrimNewWithArg)
  		(206 bytecodePrimPointX)
  		(207 bytecodePrimPointY)
  
  		(208 223 sendLiteralSelector0ArgsBytecode)
  		(224 239 sendLiteralSelector1ArgBytecode)
  		(240 255 sendLiteralSelector2ArgsBytecode)
  	)!

Item was removed:
- ----- Method: StackInterpreter>>bytecodePrimEquivalent (in category 'common selector sends') -----
- bytecodePrimEquivalent
- 	| rcvr arg |
- 	rcvr := self internalStackValue: 1.
- 	(objectMemory isOopForwarded: rcvr) ifTrue:
- 		[rcvr := self handleSpecialSelectorSendFaultFor: rcvr].
- 	arg := self internalStackValue: 0.
- 	(objectMemory isOopForwarded: arg) ifTrue:
- 		[arg := self handleSpecialSelectorSendFaultFor: arg].
- 	self booleanCheat: rcvr = arg!

Item was removed:
- ----- Method: StackInterpreter>>bytecodePrimEquivalentV4 (in category 'common selector sends') -----
- bytecodePrimEquivalentV4
- 	| rcvr arg |
- 	rcvr := self internalStackValue: 1.
- 	arg := self internalStackValue: 0.
- 	(objectMemory isOopForwarded: rcvr) ifTrue:
- 		[rcvr := self handleSpecialSelectorSendFaultFor: rcvr].
- 	(objectMemory isOopForwarded: arg) ifTrue:
- 		[arg := self handleSpecialSelectorSendFaultFor: arg].
- 	self booleanCheatV4: rcvr = arg!

Item was added:
+ ----- Method: StackInterpreter>>bytecodePrimIdentical (in category 'common selector sends') -----
+ bytecodePrimIdentical
+ 	| rcvr arg |
+ 	rcvr := self internalStackValue: 1.
+ 	(objectMemory isOopForwarded: rcvr) ifTrue:
+ 		[rcvr := self handleSpecialSelectorSendFaultFor: rcvr].
+ 	arg := self internalStackValue: 0.
+ 	(objectMemory isOopForwarded: arg) ifTrue:
+ 		[arg := self handleSpecialSelectorSendFaultFor: arg].
+ 	self booleanCheat: rcvr = arg!

Item was added:
+ ----- Method: StackInterpreter>>bytecodePrimIdenticalV4 (in category 'common selector sends') -----
+ bytecodePrimIdenticalV4
+ 	| rcvr arg |
+ 	rcvr := self internalStackValue: 1.
+ 	arg := self internalStackValue: 0.
+ 	(objectMemory isOopForwarded: rcvr) ifTrue:
+ 		[rcvr := self handleSpecialSelectorSendFaultFor: rcvr].
+ 	(objectMemory isOopForwarded: arg) ifTrue:
+ 		[arg := self handleSpecialSelectorSendFaultFor: arg].
+ 	self booleanCheatV4: rcvr = arg!

Item was removed:
- ----- Method: StackToRegisterMappingCogit>>genPrimitiveEquivalent (in category 'primitive generators') -----
- genPrimitiveEquivalent
- 	"Receiver and arg in registers.
- 	 Stack looks like
- 		return address"
- 	| jumpFalse |
- 	<var: #jumpFalse type: #'AbstractInstruction *'>
- 	self CmpR: Arg0Reg R: ReceiverResultReg.
- 	jumpFalse := self JumpNonZero: 0.
- 	self annotate: (self MoveCw: objectMemory trueObject R: ReceiverResultReg)
- 		objRef: objectMemory trueObject.
- 	self RetN: 0.
- 	jumpFalse jmpTarget: (self annotate: (self MoveCw: objectMemory falseObject R: ReceiverResultReg)
- 								objRef: objectMemory falseObject).
- 	self RetN: 0.
- 	^0!

Item was added:
+ ----- Method: StackToRegisterMappingCogit>>genPrimitiveIdentical (in category 'primitive generators') -----
+ genPrimitiveIdentical
+ 	"Receiver and arg in registers.
+ 	 Stack looks like
+ 		return address"
+ 	| jumpFalse |
+ 	<var: #jumpFalse type: #'AbstractInstruction *'>
+ 	self CmpR: Arg0Reg R: ReceiverResultReg.
+ 	jumpFalse := self JumpNonZero: 0.
+ 	self annotate: (self MoveCw: objectMemory trueObject R: ReceiverResultReg)
+ 		objRef: objectMemory trueObject.
+ 	self RetN: 0.
+ 	jumpFalse jmpTarget: (self annotate: (self MoveCw: objectMemory falseObject R: ReceiverResultReg)
+ 								objRef: objectMemory falseObject).
+ 	self RetN: 0.
+ 	^0!

Item was removed:
- ----- Method: StackToRegisterMappingCogit>>genPrimitiveNotEquivalent (in category 'primitive generators') -----
- genPrimitiveNotEquivalent
- 	"Receiver and arg in registers.
- 	 Stack looks like
- 		return address"
- 	| jumpFalse |
- 	<var: #jumpFalse type: #'AbstractInstruction *'>
- 	self CmpR: Arg0Reg R: ReceiverResultReg.
- 	jumpFalse := self JumpZero: 0.
- 	self annotate: (self MoveCw: objectMemory trueObject R: ReceiverResultReg)
- 		objRef: objectMemory trueObject.
- 	self RetN: 0.
- 	jumpFalse jmpTarget: (self annotate: (self MoveCw: objectMemory falseObject R: ReceiverResultReg)
- 								objRef: objectMemory falseObject).
- 	self RetN: 0.
- 	^0!

Item was added:
+ ----- Method: StackToRegisterMappingCogit>>genPrimitiveNotIdentical (in category 'primitive generators') -----
+ genPrimitiveNotIdentical
+ 	"Receiver and arg in registers.
+ 	 Stack looks like
+ 		return address"
+ 	| jumpFalse |
+ 	<var: #jumpFalse type: #'AbstractInstruction *'>
+ 	self CmpR: Arg0Reg R: ReceiverResultReg.
+ 	jumpFalse := self JumpZero: 0.
+ 	self annotate: (self MoveCw: objectMemory trueObject R: ReceiverResultReg)
+ 		objRef: objectMemory trueObject.
+ 	self RetN: 0.
+ 	jumpFalse jmpTarget: (self annotate: (self MoveCw: objectMemory falseObject R: ReceiverResultReg)
+ 								objRef: objectMemory falseObject).
+ 	self RetN: 0.
+ 	^0!



More information about the Vm-dev mailing list