Re: jsdIScript.functionName semantics

James Ross <[email protected]>
Newsgroups gmane.comp.mozilla.devel.jsdebugger
Message-ID <[email protected]>
John J. Barton wrote:
> James Ross wrote:
>> Venkman identifies __top_level__ scripts by their name (i.e. empty), 
>> but uses some logic about sealed scripts I don't follow to pick out 
>> the eval scripts.
> 
> Oh that's a great hint.  I could not figure out what Venkman was up to. 
> But now I have a guess.  It analyzes all scripts on creation.  It uses 
> the first empty name to mark __top_level__.  Because it knows that no 
> function at compile time will be empty name except top level and that 
> script comes last in the compile sequence. At the same time it marks the 
> page ("instance") as "sealed", ie "I saw the top level".  After that all 
> scripts that are created must be EvalScript. (Granted there is some 
> funky code about _lastScriptWrapper but it seems consistent with this 
> model).
> 
> The key assertion is "no function at compile time will be empty name 
> except top level". Or "every empty name other than top level must be 
> from runtime, ie eval".
> 
> You buying that ;-)

I'll buy that alright; I never did log all the script wrapper and 
instances and sealing stuff, but counting all non-function scripts after 
the first as evals would fit.

-- 
James Ross <[email protected]>
ChatZilla Developer
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.