Commit b484503a authored by Eric Bruneton's avatar Eric Bruneton
Browse files

Merge branch '317808-fix-frame-refactoring-regression' into 'master'

Resolve "ASM 6.1 Beta is producing incorrect StackMapTable attributes"

Closes #317808

See merge request asm/asm!91
parents c88ee922 4b012177
Pipeline #600 passed with stage
in 6 minutes and 27 seconds
......@@ -27,6 +27,8 @@
// THE POSSIBILITY OF SUCH DAMAGE.
package jdk8;
import java.io.UnsupportedEncodingException;
/**
* Class which, compiled with the JDK 1.8.0, produces all the stack map frame types. Must be
* compiled with "javac -g -parameters".
......@@ -56,13 +58,32 @@ public class AllFrames {
// Frame types: same, same_locals_1_stack_item, full_frame.
// Element types: primitive types and object.
public int m0(boolean b, byte y, char c, short s, int i, float f, long l, double d, Object o,
Object[] p, Object[][] q) {
public int m0(
boolean b,
byte y,
char c,
short s,
int i,
float f,
long l,
double d,
Object o,
Object[] p,
Object[][] q) {
return b
? m0(!b, y, c, s, i - 1, f - 1f, l - 1l, d - 1d, o, p, q)
: m0(!b, y, c, s, i + 1, f + 1f, l + 1l, d + 1d, o, p, q);
}
// Element types: uninitialized (multiple per frame).
public String m0(byte[] bytes, boolean b) {
try {
return bytes == null ? null : new String(bytes, b ? "a" : "b");
} catch (UnsupportedEncodingException e) {
return null;
}
}
// Frame types: append.
// Element types: top.
public void m1(int i, int j) {
......
......@@ -648,7 +648,8 @@ class Frame {
if (abstractType == UNINITIALIZED_THIS) {
return REFERENCE_KIND | symbolTable.addType(symbolTable.getClassName());
} else {
return REFERENCE_KIND | symbolTable.addType(symbolTable.getType(value).value);
return REFERENCE_KIND
| symbolTable.addType(symbolTable.getType(abstractType & VALUE_MASK).value);
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment