I am trying to run the InterpreterSimulatorLSB and I am getting an error.
In #addNewMethodToCache, this line of code is called: self cCoerce: primitiveFunctionPointer to: 'long'
where self is the IntepreterSimulatorLSB instance and primitiveFunctionPointer is #primitivePushFalse. This results in ByteSymbol (#primitivePushFalse) does not understand #coerceTo:sim:. It looks as if it is expecting an Integer or an Array as the value of primitiveFunctionPointer. Can anyone shed some light here?
Hi rob
You should post to the VM mailing list.
Adrian have post a patch for a 3.9 image Which image do you use?
Hi,
Since the simulator was broken for quite a while now, I thought I'd give it a try to fix it (it would be a pitty if this nice piece of work gets lost over time...). What I've got now works pretty well, except for some UI issues, mainly concerning output of text. For instance, most of the labels in the menus are not visible (see screenshot below). But apart from that, it seems to run just fine, and that's enough for what I need it.
In case anybody is interested in the changes, let me know where I should post them. There are VMM projects on squeaksource.com and on source.squeakfoundation.org, but both seem unused. I started working from the VMM image of Ian from http:// www.squeakvm.org/unix/release/ (version unix-3.9-10.*).
Cheers, Adrian
Adrian Lienhard www.adrian-lienhard.ch
Mth
On Oct 25, 2007, at 1:03 AM, Rob Withers wrote:
I am trying to run the InterpreterSimulatorLSB and I am getting an error.
In #addNewMethodToCache, this line of code is called: self cCoerce: primitiveFunctionPointer to: 'long'
where self is the IntepreterSimulatorLSB instance and primitiveFunctionPointer is #primitivePushFalse. This results in ByteSymbol (#primitivePushFalse) does not understand #coerceTo:sim:. It looks as if it is expecting an Integer or an Array as the value of primitiveFunctionPointer. Can anyone shed some light here?
----- Original Message ----- From: "Mathieu Suen" mathk.sue@gmail.com To: "The general-purpose Squeak developers list" squeak-dev@lists.squeakfoundation.org Sent: Wednesday, October 24, 2007 4:15 PM Subject: Re: ByteSymbol (#primitivePushFalse) does not understand#coerceTo:sim:
Hi rob
You should post to the VM mailing list.
You are right.
Adrian have post a patch for a 3.9 image Which image do you use?
I use the 3.10 beta image (7158)
Hi,
Since the simulator was broken for quite a while now, I thought I'd give it a try to fix it (it would be a pitty if this nice piece of work gets lost over time...). What I've got now works pretty well, except for some UI issues, mainly concerning output of text. For instance, most of the labels in the menus are not visible (see screenshot below). But apart from that, it seems to run just fine, and that's enough for what I need it.
In case anybody is interested in the changes, let me know where I should post them. There are VMM projects on squeaksource.com and on source.squeakfoundation.org, but both seem unused. I started working from the VMM image of Ian from http:// www.squeakvm.org/unix/release/ (version unix-3.9-10.*).
Cheers, Adrian
Adrian Lienhard www.adrian-lienhard.ch
Mth
On Oct 25, 2007, at 1:03 AM, Rob Withers wrote:
I am trying to run the InterpreterSimulatorLSB and I am getting an error.
In #addNewMethodToCache, this line of code is called: self cCoerce: primitiveFunctionPointer to: 'long'
where self is the IntepreterSimulatorLSB instance and primitiveFunctionPointer is #primitivePushFalse. This results in ByteSymbol (#primitivePushFalse) does not understand #coerceTo:sim:. It looks as if it is expecting an Integer or an Array as the value of primitiveFunctionPointer. Can anyone shed some light here?
is the interpreter running in 3.9/3.10? because we should sit together and you should show me.
Stef On 25 oct. 07, at 01:15, Mathieu Suen wrote:
Hi rob
You should post to the VM mailing list.
Adrian have post a patch for a 3.9 image Which image do you use?
Hi,
Since the simulator was broken for quite a while now, I thought I'd give it a try to fix it (it would be a pitty if this nice piece of work gets lost over time...). What I've got now works pretty well, except for some UI issues, mainly concerning output of text. For instance, most of the labels in the menus are not visible (see screenshot below). But apart from that, it seems to run just fine, and that's enough for what I need it.
In case anybody is interested in the changes, let me know where I should post them. There are VMM projects on squeaksource.com and on source.squeakfoundation.org, but both seem unused. I started working from the VMM image of Ian from http:// www.squeakvm.org/unix/release/ (version unix-3.9-10.*).
Cheers, Adrian
Adrian Lienhard www.adrian-lienhard.ch
Mth
On Oct 25, 2007, at 1:03 AM, Rob Withers wrote:
I am trying to run the InterpreterSimulatorLSB and I am getting an error.
In #addNewMethodToCache, this line of code is called: self cCoerce: primitiveFunctionPointer to: 'long'
where self is the IntepreterSimulatorLSB instance and primitiveFunctionPointer is #primitivePushFalse. This results in ByteSymbol (#primitivePushFalse) does not understand #coerceTo:sim:. It looks as if it is expecting an Integer or an Array as the value of primitiveFunctionPointer. Can anyone shed some light here?
For me the image was terribly slow so unusable. But theoretically it should work on 3.9/3.10
Mth
On Oct 25, 2007, at 11:20 AM, stephane ducasse wrote:
is the interpreter running in 3.9/3.10? because we should sit together and you should show me.
Stef On 25 oct. 07, at 01:15, Mathieu Suen wrote:
Hi rob
You should post to the VM mailing list.
Adrian have post a patch for a 3.9 image Which image do you use?
Hi,
Since the simulator was broken for quite a while now, I thought I'd give it a try to fix it (it would be a pitty if this nice piece of work gets lost over time...). What I've got now works pretty well, except for some UI issues, mainly concerning output of text. For instance, most of the labels in the menus are not visible (see screenshot below). But apart from that, it seems to run just fine, and that's enough for what I need it.
In case anybody is interested in the changes, let me know where I should post them. There are VMM projects on squeaksource.com and on source.squeakfoundation.org, but both seem unused. I started working from the VMM image of Ian from http:// www.squeakvm.org/unix/release/ (version unix-3.9-10.*).
Cheers, Adrian
Adrian Lienhard www.adrian-lienhard.ch
Mth
On Oct 25, 2007, at 1:03 AM, Rob Withers wrote:
I am trying to run the InterpreterSimulatorLSB and I am getting an error.
In #addNewMethodToCache, this line of code is called: self cCoerce: primitiveFunctionPointer to: 'long'
where self is the IntepreterSimulatorLSB instance and primitiveFunctionPointer is #primitivePushFalse. This results in ByteSymbol (#primitivePushFalse) does not understand #coerceTo:sim:. It looks as if it is expecting an Integer or an Array as the value of primitiveFunctionPointer. Can anyone shed some light here?
The version I made running is the 3.9-10 VMMaker image of Ian from http://www.squeakvm.org/unix/release/. I don't think the image version is the main problem, but rather changes in VMM that broke the simulation. In my version the GUI has some problems (as mentioned earlier on this list) but apart from that it seems to work. Of course, its terribly slow, but for debugging the interpreter this was not a problem in my case.
Adrian
On Oct 25, 2007, at 11:26 , Mathieu Suen wrote:
For me the image was terribly slow so unusable. But theoretically it should work on 3.9/3.10
Mth
On Oct 25, 2007, at 11:20 AM, stephane ducasse wrote:
is the interpreter running in 3.9/3.10? because we should sit together and you should show me.
Stef On 25 oct. 07, at 01:15, Mathieu Suen wrote:
Hi rob
You should post to the VM mailing list.
Adrian have post a patch for a 3.9 image Which image do you use?
Hi,
Since the simulator was broken for quite a while now, I thought I'd give it a try to fix it (it would be a pitty if this nice piece of work gets lost over time...). What I've got now works pretty well, except for some UI issues, mainly concerning output of text. For instance, most of the labels in the menus are not visible (see screenshot below). But apart from that, it seems to run just fine, and that's enough for what I need it.
In case anybody is interested in the changes, let me know where I should post them. There are VMM projects on squeaksource.com and on source.squeakfoundation.org, but both seem unused. I started working from the VMM image of Ian from http:// www.squeakvm.org/unix/release/ (version unix-3.9-10.*).
Cheers, Adrian
Adrian Lienhard www.adrian-lienhard.ch
Mth
On Oct 25, 2007, at 1:03 AM, Rob Withers wrote:
I am trying to run the InterpreterSimulatorLSB and I am getting an error.
In #addNewMethodToCache, this line of code is called: self cCoerce: primitiveFunctionPointer to: 'long'
where self is the IntepreterSimulatorLSB instance and primitiveFunctionPointer is #primitivePushFalse. This results in ByteSymbol (#primitivePushFalse) does not understand #coerceTo:sim:. It looks as if it is expecting an Integer or an Array as the value of primitiveFunctionPointer. Can anyone shed some light here?
Adrian,
I just tried both unix-3.9-10.image and unix-3.9-12.image and they both have the latest problem, not being able to read a file since the file pointer is nil. I don't know what you got to work, but I am interested to find out.
Cheers, Rob
----- Original Message ----- From: "Adrian Lienhard" adi@netstyle.ch To: "The general-purpose Squeak developers list" squeak-dev@lists.squeakfoundation.org Sent: Thursday, October 25, 2007 7:03 AM Subject: Re: ByteSymbol (#primitivePushFalse) does not understand#coerceTo:sim:
The version I made running is the 3.9-10 VMMaker image of Ian from http://www.squeakvm.org/unix/release/. I don't think the image version is the main problem, but rather changes in VMM that broke the simulation. In my version the GUI has some problems (as mentioned earlier on this list) but apart from that it seems to work. Of course, its terribly slow, but for debugging the interpreter this was not a problem in my case.
Adrian
On Oct 25, 2007, at 11:26 , Mathieu Suen wrote:
For me the image was terribly slow so unusable. But theoretically it should work on 3.9/3.10
Mth
On Oct 25, 2007, at 11:20 AM, stephane ducasse wrote:
is the interpreter running in 3.9/3.10? because we should sit together and you should show me.
Stef On 25 oct. 07, at 01:15, Mathieu Suen wrote:
Hi rob
You should post to the VM mailing list.
Adrian have post a patch for a 3.9 image Which image do you use?
Hi,
Since the simulator was broken for quite a while now, I thought I'd give it a try to fix it (it would be a pitty if this nice piece of work gets lost over time...). What I've got now works pretty well, except for some UI issues, mainly concerning output of text. For instance, most of the labels in the menus are not visible (see screenshot below). But apart from that, it seems to run just fine, and that's enough for what I need it.
In case anybody is interested in the changes, let me know where I should post them. There are VMM projects on squeaksource.com and on source.squeakfoundation.org, but both seem unused. I started working from the VMM image of Ian from http:// www.squeakvm.org/unix/release/ (version unix-3.9-10.*).
Cheers, Adrian
Adrian Lienhard www.adrian-lienhard.ch
Mth
On Oct 25, 2007, at 1:03 AM, Rob Withers wrote:
I am trying to run the InterpreterSimulatorLSB and I am getting an error.
In #addNewMethodToCache, this line of code is called: self cCoerce: primitiveFunctionPointer to: 'long'
where self is the IntepreterSimulatorLSB instance and primitiveFunctionPointer is #primitivePushFalse. This results in ByteSymbol (#primitivePushFalse) does not understand #coerceTo:sim:. It looks as if it is expecting an Integer or an Array as the value of primitiveFunctionPointer. Can anyone shed some light here?
On Oct 25, 2007, at 2:26 AM, Mathieu Suen wrote:
For me the image was terribly slow so unusable. But theoretically it should work on 3.9/3.10
Mth
Ah slow, and time... I was wondering if the following assumptions and logic still held true today and what the side effects are?
InterpreterSimulator>>>ioMSecs "Return the value of the millisecond clock." "NOT. Actually, we want something a lot slower and, for exact debugging, something more repeatable than real time. IO have an idea: use the byteCount..."
^ byteCount // 100 "At 20k bytecodes per second, this gives us aobut 200 ticks per second, or about 1/5 of what you'd expect for the real time clock. This should still service events at one or two per second"
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
I've changed 100 to 10000 in this method, but I haven't done any systematic tuning...
I'm sure, the simulator could be optimized. But is it important that it is fast? I mean, nobody is going to actually use Squeak like this. For me the only (but important) value is to use the debugger and change the implementation on the fly.
Adrian
On Oct 25, 2007, at 18:38 , John M McIntosh wrote:
On Oct 25, 2007, at 2:26 AM, Mathieu Suen wrote:
For me the image was terribly slow so unusable. But theoretically it should work on 3.9/3.10
Mth
Ah slow, and time... I was wondering if the following assumptions and logic still held true today and what the side effects are?
InterpreterSimulator>>>ioMSecs "Return the value of the millisecond clock." "NOT. Actually, we want something a lot slower and, for exact debugging, something more repeatable than real time. IO have an idea: use the byteCount..."
^ byteCount // 100
"At 20k bytecodes per second, this gives us aobut 200 ticks per second, or about 1/5 of what you'd expect for the real time clock. This should still service events at one or two per second"
--
===== John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http:// www.smalltalkconsulting.com ====================================================================== =====
well primitiveFunctionPointer := self functionPointerFor: primitiveIndex inClass: lkupClass. in C code returns a 'void *' the self cCoerce: primitiveFunctionPointer to: 'long' would make that a othervalue = (long)(void*) value
I note the InterpreterSimulator>>functionPointerFor: primIndex inClass: lookupClass "Override Interpreter to handle the external primitives caching. See also internalExecuteNewMethod."
^(primIndex between: 1 and: MaxPrimitiveIndex) ifTrue: [primitiveTable at: primIndex + 1]
which instead of an address being return we get a Symbol ByteSymbol (#primitivePushFalse)
I'd guess you need a #coerceTo:sim:. on Symbol to return self. This of course depends on what primitiveFunctionPointer is used for later.
On Oct 24, 2007, at 4:03 PM, Rob Withers wrote:
primitiveFunctionPointer
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
Ok, I see what you mean. I added #coerceTo:sim: to Symbol and I believe it works. #dispatchFunctionPointer: does a perform so a symbolk seems good to go.
And then I hit my next issue. In postGCAction, the gcSemaphoreIndex is nil, which blows up in signalSemaphoreWithIndex:. Trying to be a bit more self sufficient, I put a halt in primitiveSetGCSemaphore and reran it, but it never breaks, so it never seems to get set. Full stop.
cheers, Rob
----- Original Message ----- From: "John M McIntosh" johnmci@smalltalkconsulting.com To: "The general-purpose Squeak developers list" squeak-dev@lists.squeakfoundation.org Sent: Wednesday, October 24, 2007 4:22 PM Subject: Re: ByteSymbol (#primitivePushFalse) does not understand#coerceTo:sim:
well primitiveFunctionPointer := self functionPointerFor: primitiveIndex inClass: lkupClass.
in C code returns a 'void *' the self cCoerce: primitiveFunctionPointer to: 'long' would make that a othervalue = (long)(void*) value
I note the InterpreterSimulator>>functionPointerFor: primIndex inClass: lookupClass "Override Interpreter to handle the external primitives caching. See also internalExecuteNewMethod."
^(primIndex between: 1 and: MaxPrimitiveIndex) ifTrue: [primitiveTable at: primIndex + 1]
which instead of an address being return we get a Symbol ByteSymbol (#primitivePushFalse)
I'd guess you need a #coerceTo:sim:. on Symbol to return self. This of course depends on what primitiveFunctionPointer is used for later.
On Oct 24, 2007, at 4:03 PM, Rob Withers wrote:
primitiveFunctionPointer
--
=== John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
On Wed, Oct 24, 2007 at 04:03:16PM -0700, Rob Withers wrote:
I am trying to run the InterpreterSimulatorLSB and I am getting an error.
In #addNewMethodToCache, this line of code is called: self cCoerce: primitiveFunctionPointer to: 'long'
where self is the IntepreterSimulatorLSB instance and primitiveFunctionPointer is #primitivePushFalse. This results in ByteSymbol (#primitivePushFalse) does not understand #coerceTo:sim:. It looks as if it is expecting an Integer or an Array as the value of primitiveFunctionPointer. Can anyone shed some light here?
I fixed a few problems I found with #coerceTo:sim: in http://bugs.squeak.org/view.php?id=6555 . I don't know if it is the right solution, but it got me far enough that part of the image was displayed before freezing. I never got events working in the simulator, though.
Thanks, Matthew. I used your changeset to fix these problems, then I ran into a new problem. I get an error trying to access the sources file, where the file is nil. I documented it here: http://bugs.squeak.org/bug_view_page.php?bug_id=6740
Rob
----- Original Message ----- From: "Matthew Fulmer" tapplek@gmail.com To: squeak-dev@lists.squeakfoundation.org Sent: Saturday, October 27, 2007 11:06 AM Subject: Re: ByteSymbol (#primitivePushFalse) does not understand#coerceTo:sim:
On Wed, Oct 24, 2007 at 04:03:16PM -0700, Rob Withers wrote:
I am trying to run the InterpreterSimulatorLSB and I am getting an error.
In #addNewMethodToCache, this line of code is called: self cCoerce: primitiveFunctionPointer to: 'long'
where self is the IntepreterSimulatorLSB instance and primitiveFunctionPointer is #primitivePushFalse. This results in ByteSymbol (#primitivePushFalse) does not understand #coerceTo:sim:. It looks as if it is expecting an Integer or an Array as the value of primitiveFunctionPointer. Can anyone shed some light here?
I fixed a few problems I found with #coerceTo:sim: in http://bugs.squeak.org/view.php?id=6555 . I don't know if it is the right solution, but it got me far enough that part of the image was displayed before freezing. I never got events working in the simulator, though.
-- Matthew Fulmer -- http://mtfulmer.wordpress.com/ Help improve Squeak Documentation: http://wiki.squeak.org/squeak/808
squeak-dev@lists.squeakfoundation.org