On Mon, 7 Feb 2022 13:43:55 GMT, Alan Hayward <[email protected]> wrote:
>> Tell you what, first put a comment here that says when it should (and
>> therefore, should not) be used. Once it's clear exactly what this is for,
>> thinking of a name maight be easier.
>
> How about extending the existing enter() function:
>
> // Enter a new stack frame for the current method.
> // nested: Indicates a frame has already been entered (and not left) for
> the current method.
> void MacroAssembler::enter(bool nested=false) {
> if (nested) strip()
> protect()
> stp()
> mov()
> }
>
> This would add an additional bool check for every call of enter() - that's at
> code generation time, so probably not an issue.
So, `nested` is true iff we are, say, pushing an extra frame for a runtime call
in the middle of generated code, but for some mysterious reason the logic is
inline instead of being implemented in the obvious way as a stub.
Please do this as:
` MacroAssembler::enter(bool strip_return_address=false)`
and I'll be happy. Please make sure that all calls are commented, as in
`__ enter(/*strip_return_address*/true);`
and I'll be happy.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6334