[Vm-dev] Compact class question
siguctua at gmail.com
Tue Dec 7 11:58:41 UTC 2010
On 7 December 2010 12:43, Gabriel Hernán Barbuto <gbarbuto at gmail.com> wrote:
> On Tue, Dec 7, 2010 at 11:30 AM, Yoshiki Ohshima <yoshiki at vpri.org> wrote:
>> At Tue, 7 Dec 2010 10:53:12 +0100,
>> Gabriel Hernán Barbuto wrote:
>>> Hi Yoshiki
>>> Maybe I have not made myself clear about which expression my comment
>>> referred to. Read my mail again, but I will copy it here again:
>>> headerWords :=
>>> contentsWords > 63
>>> ifTrue: 
>>> ifFalse: [(cl indexIfCompact > 0) ifTrue:  ifFalse: ].
>>> Replacing the 63 for a 62 will make the trick and besides if
>>> contentsWords is greater than 62 it should be greater than or equal to
>>> 63. So what you propose is the same. But be careful that it's not in
>>> totalWords expression.
>>> I think this object should have a 3-word header. What do you think about this?
>> Yes, I think so.
>> I didn't quite understand the intent of original question ("Is it
>> fine to have an instance of compact class that doesn't have a one word
>> header?"). The answer, as Bert wrote, an object needs to have the
>> base header, if the "one word header" refers to the base header.
> My question was if it is possible to have an instance of a compact
> class with a 3-word header. I thought that all compact classes
> instances should have only a 1-word header. I understand that the base
> header will always be there. But I was not sure if it was legal to
> have more than the base header for compact classes instances.
> Hope this makes my question clearer.
Array is a compact class, but it is no doubt allows you to have more than
63 words (62 elements in array).
You can check it easily by issuing:
Array new: 10000
>>> With respect to what we are doing. We are porting MicroSqueak to
>>> Pharo. MicroSqueak could be useful for teaching. The next step(we are
>>> also working in parallel on this) is to build kernel images but
>>> different from MicroSqueak. In order to do that, we need to remove all
>>> the bad dependencies on the kernel classes and clean up the Pharo
>>> What are you doing with MicroSqueak?
>> Cool, and thank you. In some ways, what we are doing is similar; we
>> wrote an app in Squeak but trying to understand what other parts of
>> Squeak the app is using and going from bottom up sounds like an
>> intersting idea.
>> -- Yoshiki
Igor Stasenko AKA sig.
More information about the Vm-dev