[Yarv-devel] runtime block inlining

Alexander Kellett ruby-lists at lypanov.net
Wed Oct 20 05:54:07 EDT 2004


On Wed, Oct 20, 2004 at 07:05:37PM +0900, SASADA Koichi wrote:
> How to know reciever object is "Array" instance?
> IMO, this is only and most difficult (impossible?) problem.

i don't have this problem as the function is generated
at runtime anyway, thusly one of the parameters to the
code generator is the type itself. an exception mechanism 
is used if / when the type of a local changes, these can
result in regeneration of the executing code, and the 
dispatcher takes care of jumping into the newly generated
code.

> > what sort of progress have you made with the jit
> > backend? any nice ideas for this?, i guess that this
> > is required to do really fast inlines in any case...
> 
> I will simple replace Insns sequence to native codes sequence.
> It's poor but easy. (some problems are there: relocations, ...)

i hope you succeed :)
easy + fast is good :)

> >> It's seems good for some popular iterator (in popular container class).
> > 
> > would this be dynamic enough for redefinition of the
> > iterators at runtime to not cause problems?
> 
> see my example :)

hehe. oops, missed that bit :P

cheers,
Alex


More information about the Yarv-devel mailing list