develooper Front page | perl.perl6.internals | Postings from October 2005

Re: Tcl - compiling

Thread Previous | Thread Next
From:
Will Coleda
Date:
October 4, 2005 06:17
Subject:
Re: Tcl - compiling
Message ID:
D8C3F739-9F9D-47EE-92BE-95824AC0CC16@coleda.com

On Oct 4, 2005, at 5:11 AM, Leopold Toetsch wrote:

>
> On Oct 4, 2005, at 3:52, Will Coleda wrote:
>
>
>> On Oct 3, 2005, at 6:34 PM, Leopold Toetsch wrote:
>>
>>
>
>
>>> I don't see the point. Your compiler can emit, e.g.:
>>>
>>>   "while"(test, body)
>>>
>>>
>
>
>> That's actually how things work right now (very similar to the  
>> interpreter from previous versions).
>>
>
> Not quite:
>
> $ find lib -name '*.pir' | xargs grep 'sub.*while'
> lib/commands/while.pir:.sub "&while"
>
> You obviously have to mangle the subname first, before you can call  
> it.

Yes, this is mandatory, as subs and variables must co-exist in a  
parrot namespace, but in tcl, you can have a sub and a var with the  
same name in the same namespace. This _might_ change once Matt  
Diephouse's proposal is formalized, but for now, it's the easiest  
solution. (The other is mangle the namespaces instead of the names,  
but I felt this solution would be better for language interoperability.)

I was focusing more on the dispatch part than the naming conventions  
in my earlier reply, sorry.

>
>> Is the argument that inlining will not (even theoretically)  
>> provide a speed boost?
>>
>
> No, not at all, that's fine. I just wanted to mention that there  
> are still a lot of code pieces left over from the interpreter.
>

Oh, sure. I'm doing now the bare minimum to be called a compiler, I  
think, but this particular piece is probably going to stay,  
regardless of compile vs. interpret.

Regards.


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