• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Export Word
    • Attachments
    • Page Information

    Loading...
  1. Dashboard
  2. HotSpot
  3. Main
  4. Runtime
  5. Method handles and invokedynamic
  6. Method handle invocation
  7. Deconstructing MethodHandles

Page History

Versions Compared

Old Version 4

changes.mady.by.user John Rose

Saved on May 17, 2014

compared with

New Version Current

changes.mady.by.user John Rose

Saved on Feb 09, 2021

  • Previous Change: Difference between versions 3 and 4
  • View Page History

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: 2 typos h/t H. Kabutz

...

This section deconstructs how exact invocation of MethodHandles are compiled, linked and executed using a specific example of setting the value of a non-static field. Examples of byte code and inlining traces are obtained by compiling and executing a MethodHandle-based jmh micro-benchmark.

Despite the name a Methodhandle MethodHandle can reference an underlying static or instance field of class. In the OpenJDK implementation invocations of such handles result in a corresponding call to an a method on sun.misc.Unsafe, after appropriate safety checks have been performed. For example, if the field is a reference type (a non-primitive type) marked as volatile then the method Unsafe.putObjectVolatile will be invoked.

...

Overview
Content Tools
ThemeBuilder

Terms of Use
• License: GPLv2
• Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Kolekti ThemeBuilder Powered by Atlassian Confluence 8.5.21
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 367, "requestCorrelationId": "8b8d134b8d07d018"}