diff options
author | akuznetsov <akuznetsov@tradingview.com> | 2023-12-29 17:29:28 +0400 |
---|---|---|
committer | akuznetsov <akuznetsov@tradingview.com> | 2023-12-29 17:29:28 +0400 |
commit | 9777bae93cc84249fe08a7e81b2101c415bd55e5 (patch) | |
tree | 64fb183df9171cf231e3429fa6248706d2af9105 /src/main/javassist/compiler/CodeGen.java | |
parent | 0824a7a04e2f5ca8acc355c2379cf625dadc8943 (diff) | |
download | javassist-9777bae93cc84249fe08a7e81b2101c415bd55e5.tar.gz javassist-9777bae93cc84249fe08a7e81b2101c415bd55e5.zip |
line numbers for undefined ids & more
Diffstat (limited to 'src/main/javassist/compiler/CodeGen.java')
-rw-r--r-- | src/main/javassist/compiler/CodeGen.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/javassist/compiler/CodeGen.java b/src/main/javassist/compiler/CodeGen.java index 1f028f2b..e7e274b9 100644 --- a/src/main/javassist/compiler/CodeGen.java +++ b/src/main/javassist/compiler/CodeGen.java @@ -184,7 +184,7 @@ public abstract class CodeGen extends Visitor implements Opcode, TokenId { /* Expands a simple class name to java.lang.*. * For example, this converts Object into java/lang/Object. */ - protected abstract String resolveClassName(String jvmClassName) + protected abstract String resolveClassName(String jvmClassName, int lineNumber) throws CompileError; /** @@ -802,7 +802,7 @@ public abstract class CodeGen extends Visitor implements Opcode, TokenId { @Override public void atDeclarator(Declarator d) throws CompileError { d.setLocalVar(getMaxLocals()); - d.setClassName(resolveClassName(d.getClassName())); + d.setClassName(resolveClassName(d.getClassName(), d.getLineNumber())); int size; if (is2word(d.getType(), d.getArrayDim())) @@ -1656,7 +1656,7 @@ public abstract class CodeGen extends Visitor implements Opcode, TokenId { int i = cname.indexOf("[L"); if (i >= 0) { String name = cname.substring(i + 2, cname.length() - 1); - String name2 = resolveClassName(name); + String name2 = resolveClassName(name, expr.getLineNumber()); if (!name.equals(name2)) { /* For example, to obtain String[].class, * "[Ljava.lang.String;" (not "[Ljava/lang/String"!) @@ -1673,7 +1673,7 @@ public abstract class CodeGen extends Visitor implements Opcode, TokenId { } } else { - cname = resolveClassName(MemberResolver.javaToJvmName(cname)); + cname = resolveClassName(MemberResolver.javaToJvmName(cname), expr.getLineNumber()); cname = MemberResolver.jvmToJavaName(cname); } |