On Fri, Dec 3, 2010 at 11:12 PM, Levente Uzonyi <[hidden email]> wrote:
Thanks Levente. I did more or less the same. In addition, I did some modifications to the VM to mark objects usage, in order to be able to automatically swap out "unused objects". All these changes, I did it in normal SqueakVM, and this is why I am using such VM. I was just checking Cog and seems it supports much more these problems. For example, what I said in the first mail of this thread: when Interpreter does the #markAndTraceInterpreterOops: and tries to do self markAndTrace: newMethod. That, in SqueakVM crash (as explained in my first email). However, in Cog, it does: | header lastFieldOffset action | self assert: (self addressCouldBeObjWhileForwarding: oop). header := self longAt: oop. notice that assert. So...I guess Cog is more prepare to supports non-objects for methods. Eliot, can you confirm that? I couldn't even compile Cog but now JB gave me some hints....so maybe I will try to give it a shoot and see what happens. Thanks Levente. Mariano I didn't test it with SqueakVM, but it definitely works with CogVM. |
In reply to this post by Eliot Miranda-2
On Sat, Dec 4, 2010 at 1:18 AM, Eliot Miranda <[hidden email]> wrote:
Eliot, I saw these changes, but I wonder if there would be more. I said at the beginning of this thread...for example, the Interpreter has an instVar called "newMethod". If at a certain moment tht instVar has a SmallInteger, do you handle the check in all possible uses of newMethod? (ok, you did it in markAndTrace hehe) Because the methodLookUp, methodExecution, etc, are easy to think and detect. But with the markAndTrace it ONLY happened to me when trying to swap out 60000 methods and then, the probability to have a SmallInteger in newMethod was big. Otherwise, I wouldn't notice the bug hahha
Exactly. And since reserch is about future ;) I was thinking that tomorrow, we could have 64 bits, with more than 1 object encoded in the address: small floats, characters, points...whatever. And why not a Proxy class (subclass of ProtoObject) where you can implement your own dnu/run:with:in ? I was even going to suggest change all senders of #isIntegerObject: by a new method #hasObjectHeader: oop (or whatever name) and we let this prepare for when we have not only SmallInteger but other stuff. Cheers Mariano
|
In reply to this post by Andreas.Raab
On Sat, Dec 4, 2010 at 2:21 AM, Andreas Raab <[hidden email]> wrote:
But that's exactly what I want to avoid. I can even create the proxy class compact, and I would have 4 bytes if I serach by equality the compiledMethod in all classes.
Yes, I know that. I even saw that the VM was "prepare" to support SmallIntegers as key in the MethodDict. However, I have 2 questions for that approach: - Is that transparent for the develope? I mean, are we still able to do things like MyClass >> #foo ? or we are force to do MyClass methodDict at: 42 ? - To get those symbols garbageCollected, I guess I need to compact the symbol table all the time. Thanks Mariano |
In reply to this post by Andreas.Raab
On Sat, Dec 4, 2010 at 6:39 PM, Andreas Raab <[hidden email]> wrote:
Yes, you don't need lookup, but you need the methodMap... I mean, I can also store in the proxy instance its class+selector where it is installed. Or use a global map, or whatever. And yes, I avoid the lookup, but I spend memory on that. Then I can not store anything at all, and search it. Cheers, |
Free forum by Nabble | Edit this page |