Re: [Pharo-project] FFI problem
I crated the issue so that no to forget about it: http://code.google.com/p/pharo/issues/detail?id=908 Best, Mariano On Sun, Jun 28, 2009 at 3:56 AM, Andreas Raab <andreas.raab@gmx.de> wrote:
Mariano Martinez Peck wrote:
Ok. Pharo people is in this mail. Let's wait if someone can help us.
Please cc vm-dev on any responses. I'm not subscribed to the Pharo list.
I don't know why in mi Windows machine the dump file is not generated :(
It looks like the crash has two different ways of showing. In the first situation, it crashes with a recursive DNU. In the second, it actually does generate a crash dump (attached). The latter seems to happen when you try to step through the code.
Benoit St-Jean can you attach the complete dump file?
I tried this in Linux and it doesn't crash my image. So, only windows :(
Difficult to say. There is a good possibility that the problem is unrelated to the FFI since I have been completely unable to reproduce the problem elsewhere.
Cheers, - Andreas
Andreas: can you see new comments here: http://code.google.com/p/pharo/issues/detail?id=908 What do you think? Thanks! Mariano On Tue, Jun 30, 2009 at 12:26 PM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
I crated the issue so that no to forget about it:
http://code.google.com/p/pharo/issues/detail?id=908
Best,
Mariano
On Sun, Jun 28, 2009 at 3:56 AM, Andreas Raab <andreas.raab@gmx.de> wrote:
Mariano Martinez Peck wrote:
Ok. Pharo people is in this mail. Let's wait if someone can help us.
Please cc vm-dev on any responses. I'm not subscribed to the Pharo list.
I don't know why in mi Windows machine the dump file is not generated :(
It looks like the crash has two different ways of showing. In the first situation, it crashes with a recursive DNU. In the second, it actually does generate a crash dump (attached). The latter seems to happen when you try to step through the code.
Benoit St-Jean can you attach the complete dump file?
I tried this in Linux and it doesn't crash my image. So, only windows :(
Difficult to say. There is a good possibility that the problem is unrelated to the FFI since I have been completely unable to reproduce the problem elsewhere.
Cheers, - Andreas
Ok we will check the loadFFI in scriptLoader. Stef
Andreas: can you see new comments here: http://code.google.com/p/pharo/issues/detail?id=908
What do you think?
Thanks!
Mariano
On Tue, Jun 30, 2009 at 12:26 PM, Mariano Martinez Peck <marianopeck@gmail.com
wrote: I crated the issue so that no to forget about it:
Reported by Benoit St-Jean in mailing list. To reproduce it: Download latest Windows VM (Squeak 3.11.2) from Pharo webpage. Then evaluate ScriptLoader loadFFI and try to run FFI tests. The image will crash! Tried in Linux and had no problem. There are crash2.dmp and crash.dmp attached. One from Andreas and another from Benoit St-Jean. Andreas Raab said: "Interesting. This appears to be a Pharo-only problem. I ran the FFI tests using the 3.11.2 VM on the current 3.10.2 release image and they works fine. I've also ran the test against a 3.10.2 closure converted image (on the off-chance that it might be closure related) and the tests pass too. So I don't really think it's an FFI problem. You'll probably have to ask Pharo people to help you with the problem; the FFI appears to be fully functional on both pre- and post-closure images." Comment 1 by amtw...@hotmail.com, Jul 04 (44 hours ago) I thought I would take a look at this, but ScriptLoader loadFFI doesn't work anymore. It would appear that this is because http://source.squeakfoundation.org/FFI no longer exists. Delete comment Comment 2 by marianopeck, Yesterday (35 hours ago) You can download it from source.squeak.org now Delete comment Comment 3 by amtw...@hotmail.com, Yesterday (32 hours ago) After loading from source.squeak.org and running the tests, I get inconsistent results. Sometimes the image crashes; sometimes I get 1 error and 1 failure. Further investigation shows that FFI-Kernel-ar. 9.mcz has lost its postscript definition and so 'Smalltalk recreateSpecialObjectsArray.' is not run when it is loaded/unloaded. To ensure that it runs correctly, evaluate "Smalltalk recreateSpecialObjectsArray." after loading . Delete comment Comment 4 by marianopeck, Today (14 hours ago) Andrew: I don't know what "Smalltalk recreateSpecialObjectsArray." is, but I evaluated that after loadFFI and tests worked perfect! What we can change is the ScriptLoader>>loadFFI so that it does "Smalltalk recreateSpecialObjectsArray." after installing FFI. What do you think?
Mariano I just published in Pharo a new ScriptLoader which I hope fix the problem. Could you check it? Stef On Jul 5, 2009, at 9:05 PM, Mariano Martinez Peck wrote:
Andreas: can you see new comments here: http://code.google.com/p/pharo/issues/detail?id=908
What do you think?
Thanks!
Mariano
On Tue, Jun 30, 2009 at 12:26 PM, Mariano Martinez Peck <marianopeck@gmail.com
wrote: I crated the issue so that no to forget about it:
http://code.google.com/p/pharo/issues/detail?id=908
Best,
Mariano
On Sun, Jun 28, 2009 at 3:56 AM, Andreas Raab <andreas.raab@gmx.de> wrote: Mariano Martinez Peck wrote: Ok. Pharo people is in this mail. Let's wait if someone can help us.
Please cc vm-dev on any responses. I'm not subscribed to the Pharo list.
I don't know why in mi Windows machine the dump file is not generated :(
It looks like the crash has two different ways of showing. In the first situation, it crashes with a recursive DNU. In the second, it actually does generate a crash dump (attached). The latter seems to happen when you try to step through the code.
Benoit St-Jean can you attach the complete dump file?
I tried this in Linux and it doesn't crash my image. So, only windows :(
Difficult to say. There is a good possibility that the problem is unrelated to the FFI since I have been completely unable to reproduce the problem elsewhere.
Cheers, - Andreas
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Stef: Yes, it works. But, I have some questions: 1) Is it ok to have self new installer monticello http: 'source.squeakfoundation.org'; ??? or it is just temp ? In addition, why was #squeakfundation removed ? this is because now all is here: source.squeakfoundation.org??? If so, we can create a method for this new repository... 2) I don't know what Smalltalk recreateSpecialObjectsArray. But older version of FFI worked ok and also this version works ok in Linux...I don't understand why. Is there a logic here I cannot see ? Is there a drawback in evaluating Smalltalk recreateSpecialObjectsArray. ? Cheers, Mariano On Tue, Jul 7, 2009 at 8:01 PM, Stéphane Ducasse <stephane.ducasse@inria.fr>wrote:
Mariano
I just published in Pharo a new ScriptLoader which I hope fix the problem. Could you check it?
Stef
On Jul 5, 2009, at 9:05 PM, Mariano Martinez Peck wrote:
Andreas: can you see new comments here: http://code.google.com/p/pharo/issues/detail?id=908
What do you think?
Thanks!
Mariano
On Tue, Jun 30, 2009 at 12:26 PM, Mariano Martinez Peck < marianopeck@gmail.com
wrote: I crated the issue so that no to forget about it:
http://code.google.com/p/pharo/issues/detail?id=908
Best,
Mariano
On Sun, Jun 28, 2009 at 3:56 AM, Andreas Raab <andreas.raab@gmx.de> wrote: Mariano Martinez Peck wrote: Ok. Pharo people is in this mail. Let's wait if someone can help us.
Please cc vm-dev on any responses. I'm not subscribed to the Pharo list.
I don't know why in mi Windows machine the dump file is not generated :(
It looks like the crash has two different ways of showing. In the first situation, it crashes with a recursive DNU. In the second, it actually does generate a crash dump (attached). The latter seems to happen when you try to step through the code.
Benoit St-Jean can you attach the complete dump file?
I tried this in Linux and it doesn't crash my image. So, only windows :(
Difficult to say. There is a good possibility that the problem is unrelated to the FFI since I have been completely unable to reproduce the problem elsewhere.
Cheers, - Andreas
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On Jul 7, 2009, at 11:20 PM, Mariano Martinez Peck wrote:
Stef: Yes, it works. But, I have some questions:
1) Is it ok to have
self new installer monticello http: 'source.squeakfoundation.org'; ???
or it is just temp ? In addition, why was #squeakfundation removed ? this is because now all is here: source.squeakfoundation.org??? If so, we can create a method for this new repository...
It is temporary. First I would say that FFI should have a loader doing the initialization properly. Second we will probably have a new loader in the near future.
2) I don't know what Smalltalk recreateSpecialObjectsArray.
specialObjectsArray is an array known by the VM
But older version of FFI worked ok and also this version works ok in Linux...I don't understand why.
I do not know :)
Is there a logic here I cannot see ? Is there a drawback in evaluating Smalltalk recreateSpecialObjectsArray. ?
Cheers,
Mariano
On Tue, Jul 7, 2009 at 8:01 PM, Stéphane Ducasse <stephane.ducasse@inria.fr
wrote: Mariano
I just published in Pharo a new ScriptLoader which I hope fix the problem. Could you check it?
Stef
On Jul 5, 2009, at 9:05 PM, Mariano Martinez Peck wrote:
Andreas: can you see new comments here: http://code.google.com/p/pharo/issues/detail?id=908
What do you think?
Thanks!
Mariano
On Tue, Jun 30, 2009 at 12:26 PM, Mariano Martinez Peck <marianopeck@gmail.com
wrote: I crated the issue so that no to forget about it:
http://code.google.com/p/pharo/issues/detail?id=908
Best,
Mariano
On Sun, Jun 28, 2009 at 3:56 AM, Andreas Raab <andreas.raab@gmx.de> wrote: Mariano Martinez Peck wrote: Ok. Pharo people is in this mail. Let's wait if someone can help us.
Please cc vm-dev on any responses. I'm not subscribed to the Pharo list.
I don't know why in mi Windows machine the dump file is not generated :(
It looks like the crash has two different ways of showing. In the first situation, it crashes with a recursive DNU. In the second, it actually does generate a crash dump (attached). The latter seems to happen when you try to step through the code.
Benoit St-Jean can you attach the complete dump file?
I tried this in Linux and it doesn't crash my image. So, only windows :(
Difficult to say. There is a good possibility that the problem is unrelated to the FFI since I have been completely unable to reproduce the problem elsewhere.
Cheers, - Andreas
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Ok, now you can close http://code.google.com/p/pharo/issues/detail?id=908 in 10372 On Tue, Jul 7, 2009 at 6:26 PM, Stéphane Ducasse <stephane.ducasse@inria.fr>wrote:
On Jul 7, 2009, at 11:20 PM, Mariano Martinez Peck wrote:
Stef: Yes, it works. But, I have some questions:
1) Is it ok to have
self new installer monticello http: 'source.squeakfoundation.org'; ???
or it is just temp ? In addition, why was #squeakfundation removed ? this is because now all is here: source.squeakfoundation.org??? If so, we can create a method for this new repository...
It is temporary. First I would say that FFI should have a loader doing the initialization properly.
Second we will probably have a new loader in the near future.
2) I don't know what Smalltalk recreateSpecialObjectsArray.
specialObjectsArray is an array known by the VM
But older version of FFI worked ok and also this version works ok in Linux...I don't understand why.
I do not know :)
Is there a logic here I cannot see ? Is there a drawback in evaluating Smalltalk recreateSpecialObjectsArray. ?
Cheers,
Mariano
On Tue, Jul 7, 2009 at 8:01 PM, Stéphane Ducasse < stephane.ducasse@inria.fr
wrote: Mariano
I just published in Pharo a new ScriptLoader which I hope fix the problem. Could you check it?
Stef
On Jul 5, 2009, at 9:05 PM, Mariano Martinez Peck wrote:
Andreas: can you see new comments here: http://code.google.com/p/pharo/issues/detail?id=908
What do you think?
Thanks!
Mariano
On Tue, Jun 30, 2009 at 12:26 PM, Mariano Martinez Peck < marianopeck@gmail.com
wrote: I crated the issue so that no to forget about it:
http://code.google.com/p/pharo/issues/detail?id=908
Best,
Mariano
On Sun, Jun 28, 2009 at 3:56 AM, Andreas Raab <andreas.raab@gmx.de> wrote: Mariano Martinez Peck wrote: Ok. Pharo people is in this mail. Let's wait if someone can help us.
Please cc vm-dev on any responses. I'm not subscribed to the Pharo list.
I don't know why in mi Windows machine the dump file is not generated :(
It looks like the crash has two different ways of showing. In the first situation, it crashes with a recursive DNU. In the second, it actually does generate a crash dump (attached). The latter seems to happen when you try to step through the code.
Benoit St-Jean can you attach the complete dump file?
I tried this in Linux and it doesn't crash my image. So, only windows :(
Difficult to say. There is a good possibility that the problem is unrelated to the FFI since I have been completely unable to reproduce the problem elsewhere.
Cheers, - Andreas
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Retested the FFI stuff.. All tests are green and my ODBC stuff works again! Thanks to all! Un gros merci à tous! ----------------- Benoit St-Jean Yahoo! Messenger: bstjean Blog: lamneth.wordpress.com A standpoint is an intellectual horizon of radius zero. (Albert Einstein) ________________________________ From: Mariano Martinez Peck <marianopeck@gmail.com> To: Pharo-project@lists.gforge.inria.fr Sent: Tuesday, July 7, 2009 6:52:22 PM Subject: Re: [Pharo-project] FFI problem Ok, now you can close http://code.google.com/p/pharo/issues/detail?id=908 in 10372 On Tue, Jul 7, 2009 at 6:26 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
On Jul 7, 2009, at 11:20 PM, Mariano Martinez Peck wrote:
Stef: Yes, it works. But, I have some questions:
1) Is it ok to have
self new installer monticello http: 'source.squeakfoundation.org'; ???
or it is just temp ? In addition, why was #squeakfundation removed ? this is because now all is here: source.squeakfoundation.org??? If so, we can create a method for this new repository...
It is temporary.
First I would say that FFI should have a loader doing the initialization properly.
Second we will probably have a new loader in the near future.
2) I don't know what Smalltalk recreateSpecialObjectsArray.
specialObjectsArray is an array known by the VM
But older version of FFI worked ok and also this version works ok in Linux...I don't understand why.
I do not know :)
Is there a logic here I cannot see ? Is there a drawback in evaluating Smalltalk recreateSpecialObjectsArray. ?
Cheers,
Mariano
On Tue, Jul 7, 2009 at 8:01 PM, Stéphane Ducasse <stephane.ducasse@inria.fr
wrote: Mariano
I just published in Pharo a new ScriptLoader which I hope fix the problem. Could you check it?
Stef
On Jul 5, 2009, at 9:05 PM, Mariano Martinez Peck wrote:
Andreas: can you see new comments here: http://code.google.com/p/pharo/issues/detail?id=908
What do you think?
Thanks!
Mariano
On Tue, Jun 30, 2009 at 12:26 PM, Mariano Martinez Peck <marianopeck@gmail.com
wrote: I crated the issue so that no to forget about it:
http://code.google.com/p/pharo/issues/detail?id=908
Best,
Mariano
On Sun, Jun 28, 2009 at 3:56 AM, Andreas Raab <andreas.raab@gmx.de> wrote: Mariano Martinez Peck wrote: Ok. Pharo people is in this mail. Let's wait if someone can help us.
Please cc vm-dev on any responses. I'm not subscribed to the Pharo list.
I don't know why in mi Windows machine the dump file is not generated :(
It looks like the crash has two different ways of showing. In the first situation, it crashes with a recursive DNU. In the second, it actually does generate a crash dump (attached). The latter seems to happen when you try to step through the code.
Benoit St-Jean can you attach the complete dump file?
I tried this in Linux and it doesn't crash my image. So, only windows :(
Difficult to say. There is a good possibility that the problem is unrelated to the FFI since I have been completely unable to reproduce the problem elsewhere.
Cheers, - Andreas
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
__________________________________________________________________ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now http://ca.toolbar.yahoo.com.
Having made some bozo statements lately, I am hesitant to even inquire (because I am probably doing something dumb), but... I noted an error in my code that read xxx isNumber ifNil: [...] and figured that when I imported in from VisualWorks, I must have "fixed" things too hastily. Wondering where else I may have made this error I did the following on an iMac using the 10371web image recently posted: In a workspace I typed and highlighted "ifNil:" --without the quotes of course-- and selected "extended search...". Then I selected "senders of it (n)", and to my surprise, not my erroneous method was not displayed in the results. Ten (10) methods turn up in the results, and some of them are not actually senders of it; the non-senders may include the pattern in an array, or as a substring of some symbol. Is this a known defect? Previously (from images two months ago and less) this searching worked as expected. A search of the defect db, using only the word "senders", gave me this (semi-related) issue: http://code.google.com/p/pharo/issues/detail?id=261&q=senders&colspec=ID%20T... Thanks in advance, Cam
On Tue, Jul 7, 2009 at 6:32 PM, Cameron Sanders <camsanders01@roadrunner.com
wrote:
Having made some bozo statements lately, I am hesitant to even inquire (because I am probably doing something dumb), but...
I noted an error in my code that read xxx isNumber ifNil: [...] and figured that when I imported in from VisualWorks, I must have "fixed" things too hastily. Wondering where else I may have made this error I did the following on an iMac using the 10371web image recently posted:
In a workspace I typed and highlighted "ifNil:" --without the quotes of course-- and selected "extended search...". Then I selected "senders of it (n)", and to my surprise, not my erroneous method was not displayed in the results. Ten (10) methods turn up in the results, and some of them are not actually senders of it; the non-senders may include the pattern in an array, or as a substring of some symbol.
can you give us a concrete example? In my opinion, if you have a symbol with that text, it must be found by "senders of it". In VAST it is like that. So, if you have #ifNil: for me it is correct to be found. best, Mariano
Is this a known defect? Previously (from images two months ago and less) this searching worked as expected.
A search of the defect db, using only the word "senders", gave me this (semi-related) issue:
Thanks in advance, Cam
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On Jul 7, 2009, at 7:39 PM, Mariano Martinez Peck wrote (below my original text): can you give us a concrete example?
In my opinion, if you have a symbol with that text, it must be found by "senders of it". In VAST it is like that. So, if you have #ifNil: for me it is correct to be found.
best,
Mariano
What you say makes sense for performance reasons. I just picked through those 10 methods more carefully, and they each contain the symbol #ifNil:, so the one error I thought I was seeing (of a match for a pattern of xxxIfNil:) is not what is causing them to be found. So, I'm glad you asked, as that forced me to recheck that aspect. Should it be called "search->methods referencing symbol (n)" or something -- I don't care about pesky details like that. What matters to me is the failure to find my references/sends: My broken method (FaTableAccessor>>columnAt:) is just one of *many* places I have used #ifNil:, and is NOT being found. The search is only finding 10 methods in the entire system (in the classes Decompiler, MessageNode, MethodFinder, OCompletionTable, PSUIManager, RBMessageNode, RBProgramNode) that reference the symbol #ifNil:. Previously, this feature has worked for me as expected (to the best of my knowledge). But I can't guarantee that I have ever searched for #ifNil:. I just searched for collect:, and that turned up a more reasonable 1092 methods, some of which are mine. I am surprised there are not more uses of it, but at least it is a more credible number than "10". So maybe it is just something weird for the symbol ifNil:, which I can live with; that would make this a low priority issue, assuming it is working for most other symbols pretty well. Recap: I am selecting "ifNil:" (without the quotes) in a workspace, and using "extended search"->"senders of it (n)"; this is failing to find methods of mine that include the symbol (as a selector). Happy Hunting, Cam
On Tue, Jul 7, 2009 at 6:32 PM, Cameron Sanders <camsanders01@roadrunner.com
wrote: Having made some bozo statements lately, I am hesitant to even inquire (because I am probably doing something dumb), but...
I noted an error in my code that read xxx isNumber ifNil: [...] and figured that when I imported in from VisualWorks, I must have "fixed" things too hastily. Wondering where else I may have made this error I did the following on an iMac using the 10371web image recently posted:
In a workspace I typed and highlighted "ifNil:" --without the quotes of course-- and selected "extended search...". Then I selected "senders of it (n)", and to my surprise, not my erroneous method was not displayed in the results. Ten (10) methods turn up in the results, and some of them are not actually senders of it; the non-senders may include the pattern in an array, or as a substring of some symbol.
Is this a known defect? Previously (from images two months ago and less) this searching worked as expected.
A search of the defect db, using only the word "senders", gave me this (semi-related) issue: http://code.google.com/p/pharo/issues/detail?id=261&q=sendeifNilrs&colspec=I...
Thanks in advance, Cam
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
2009/7/7 Cameron Sanders <camsanders01@roadrunner.com>
On Jul 7, 2009, at 7:39 PM, Mariano Martinez Peck wrote (below my original text):
can you give us a concrete example?
In my opinion, if you have a symbol with that text, it must be found by "senders of it". In VAST it is like that. So, if you have #ifNil: for me it is correct to be found.
best,
Mariano
What you say makes sense for performance reasons. I just picked through those 10 methods more carefully, and they each contain the symbol #ifNil:, so the one error I thought I was seeing (of a match for a pattern of xxxIfNil:) is not what is causing them to be found. So, I'm glad you asked, as that forced me to recheck that aspect. Should it be called "search->methods referencing symbol (n)" or something -- I don't care about pesky details like that.
You are welcome.
What matters to me is the failure to find my references/sends:
My broken method (FaTableAccessor>>columnAt:) is just one of *many* places I have used #ifNil:, and is NOT being found.
The search is only finding 10 methods in the entire system (in the classes Decompiler, MessageNode, MethodFinder, OCompletionTable, PSUIManager, RBMessageNode, RBProgramNode) that reference the symbol #ifNil:.
Previously, this feature has worked for me as expected (to the best of my knowledge). But I can't guarantee that I have ever searched for #ifNil:.
I just searched for collect:, and that turned up a more reasonable 1092 methods, some of which are mine. I am surprised there are not more uses of it, but at least it is a more credible number than "10". So maybe it is just something weird for the symbol ifNil:, which I can live with; that would make this a low priority issue, assuming it is working for most other symbols pretty well.
Perhaps a lot of people does isNil ifTrue: instead of ifNil: hahaha
Recap: I am selecting "ifNil:" (without the quotes) in a workspace, and using "extended search"->"senders of it (n)"; this is failing to find methods of mine that include the symbol (as a selector).
Can you give me an example of your code that containg ifNil: and that's is not being found ? just to test it here. cheers, Mariano
Happy Hunting, Cam
On Tue, Jul 7, 2009 at 6:32 PM, Cameron Sanders < camsanders01@roadrunner.com> wrote:
Having made some bozo statements lately, I am hesitant to even inquire (because I am probably doing something dumb), but...
I noted an error in my code that read xxx isNumber ifNil: [...] and figured that when I imported in from VisualWorks, I must have "fixed" things too hastily. Wondering where else I may have made this error I did the following on an iMac using the 10371web image recently posted:
In a workspace I typed and highlighted "ifNil:" --without the quotes of course-- and selected "extended search...". Then I selected "senders of it (n)", and to my surprise, not my erroneous method was not displayed in the results. Ten (10) methods turn up in the results, and some of them are not actually senders of it; the non-senders may include the pattern in an array, or as a substring of some symbol.
Is this a known defect? Previously (from images two months ago and less) this searching worked as expected.
A search of the defect db, using only the word "senders", gave me this (semi-related) issue:
Thanks in advance, Cam
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
The reason that ifNil: is not found is that it is inlined. If you view the bytecode representation of an ifNil: send, you see that this message is never sent. The search looks for symbols in the literal frame of compiled methods and hence does not find this special case. Cheers, Adrian On Jul 8, 2009, at 05:52 , Mariano Martinez Peck wrote:
2009/7/7 Cameron Sanders <camsanders01@roadrunner.com>
On Jul 7, 2009, at 7:39 PM, Mariano Martinez Peck wrote (below my original text):
can you give us a concrete example?
In my opinion, if you have a symbol with that text, it must be found by "senders of it". In VAST it is like that. So, if you have #ifNil: for me it is correct to be found.
best,
Mariano
What you say makes sense for performance reasons. I just picked through those 10 methods more carefully, and they each contain the symbol #ifNil:, so the one error I thought I was seeing (of a match for a pattern of xxxIfNil:) is not what is causing them to be found. So, I'm glad you asked, as that forced me to recheck that aspect. Should it be called "search->methods referencing symbol (n)" or something -- I don't care about pesky details like that.
You are welcome.
What matters to me is the failure to find my references/sends:
My broken method (FaTableAccessor>>columnAt:) is just one of *many* places I have used #ifNil:, and is NOT being found.
The search is only finding 10 methods in the entire system (in the classes Decompiler, MessageNode, MethodFinder, OCompletionTable, PSUIManager, RBMessageNode, RBProgramNode) that reference the symbol #ifNil:.
Previously, this feature has worked for me as expected (to the best of my knowledge). But I can't guarantee that I have ever searched for #ifNil:.
I just searched for collect:, and that turned up a more reasonable 1092 methods, some of which are mine. I am surprised there are not more uses of it, but at least it is a more credible number than "10". So maybe it is just something weird for the symbol ifNil:, which I can live with; that would make this a low priority issue, assuming it is working for most other symbols pretty well.
Perhaps a lot of people does isNil ifTrue: instead of ifNil: hahaha
Recap: I am selecting "ifNil:" (without the quotes) in a workspace, and using "extended search"->"senders of it (n)"; this is failing to find methods of mine that include the symbol (as a selector).
Can you give me an example of your code that containg ifNil: and that's is not being found ? just to test it here.
cheers,
Mariano
Happy Hunting, Cam
On Tue, Jul 7, 2009 at 6:32 PM, Cameron Sanders < camsanders01@roadrunner.com> wrote:
Having made some bozo statements lately, I am hesitant to even inquire (because I am probably doing something dumb), but...
I noted an error in my code that read xxx isNumber ifNil: [...] and figured that when I imported in from VisualWorks, I must have "fixed" things too hastily. Wondering where else I may have made this error I did the following on an iMac using the 10371web image recently posted:
In a workspace I typed and highlighted "ifNil:" --without the quotes of course-- and selected "extended search...". Then I selected "senders of it (n)", and to my surprise, not my erroneous method was not displayed in the results. Ten (10) methods turn up in the results, and some of them are not actually senders of it; the non-senders may include the pattern in an array, or as a substring of some symbol.
Is this a known defect? Previously (from images two months ago and less) this searching worked as expected.
A search of the defect db, using only the word "senders", gave me this (semi-related) issue:
http://code.google.com/p/pharo/issues/detail?id=261&q=sendeifNilrs&colspec=I... <http://code.google.com/p/pharo/issues/detail?id=261&q=senders&colspec=ID%20T...
Thanks in advance, Cam
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Thank you, that is informative! So, if a guy, a semi-newbie at that, were to want to write his own search method to look for particular byte-code patterns (suggestive of an inlined ifNil:) ... what would be some useful examples or a good place to start learning? MethodFinder, or is there a better example? And, on a related note, if I more generally wanted to write a module to eject/translate-to Objective-C instead of C, where would be a good place to get started on that learning curve? (Are the classes that *once* ejected C code for the VM still functional? Are they in Pharo?) Thanks in advance, Cam On Jul 8, 2009, at 1:43 AM, Adrian Lienhard wrote:
The reason that ifNil: is not found is that it is inlined. If you view the bytecode representation of an ifNil: send, you see that this message is never sent. The search looks for symbols in the literal frame of compiled methods and hence does not find this special case.
Cheers, Adrian
1) What classes should I look at to learn about the byte-code generation? 2) What are good examples of code that handles/manipulates/processes the byte-code? e.g. like the code used for searching for symbol references in the byte-code, what is that called? (Is that MethodFinder stuff?) 2.b) And what is the name (& path) of the C module that actually implements the VM case statement (or whatever dispatch is used)? 3. Once upon a time there was some code that processed Slang ... but I have no idea whether that code is in Pharo, or completely antiquated in all versions. (And if gone from Pharo, what should I look for and in which version of Squeak?) A list of a few classes (in current use) would be greatly appreciated. Thanks in advance, Cam PS: reading through list archives can be painful, as they often either build on known information, or if you back up too far, the material - you later learn- is completely antiquated.
2009/7/8 Cameron Sanders <camsanders01@roadrunner.com>:
1) What classes should I look at to learn about the byte-code generation?
I think you'd better look at NewCompiler. Don't look at compiler implementation in its current state :)
2) What are good examples of code that handles/manipulates/processes the byte-code? e.g. like the code used for searching for symbol references in the byte-code, what is that called? (Is that MethodFinder stuff?)
There is InstructionStream, and of course see CompiledMethod itself.
    2.b) And what is the name (& path) of the C module that actually implements the VM case statement (or whatever dispatch is used)?
