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

Re: Draft sketch of bytecode generation

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
October 28, 2002 13:09
Subject:
Re: Draft sketch of bytecode generation
Message ID:
a05111b00b9e355b4d961@[63.120.19.221]
At 1:08 PM -0800 10/27/02, chromatic wrote:
>On Sun, 27 Oct 2002 08:54:08 -0800, Dan Sugalski wrote:
>
>These two seem highly similar:
>
>>  =item Add source code to segment
>>
>>  This adds a line or more of source code to the bytecode segment.
>
>>  =item Add line number information
>>
>>  This adds line number info to the bytecode segment, allowing the interpreter
>>  to find out what line of source a particular piece of bytecode 
>>corresponds to.
>
>They might be related to this one, though I'm not completely sure:
>
>  > =item Add binary data chunk to segment

Nope, not really related. The engine may know about the source or 
line number information--certainly if it wants to emit meaningful 
error messages for the number chunk, or reparse the source for the 
former. (On the off chance that something changes significantly 
enough to warrant recompiling a segment of code) Debuggers might also 
make some use of that, though I don't suppose they have to.

>Is there an underlying function used to add arbitrary (Unicode text) metadata
>to the bytecode?

Arbitrary metadata? Nope, no plans for that. While I can see it as a 
useful thing (though it wouldn't be unicode, at least unicode 
wouldn't be required) I'm not sure it's worth the time to define, 
implement, and maintain.

On the other hand, if someone has a good proposal, clean API, and 
generally feels strongly about it I certainly won't have any 
objections.
-- 
                                         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