On 2021-05-10, 17:14, "Brett Okken" <[email protected]> wrote:
WARNING - External email; exercise caution.
> Secondly, MethodHandle.invokeExact() takes and returns an object so
there's a boxing/unboxing involved as well (as the Math/FastMath methods
returns primitives).
There is "magic" going on here that actually avoids boxing. You
can/should cast directly to the primitive type. That is what the
PolymorphicSignature annotation means.
@HotSpotIntrinsicCandidate
public final native @PolymorphicSignature Object
invokeExact(Object... args) throws Throwable;
While I don't do an explicit boxing on calling, there's an explicit unboxing on
the return. The compiler barfs if it's not there or maybe it's just Intellij?
/Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
*******************************************
CONFIDENTIALITY AND PRIVACY NOTICE: This e-mail and any attachments are for the
exclusive and confidential use of the intended recipient and may constitute
non-public information. Personal data in this email is governed by our Privacy
Policy at https://www.nasdaq.com/privacy-statement unless explicitly excluded
from it; please see the section in the policy entitled “Situations Where This
Privacy Policy Does Not Apply” for circumstances where different privacy terms
govern emailed personal data. If you received this e-mail in error,
disclosing, copying, distributing or taking any action in reliance of this
e-mail is strictly prohibited and may be unlawful. Instead, please notify us
immediately by return e-mail and promptly delete this message and its
attachments from your computer system. We do not waive any work product or
other applicable legal privilege(s) by the transmission of this message.
*******************************************