[FIX] InterpreterSimulator fixes

Ned Konz ned at squeakland.org
Thu Jan 8 17:12:25 UTC 2004


On Thursday 08 January 2004 8:33 am, ducasse wrote:
> Hi all
>
> for the demo of Squeak I'm preparing I would like to show the VM can be
> interprted.

> Bitmap(Object)>>doesNotUnderstand: #copyGrownBy:

I ran into this a while ago, and came up with the attached.

Don't remember if this was enough, though.
-------------- next part --------------
'From Squeak3.6 of ''6 October 2003'' [latest update: #5424] on 8 January 2004 at 9:10:50 am'!
"Change Set:		SimFixes-nk
Date:			8 January 2004
Author:			Ned Konz

Some InterpreterSimulator fixes.
"!


!ArrayedCollection methodsFor: 'as yet unclassified' stamp: 'nk 10/13/2003 22:26'!
copyGrownBy: n
	"Create a new collection containing all the elements from aCollection."

	^ (self class new: self size + n) replaceFrom: 1 to: self size with: self! !


!Interpreter methodsFor: 'other primitives' stamp: 'nk 10/13/2003 22:39'!
primitiveGetAttribute
	"Fetch the system attribute with the given integer ID. The result is a string, which will be empty if the attribute is not defined."

	successFlag _ false.
! !


!InterpreterSimulatorLSB methodsFor: 'as yet unclassified' stamp: 'nk 10/13/2003 22:43'!
halfWordAt: byteAddress
    "Return the half-word at byteAddress which must be even."
	| lowBits |
	lowBits _ byteAddress bitAnd: 2.
	^((self longAt: byteAddress - lowBits)
		bitShift: (lowBits) * 8)
		bitAnd: 16rFFFF
! !



More information about the Squeak-dev mailing list