[Vm-dev] Re: SmallInetger as methods was not ready yet....now maybe?

stephane ducasse stephane.ducasse at gmail.com
Fri Dec 3 19:55:30 UTC 2010


Andreas

I understand your point. Now this is a bit 'sad' (I do not know how to express it) because it shows somehow that SmallIntegers are not uniformly
treated as normal objects (of course they are not from a VM perspective) but this illusion on the image side is so great that having it on the vm would
be cool. Mariano I would be curious to know the cost of your check on a real execution and also with cog to get an idea.

Now from a robustness (availability point of view) it would be good that for things that are not in the main execution loop 
checks are done because they would increase the general robustness of the system. 

This was the idea of the changeClassToThatOf: design (forcing the dev to produce an instance of class and not specifying the class)
to make sure that the clss to which the instance was change to was a class that could get instances. 

Stef

> On 12/3/2010 10:33 AM, Igor Stasenko wrote:
>> the problem is, that when you want it, you can always end up with
>> method dictionary which contains 'non-executable' objects.
>> 
>> methodDict at: #foo put: foo.
>> foo becomeForward: somethingNonExecutable.
> 
> So don't do that! When was the last time you've had the need to #become: CompiledMethods anyway? ;-) Oh, and for the terminally curious, try evaluating the following just for fun:
> 
> 	Object new becomeForward: 3.
> 
> See? ;-)
> 
> Cheers,
>  - Andreas
> 



More information about the Vm-dev mailing list