develooper Front page | perl.perl6.internals | Postings from November 2001

Re: Yet another switch/goto implementation

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
November 7, 2001 06:49
Subject:
Re: Yet another switch/goto implementation
Message ID:
5.1.0.14.2.20011107094708.0240f780@pop.sidhe.org
At 07:47 PM 11/6/2001 -0500, Ken Fox wrote:
>Simon Cozens wrote:
> > > some static typing ability, so it should be able
> > > to emit bytecode that doesn't go through the PMC vtable.
> >
> > Yes, but that's fundamentally different from inlining vtable methods
> > in the runops loop, which is what you were originally suggesting.
> > I'm now unsure what you're actually getting at.
>
>If the guts of a vtable implementation are ripped out and given an
>op, isn't that inlining a PMC method? There doesn't seem much point
>in replacing a dynamic vtable offset with a constant vtable offset.
>The method really needs to be inlined -- either by copying the code
>or by calling the implementation directly.

We can't do that. PMCs, even statically typed ones, can change their 
vtables as they see fit. Also for this to be at all efficient we'd need to 
have all the common variable types vtables be available at compile time. 
That's not likely in the general case.

					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About