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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • repo-valhalla
    • Affects Version/s: repo-valhalla
    • Component/s: 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

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

              Created:
              Updated:
              Resolved: