[Vm-dev] Integration of the BlockClolsure>>value primitive

Mathieu Suen mathk.sue at gmail.com
Mon Aug 13 10:17:17 UTC 2007


Hi Andreas,

Thanks for your review.

On Aug 13, 2007, at 10:23 AM, Andreas Raab wrote:

> Yes, I did. A few questions:
>
> 1) Why didn't you recycle prims 186 and 187? They are marked as  
> "old closure primitives" but I don't think they have ever being  
> used. Seems a bit more to the point than adding two new prim indexes.

Yes I could do this.

>
> 2) Why indexed prims to begin with? I'd rather have named ones to  
> start out with because it seems that there is quite some  
> possibility that these prims might be changed again and then we get  
> into troubles with the prim indexes. I would recommend to use named  
> prims until there is a mainstream version of closures and then (if  
> necessary) decide on which prim indexes to use.

Ok I didn't know how to do it so I will make a named primitive

>
> 3) Is there a reason why these prims aren't shortcut from  
> bytecodePrimValue? If speed is the main point I'd expect that a  
> quick type check for BlockClosure+primClosureValue outperforms the  
> current implementation by far.

Yes, I didn't  know that they were a bytecode for the send of #value  
and #value: . This imply that I should add the BlockClosure in the  
special object.
For me it will be useful but it will be an other things to push in  
the image.

> It would also take the pressure of requiring an indexed primitive  
> for speed.

Ok I don't know how to make named primitive. If you have time could  
you briefly explain it.

Thanks

	Mth




More information about the Vm-dev mailing list