diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2003-10-07 06:26:21 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2003-10-07 06:26:21 +0000 |
commit | ff4f2c43c1fbba039e4c905a56f5706ed7cc4724 (patch) | |
tree | e51974866aaaba4e1791a78efe6fe283b441bf58 /src/main/javassist/compiler/CodeGen.java | |
parent | c7d2341f4d0d5110a4347458dc4236af704986df (diff) | |
download | javassist-ff4f2c43c1fbba039e4c905a56f5706ed7cc4724.tar.gz javassist-ff4f2c43c1fbba039e4c905a56f5706ed7cc4724.zip |
enabled the parser to parse switch and synchronized statements.
The code generator has not supported them yet.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@52 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/compiler/CodeGen.java')
-rw-r--r-- | src/main/javassist/compiler/CodeGen.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/javassist/compiler/CodeGen.java b/src/main/javassist/compiler/CodeGen.java index 54f14477..6a0bd3dc 100644 --- a/src/main/javassist/compiler/CodeGen.java +++ b/src/main/javassist/compiler/CodeGen.java @@ -339,6 +339,14 @@ public abstract class CodeGen extends Visitor implements Opcode, TokenId { atThrowStmnt(st); else if (op == TRY) atTryStmnt(st); + else if (op == SYNCHRONIZED) { + hasReturned = false; + throw new CompileError("sorry, synchronized is not supported"); + } + else if (op == SWITCH) { + hasReturned = false; + throw new CompileError("sorry, switch is not supported"); + } else { // LABEL, SWITCH label stament might be null?. hasReturned = false; |