On 4/24/08, Charles Oliver Nutter <[EMAIL PROTECTED]> wrote:
>
> John Wilson wrote:
> > Can you aggregate some of those parameters?
> >
> > Klazz, name, fileName and line with certainly be the same every time
> > the call is made. What about block and jumpTarget?
>
>
> Klass will vary because a method defined on X may be caled against
> subclass Y.
>
> Name will vary because methods can be aliased from their original names.
>
> fileName and line will not vary, but line needs to be updatable while
> executing to produce an accurate stack trace. In general though these
> could possibly be immutable; I think they represent the file and line of
> the *caller* so we can produce a trace that shows the method name (this
> frame) called in file X (previous frame) at line Y (previous frame).
> Another option would be representing backtrace information in a separate
> stack, so we can at least have it work without a full frame...but that's
> hard too, and incurs similar costs.
>
>
> > at best you could have
> >
> > class FrameData {
> > public final RubyModule klazz;
> > public final String name;
> > public final Block block;
> > public finalString fileName;
> > public final int line;
> > public final JumpTarget jumpTarget;
> >
> > public FrameData(...).....
> > }
>
>
> Yeah, I really wish we could. The fact is most of the fields we want to
> stuff into a frame, even if they're individually immutable, get combined
> in arbitrary ways due to inheritance, mixins, and trace information.
I was thinking of creating an instance of FrameData for every call
site. I think that would make the combinations immutable. The cost
would be that you generate quite a few instances of course!
John Wilson
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---