aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/compiler/CodeGen.java
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2007-05-12 14:45:10 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2007-05-12 14:45:10 +0000
commitc2d6bdf673d0fde9b947ae23094cd76493d5ca88 (patch)
treec0f5dbd5cbb7acf859f51b14ee7e08b4358e8aed /src/main/javassist/compiler/CodeGen.java
parent4958b9a45ab284be8d5927d8cc96df14c64d02c1 (diff)
downloadjavassist-c2d6bdf673d0fde9b947ae23094cd76493d5ca88.tar.gz
javassist-c2d6bdf673d0fde9b947ae23094cd76493d5ca88.zip
changed the implementation of try statements so that jsr/ret will not be used anymore.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@371 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/compiler/CodeGen.java')
-rw-r--r--src/main/javassist/compiler/CodeGen.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/main/javassist/compiler/CodeGen.java b/src/main/javassist/compiler/CodeGen.java
index c69005f9..dfcddc4e 100644
--- a/src/main/javassist/compiler/CodeGen.java
+++ b/src/main/javassist/compiler/CodeGen.java
@@ -1547,6 +1547,15 @@ public abstract class CodeGen extends Visitor implements Opcode, TokenId {
cname = MemberResolver.jvmToJavaName(cname);
}
+ atClassObject2(cname);
+ exprType = CLASS;
+ arrayDim = 0;
+ className = "java/lang/Class";
+ }
+
+ /* MemberCodeGen overrides this method.
+ */
+ protected void atClassObject2(String cname) throws CompileError {
int start = bytecode.currentPc();
bytecode.addLdc(cname);
bytecode.addInvokestatic("java.lang.Class", "forName",
@@ -1581,10 +1590,6 @@ public abstract class CodeGen extends Visitor implements Opcode, TokenId {
+ "Ljava/lang/NoClassDefFoundError;");
bytecode.addOpcode(ATHROW);
bytecode.write16bit(pc, bytecode.currentPc() - pc + 1);
-
- exprType = CLASS;
- arrayDim = 0;
- className = "java/lang/Class";
}
public void atArrayRead(ASTree array, ASTree index)