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

Megemorphic scope access does not throw ReferenceError when property is missing

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 9
    • 9
    • core-libs
    • b83
    • generic
    • generic

    Backports

      Description

        function check() {
            try { foo; return true } catch (e) { return false }
        }

        // This should alternate b/w false and true for all iterations
        // but after 16 iterations, both prints print "true"
        // => ReferenceError is not thrown in "check" method for "foo"
        // access after "foo" access becomes megamorphic
        for (var x = 0; x < 40; x++) {
            delete this.foo;
            print(check());
            foo = 44;
            print(check());
        }

        Attachments

          Issue Links

            Activity

              People

                sundar Sundararajan Athijegannathan
                sundar Sundararajan Athijegannathan
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: