Skip to content

Commit

Permalink
Try setting superblock locals from an initialised exception handler (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosame authored and gbrail committed Nov 18, 2021
1 parent 2937a45 commit 734dcfa
Showing 2 changed files with 123 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/org/mozilla/classfile/ClassFileWriter.java
Original file line number Diff line number Diff line change
@@ -1605,7 +1605,11 @@ private void killSuperBlock(SuperBlock sb) {
int handlerPC = getLabelPC(ete.itsHandlerLabel);
SuperBlock handlerSB = getSuperBlockFromOffset(handlerPC);
locals = handlerSB.getLocals();
break;
if (handlerSB.isInitialized()) {
break;
} else {
continue;
}
}
if (eteStart > sbStart && eteStart < sb.getEnd()) {
int handlerPC = getLabelPC(ete.itsHandlerLabel);
@@ -1623,7 +1627,7 @@ private void killSuperBlock(SuperBlock sb) {
for (int i = 0; i < itsExceptionTableTop; i++) {
ExceptionTableEntry ete = itsExceptionTable[i];
int eteStart = getLabelPC(ete.itsStartLabel);
if (eteStart == sb.getStart()) {
if (eteStart == sb.getStart() || getLabelPC(ete.itsHandlerLabel) == sb.getStart()) {
for (int j = i + 1; j < itsExceptionTableTop; j++) {
itsExceptionTable[j - 1] = itsExceptionTable[j];
}
117 changes: 117 additions & 0 deletions testsrc/test262.properties
Original file line number Diff line number Diff line change
@@ -6580,6 +6580,123 @@ language/statements/generators 225/259 (86.87%)
yield-star-after-newline.js
yield-star-before-newline.js

language/statements/try 115/195 (58.97%)
dstr/ary-init-iter-close.js
dstr/ary-init-iter-get-err.js
dstr/ary-init-iter-get-err-array-prototype.js
dstr/ary-init-iter-no-close.js
dstr/ary-name-iter-val.js
dstr/ary-ptrn-elem-ary-elem-init.js
dstr/ary-ptrn-elem-ary-elem-iter.js
dstr/ary-ptrn-elem-ary-elision-init.js
dstr/ary-ptrn-elem-ary-elision-iter.js
dstr/ary-ptrn-elem-ary-empty-init.js
dstr/ary-ptrn-elem-ary-empty-iter.js
dstr/ary-ptrn-elem-ary-rest-init.js
dstr/ary-ptrn-elem-ary-rest-iter.js
dstr/ary-ptrn-elem-ary-val-null.js
dstr/ary-ptrn-elem-id-init-exhausted.js
dstr/ary-ptrn-elem-id-init-fn-name-arrow.js
dstr/ary-ptrn-elem-id-init-fn-name-class.js
dstr/ary-ptrn-elem-id-init-fn-name-cover.js
dstr/ary-ptrn-elem-id-init-fn-name-fn.js
dstr/ary-ptrn-elem-id-init-fn-name-gen.js
dstr/ary-ptrn-elem-id-init-hole.js
dstr/ary-ptrn-elem-id-init-skipped.js
dstr/ary-ptrn-elem-id-init-throws.js
dstr/ary-ptrn-elem-id-init-undef.js
dstr/ary-ptrn-elem-id-init-unresolvable.js
dstr/ary-ptrn-elem-id-iter-complete.js
dstr/ary-ptrn-elem-id-iter-done.js
dstr/ary-ptrn-elem-id-iter-step-err.js
dstr/ary-ptrn-elem-id-iter-val.js
dstr/ary-ptrn-elem-id-iter-val-array-prototype.js
dstr/ary-ptrn-elem-id-iter-val-err.js
dstr/ary-ptrn-elem-obj-id.js
dstr/ary-ptrn-elem-obj-id-init.js
dstr/ary-ptrn-elem-obj-prop-id.js
dstr/ary-ptrn-elem-obj-prop-id-init.js
dstr/ary-ptrn-elem-obj-val-null.js
dstr/ary-ptrn-elem-obj-val-undef.js
dstr/ary-ptrn-elision.js
dstr/ary-ptrn-elision-exhausted.js
dstr/ary-ptrn-elision-step-err.js
dstr/ary-ptrn-empty.js
dstr/ary-ptrn-rest-ary-elem.js
dstr/ary-ptrn-rest-ary-elision.js
dstr/ary-ptrn-rest-ary-empty.js
dstr/ary-ptrn-rest-ary-rest.js
dstr/ary-ptrn-rest-id.js
dstr/ary-ptrn-rest-id-direct.js
dstr/ary-ptrn-rest-id-elision.js
dstr/ary-ptrn-rest-id-elision-next-err.js
dstr/ary-ptrn-rest-id-exhausted.js
dstr/ary-ptrn-rest-id-iter-step-err.js
dstr/ary-ptrn-rest-id-iter-val-err.js
dstr/ary-ptrn-rest-obj-id.js
dstr/ary-ptrn-rest-obj-prop-id.js
dstr/obj-init-null.js
dstr/obj-init-undefined.js
dstr/obj-ptrn-empty.js
dstr/obj-ptrn-id-get-value-err.js
dstr/obj-ptrn-id-init-fn-name-arrow.js
dstr/obj-ptrn-id-init-fn-name-class.js
dstr/obj-ptrn-id-init-fn-name-cover.js
dstr/obj-ptrn-id-init-fn-name-fn.js
dstr/obj-ptrn-id-init-fn-name-gen.js
dstr/obj-ptrn-id-init-skipped.js
dstr/obj-ptrn-id-init-throws.js
dstr/obj-ptrn-id-init-unresolvable.js
dstr/obj-ptrn-id-trailing-comma.js
dstr/obj-ptrn-list-err.js
dstr/obj-ptrn-prop-ary.js
dstr/obj-ptrn-prop-ary-init.js
dstr/obj-ptrn-prop-ary-trailing-comma.js
dstr/obj-ptrn-prop-ary-value-null.js
dstr/obj-ptrn-prop-eval-err.js
dstr/obj-ptrn-prop-id.js
dstr/obj-ptrn-prop-id-get-value-err.js
dstr/obj-ptrn-prop-id-init.js
dstr/obj-ptrn-prop-id-init-skipped.js
dstr/obj-ptrn-prop-id-init-throws.js
dstr/obj-ptrn-prop-id-init-unresolvable.js
dstr/obj-ptrn-prop-id-trailing-comma.js
dstr/obj-ptrn-prop-obj.js
dstr/obj-ptrn-prop-obj-init.js
dstr/obj-ptrn-prop-obj-value-null.js
dstr/obj-ptrn-prop-obj-value-undef.js
dstr/obj-ptrn-rest-getter.js {unsupported: [object-rest]}
dstr/obj-ptrn-rest-skip-non-enumerable.js {unsupported: [object-rest]}
dstr/obj-ptrn-rest-val-obj.js {unsupported: [object-rest]}
12.14-13.js non-strict
12.14-14.js non-strict
12.14-15.js non-strict
12.14-16.js non-strict
cptn-catch.js
cptn-catch-empty-break.js
cptn-catch-empty-continue.js
cptn-catch-finally-empty-break.js
cptn-catch-finally-empty-continue.js
cptn-finally-empty-break.js
cptn-finally-empty-continue.js
cptn-finally-from-catch.js
cptn-finally-skip-catch.js
cptn-finally-wo-catch.js
cptn-try.js
early-catch-function.js
early-catch-lex.js
optional-catch-binding.js
optional-catch-binding-finally.js
optional-catch-binding-lexical.js
optional-catch-binding-throws.js
scope-catch-block-lex-close.js
scope-catch-block-lex-open.js
scope-catch-param-lex-open.js
scope-catch-param-var-none.js non-strict
tco-catch.js {unsupported: [tail-call-optimization]}
tco-catch-finally.js {unsupported: [tail-call-optimization]}
tco-finally.js {unsupported: [tail-call-optimization]}

language/types 9/113 (7.96%)
number/S8.5_A10_T1.js
number/S8.5_A10_T2.js non-strict

0 comments on commit 734dcfa

Please sign in to comment.