approaching Spoon (was "No webserver started when starting
tapplek at gmail.com
Sat Jul 7 06:38:10 UTC 2007
On Fri, Jul 06, 2007 at 08:54:37PM -0700, Matthew Fulmer wrote:
> - I tried running
> (InterpreterSimulatorLSB new openOn: '..\memory.image') test
> - It failed with MessageNotUnderstood: Bitmap>>swapBytesFrom:to:
Well, I got this working. Which means I ran memory.image
simulated within another image, and I was able to connect to
http://localhost:8090/3 . Turns out it was just a few minor
incompatibilities between InterpreterSimulator and 3.9
refactorings such as SmalltalkImage current. Attached is the
change set that lets memory.image run as I set out to do.
I also reported this as http://bugs.squeak.org/view.php?id=6555
Now that that works, I just gotta figure out if I can trace the
running image at the Smalltalk level, or if I can only trace it
at the bytecode level.
Matthew Fulmer -- http://mtfulmer.wordpress.com/
Help improve Squeak Documentation: http://wiki.squeak.org/squeak/808
-------------- next part --------------
'From Squeak3.9 of 7 November 2006 [latest update: #7067] on 6 July 2007 at 11:20:56 pm'!
!InterpreterSimulator methodsFor: 'initialization' stamp: 'mtf 7/6/2007 22:26'!
reverseBytesFrom: begin to: end
"Byte-swap the given range of memory (not inclusive!!)."
| wordAddr |
wordAddr := begin.
Bitmap swapBytesIn: memory from: wordAddr // 4 + 1 to: end // 4! !
!InterpreterSimulator methodsFor: 'other primitives' stamp: 'mtf 7/6/2007 22:31'!
"Fetch the system attribute with the given integer ID. The result is a string, which will be empty if the attribute is not defined."
| attr s attribute |
attr := self stackIntegerValue: 0.
successFlag ifTrue: [
attribute := SmalltalkImage current getSystemAttribute: attr.
attribute ifNil: [ ^self primitiveFail ].
s := self instantiateClass: (self splObj: ClassString) indexableSize: attribute size.
1 to: attribute size do: [ :i |
self storeByte: i-1 ofObject: s withValue: (attribute at: i) asciiValue].
self pop: 2. "rcvr, attr"
self push: s].
More information about the Spoon