Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8237069

[lworld] Introduce and wire-in the new top interfaces

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: repo-valhalla
    • Fix Version/s: repo-valhalla
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      From http://cr.openjdk.java.net/~briangoetz/valhalla/sov/02-object-model.html

      To distinguish between inline and identity classes at compile time and runtime, we introduce a pair of restricted interfaces: IdentityObject and InlineObject. Inline classes implicitly implement InlineObject; identity classes implicitly implement IdentityObject. (It is an error to attempt to implement both.) This enables us to write code that dynamically tests for object identity before performing identity-sensitive operations:

      if (x instanceof IdentityObject)) {
          synchronized(x) { ... }
      }
      as well as statically reflecting the requirement for identity in types (and generic type bounds):

      static void runWithLock(IdentityObject lock, Runnable r) {
          synchronized (lock) {
              r.run();
          }
      }

      This ticket is introduce the new top interfaces and wire them in

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sadayapalam Srikanth Adayapalam
                Reporter:
                sadayapalam Srikanth Adayapalam
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: