Subj : Re: Rhino: Obtaining a list of script functions To : netscape.public.mozilla.jseng From : Attila Szegedi Date : Sat Oct 16 2004 01:01 am One small thing: would it make sense to push the "boolean evalScriptFlag" field from InterpetedFunction to InterepterData? It would make InterpetedFunction a little bit smaller (esp. since some JVMs use 4-byte slots for fields regardless of whether their types are 1 or 2 byte long). Attila. On Fri, 15 Oct 2004 23:33:36 +0200, Attila Szegedi wrote: > On Fri, 15 Oct 2004 21:22:16 +0200, Igor Bukanov > wrote: > >> >> Script instances do not hold any InterpretedFunction objects >> representing JS functions since they are created during Script.exec. > > So, in a sense they belong to a single invocation of Script.exec... > >> Similarly the nested functions are not wrapped into InterpretedFunction >> until the parent function is executed. >> >> In addition function objects in JS are not read only and if you would >> ignore modifications of InterpretedFunction during >> serialize/desirialize then you would break JS code like >> >> ContructorName.prototype = ... >> > > Hm... That's true. Anyway, if any of our guys writing script > applications would start to mess with the prototype field of an > interpreted function, I'd have him shot :-) > > Basically then, the stubbing of InterpretedData instances is the > farthest I can safely go without upsetting anything, right? They *look* > rather immutable to me... > >> Also note that Rhino CVS contains Context.getDebuggableView that allows >> to get DebuggableScript from Script without implementing Debugger >> interface. > > Hey, it wasn't there few hours ago! > New Rhino features crop up quickly with you around :-) > > Thanks, > Attila. .