hg: loom/loom: 2 new changesets

Ron Pressler ron.pressler at oracle.com
Tue Jan 8 13:38:12 UTC 2019


I think that our planned scope locals (AKA frame locals, AKA dynamic variables) would be a better fit for doing this than
creating a continuation for each of you language’s frames. We could provide access for them in StackWalker, 
although that would require access protection, too.

Ron


On January 8, 2019 at 12:58:31 PM, forax at univ-mlv.fr (forax at univ-mlv.fr) wrote:



De: "Ron Pressler" <ron.pressler at oracle.com>
À: "Remi Forax" <forax at univ-mlv.fr>
Cc: "loom-dev" <loom-dev at openjdk.java.net>, "Alan Bateman" <alan.bateman at oracle.com>
Envoyé: Mardi 8 Janvier 2019 13:21:39
Objet: Re: hg: loom/loom: 2 new changesets
What would you use the ContinuationScope in StackWalker for?

I only had debugging in mind.

Let say you have a language which is interpreted, when you call a function, you can either manage your own stack or use the Java one, in the later case, you have the same Java method which is called for interpreting different functions, being able to store the activation information (pc, base pointer, stack pointer, function metadata, etc) of a function allow to create the stack trace of your language from the Java stack trace.

Rémi



On January 8, 2019 at 10:07:06 AM, forax at univ-mlv.fr (forax at univ-mlv.fr) wrote:

it can be protected by a Lookup ?

Rémi

----- Mail original -----
> De: "Alan Bateman" <Alan.Bateman at oracle.com>
> À: "Remi Forax" <forax at univ-mlv.fr>, "Ron Pressler" <ron.pressler at oracle.com>
> Cc: "loom-dev" <loom-dev at openjdk.java.net>
> Envoyé: Mardi 8 Janvier 2019 08:46:29
> Objet: Re: hg: loom/loom: 2 new changesets

> On 07/01/2019 22:33, Remi Forax wrote:
>> Hi,
>> for the StackWalker API, i would prefer to get the ContinuationScope instead of
>> the name of the continuation scope,
>> given that the continuation scope can be a user defined object, it means you can
>> insert user defined object in the stacktrace which will be very helpful for
>> people that write interpreters on top of Java.
>>
> A ContinuationScope is something that needs to be guarded closely so
> leaking a reference when doing a stack walk would need a lot of
> consideration. Also STE is Serializable so there are several issues
> there too.
>
> -Alan



More information about the loom-dev mailing list