VMMaker is _smalltalk_ package which implements such dispatch, and then translated to C & compiled to get a VM binary. Look for VMMaker package at squeaksource.com
3. Once upon a time there was some code that processed Slang ... but I have no idea whether that code is in Pharo, or completely antiquated in all versions. (And if gone from Pharo, what should I look for and in which version of Squeak?)
A list of a few classes (in current use) would be greatly appreciated.
VMMaker: Interpreter, ObjectMemory Image: Compiler/Parser (but better look a NewCompiler) InstructionStream, ContextPart, CompiledMethod
Thanks in advance, Cam PS: reading through list archives can be painful, as they often either build on known information, or if you back up too far, the material - you later learn- is completely antiquated.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
Awesome, thanks for the leads! -Cam On Jul 8, 2009, at 3:43 PM, Igor Stasenko wrote: ...
VMMaker is _smalltalk_ package which implements such dispatch, and then translated to C & compiled to get a VM binary. Look for VMMaker package at squeaksource.com ...
On Wed, Jul 08, 2009 at 04:44:16PM -0400, Cameron Sanders wrote:
On Jul 8, 2009, at 3:43 PM, Igor Stasenko wrote: ...
VMMaker is _smalltalk_ package which implements such dispatch, and then translated to C & compiled to get a VM binary. Look for VMMaker package at squeaksource.com ...
Awesome, thanks for the leads!
-Cam
The VMMaker package is really a fundamental part of the original Squeak, but is now split out and maintained as a separate package. For background, read the "Back to the Future" paper as well as some of Tim Rowledge's writings (Stef's "free books" web site should have most of this, also search the Squeak swiki). You were mentioning Slang translation in your question - this is sort of a "late optimization" in which the interpreter, which is written in Smalltalk and which can be run in Smalltalk, is translated to C and linked to external support code for performance. But the VM itself, including the bytecode interpreter, is written in Smalltalk, and you can run it in Smalltalk (using InterpreterSimulator), and use the debugger to look at the actual bytecode interpretation as it happens. Dave
BTW we should make sure that it is easy to load VMMaker the last time I got a problem with Genie plugin. stef On Jul 8, 2009, at 9:43 PM, Igor Stasenko wrote:
2009/7/8 Cameron Sanders <camsanders01@roadrunner.com>:
1) What classes should I look at to learn about the byte-code generation?
I think you'd better look at NewCompiler. Don't look at compiler implementation in its current state :)
2) What are good examples of code that handles/manipulates/processes the byte-code? e.g. like the code used for searching for symbol references in the byte-code, what is that called? (Is that MethodFinder stuff?)
There is InstructionStream, and of course see CompiledMethod itself.
2.b) And what is the name (& path) of the C module that actually implements the VM case statement (or whatever dispatch is used)?
VMMaker is _smalltalk_ package which implements such dispatch, and then translated to C & compiled to get a VM binary. Look for VMMaker package at squeaksource.com
3. Once upon a time there was some code that processed Slang ... but I have no idea whether that code is in Pharo, or completely antiquated in all versions. (And if gone from Pharo, what should I look for and in which version of Squeak?)
A list of a few classes (in current use) would be greatly appreciated.
VMMaker: Interpreter, ObjectMemory Image: Compiler/Parser (but better look a NewCompiler) InstructionStream, ContextPart, CompiledMethod
Thanks in advance, Cam PS: reading through list archives can be painful, as they often either build on known information, or if you back up too far, the material - you later learn- is completely antiquated.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On 08.07.2009, at 20:45, Cameron Sanders wrote:
1) What classes should I look at to learn about the byte-code generation?
These slides give an introduction: http://marcusdenker.de/talks/07SCGSmalltalk/11Bytecode.pdf
2) What are good examples of code that handles/manipulates/processes the byte-code?
There are multiple parts of the system dealing with bytecode: 1) VM. This is SLANG, compiled to C, compiled to a Binary. 2) Compiler. Generates Bytecode. Here the old one is very strange (to me at least). Anthony's newcompiler is much easier to understand, This has a backend called "IR Builder" that can be used to generate bytecode easily. (Or to modify code on the level of bytecode abstraction, see http://scg.unibe.ch/research/bytesurgeon ) 3) Debugger / Simulator. This is in class ContextPart. A bytecode interpreter written in Smalltalk that the Debugger uses for stepping.
e.g. like the code used for searching for symbol references in the byte-code, what is that called? (Is that MethodFinder stuff?)
No. Check SystemNavigation, method #allCallsOn: Marcus -- Marcus Denker - http://marcusdenker.de PLEIAD Lab - Computer Science Department (DCC) - University of Chile
Hi Cameron, 2009/7/8 Cameron Sanders <camsanders01@roadrunner.com>
2.b) And what is the name (& path) of the C module that actually implements the VM case statement (or whatever dispatch is used)?
I think the switch you're asking for is in the files interp.c and/or gnu-interp.c, in the function interpret(void). Cheers, Hernán
participants (9)
-
Adrian Lienhard -
Benoit St-Jean -
Cameron Sanders -
David T. Lewis -
Hernán Morales Durand -
Igor Stasenko -
Marcus Denker -
Mariano Martinez Peck -
Stéphane Ducasse