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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • repo-valhalla
    • repo-valhalla
    • tools
    • generic
    • generic

      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

            sadayapalam Srikanth Adayapalam (Inactive)
            sadayapalam Srikanth Adayapalam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: