On Sat, 31 Oct 2020 09:54:09 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:

>> Erik Österlund has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Coleen CR1: Refactoring
>
> Hi Erik,
> 
> Nice discovery! Indeed, this is a long standing issue. It looks good in 
> general.
> I agree with Coleen, it would be nice if there is an elegant way to move the 
> oop_result saving/restoring code to InterpreterRuntime::post_method_exit. 
> Otherwise, I'm okay with what you have now.
> It is also nice discovery of the issue with clearing the expression stack. I 
> think, it was my mistake in the initial implementation of the 
> ForceEarlyReturn when I followed the PopFrame implementation pattern. It is 
> good to separate it from the current fix.
> 
> Thanks,
> Serguei

I uploaded a new commit to perform some refactoring as requested by Coleen and 
Serguei. I made the oop save/restore + JRT_BLOCK logic belong only to the path 
taken from InterpreterRuntime::post_method_exit. An inner posting method is 
called both from that path and from 
JvmtiExport::notice_unwind_due_to_exception. I think the result is an 
improvement in terms of how clear it is. I didn't want to move logic all the 
way back to InterpreterRuntime::post_method_exit though, as I don't think it 
looks pretty to have large chunks of JVMTI implementation details in the 
interpreterRuntime.cpp file. So I did basically what you suggested, with the 
slight difference of moving all the JVMTI implementation into the JVMTI file 
instead, which is just called from InterpreterRuntime::post_method_exit. Hope 
you are okay with this!

-------------

PR: https://git.openjdk.java.net/jdk/pull/930

Reply via email to