HotSpot Style Guide promotes ShouldNotReachHere

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 16
    • Component/s: hotspot

      The Style Guide currently says:

        Implement classes as if expecting rough usage by clients. Check for
        incorrect usage of a class
        using `assert(...)`, `guarantee(...)`, `ShouldNotReachHere()` and
        comments wherever needed. Performance is almost never a reason to
        omit asserts.

      The Compiler team made an effort to replace ShouldNotReachHere() with fatal("descriptive message"), which gives useful information without needing to look at a backtrace. Maybe there should be common guidance about this. Perhaps deprecate ShouldNotReachHere in favor of something more informative. Or perhaps ShouldNotReachHere should take message arguments.

            Assignee:
            Unassigned
            Reporter:
            Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: