RFR: 8266252: Streamline AbstractInterpreter::method_kind [v2]
Claes Redestad
redestad at openjdk.java.net
Thu May 6 23:39:00 UTC 2021
On Thu, 6 May 2021 22:45:28 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:
>>
>> assert that vmIntrinsics::_dsqrt are only selected for Math/StrictMath::sqrt
>
> src/hotspot/share/interpreter/abstractInterpreter.cpp line 125:
>
>> 123:
>> 124: #ifndef ZERO
>> 125: switch (m->intrinsic_id()) {
>
> Can this just be switch (id) since you fetched m->intrinsic_id() above?
Yes, or maybe `iid` is a better name for that variable.
> src/hotspot/share/interpreter/abstractInterpreter.cpp line 136:
>
>> 134: case vmIntrinsics::_floatToRawIntBits: return java_lang_Float_floatToRawIntBits;
>> 135: case vmIntrinsics::_longBitsToDouble: return java_lang_Double_longBitsToDouble;
>> 136: case vmIntrinsics::_doubleToRawLongBits: return java_lang_Double_doubleToRawLongBits;
>
> Could you align these return statements?
Ok, I'll try tidying up - is there some rule of thumb on how to align in a switch like this where the longest case label is.. pretty long?
> src/hotspot/share/interpreter/abstractInterpreter.cpp line 137:
>
>> 135: case vmIntrinsics::_longBitsToDouble: return java_lang_Double_longBitsToDouble;
>> 136: case vmIntrinsics::_doubleToRawLongBits: return java_lang_Double_doubleToRawLongBits;
>> 137: case vmIntrinsics::_dsin: return java_lang_math_sin;
>
> So ZERO doesn't have these?
Hmm, I looked at the math intrinsics, which are all unimplemented in zero. I see now that there are some intrinsics implemented in ZERO, so I'll take the conservative route and move the `#ifndef` to only exclude such cases as were excluded before.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3798
More information about the hotspot-runtime-dev
mailing list