4.10.1.9: Disallow acmp & ifnull on 'uninitialized' types

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • 27
    • Affects Version/s: 26
    • Component/s: specification
    • vm

      Historically, it has been possible to perform 'acmp' on an 'uninitialized' object. This is almost always useless: the result is typically 'true' for matching 'uninitialized' types, and 'false' otherwise.

      (Exception: some complex control flow *could* end up producing two different objects with the same 'new' instruction, and then make it statically impossible to tell whether two maching 'unitialized(nn)' types are equal. This is very unlikely to come up in practice.)

      It has also been possible to perform 'ifnull'/'ifnonnull' on an 'uninitialized' object. The object is guaranteed to be non-null, so this instruction can always be simplified to a 'nop' or 'goto'.

      We propose removing these degrees of freedom to simplify the set of operations that need to be supported by an 'uninitialized' object. (Future work, e.g. with value objects, will benefit from this simplification.)

            Assignee:
            Dan Smith
            Reporter:
            Dan Smith
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: