diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2004-06-05 16:05:18 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2004-06-05 16:05:18 +0000 |
commit | 134ee70a9fd4959cbf6b9b6f3b9d1498247ec1e5 (patch) | |
tree | a285eba6f305608f805b36bcb89fecd6e6b00ca9 /src/main/javassist/expr/MethodCall.java | |
parent | fa03e04037cdfed164d5cab7025e1b2f9fe03a22 (diff) | |
download | javassist-134ee70a9fd4959cbf6b9b6f3b9d1498247ec1e5.tar.gz javassist-134ee70a9fd4959cbf6b9b6f3b9d1498247ec1e5.zip |
Changed subclasses of javassist.expr.Expr so that $_ is always initialized.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@109 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/expr/MethodCall.java')
-rw-r--r-- | src/main/javassist/expr/MethodCall.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/javassist/expr/MethodCall.java b/src/main/javassist/expr/MethodCall.java index 28ed8d2d..1e0a842d 100644 --- a/src/main/javassist/expr/MethodCall.java +++ b/src/main/javassist/expr/MethodCall.java @@ -211,6 +211,12 @@ public class MethodCall extends Expr { Bytecode bytecode = jc.getBytecode(); storeStack(params, c == INVOKESTATIC, paramVar, bytecode); jc.recordLocalVariables(ca, pos); + + if (retType != CtClass.voidType) { + bytecode.addConstZero(retType); + bytecode.addStore(retVar, retType); // initialize $_ + } + jc.compileStmnt(statement); if (retType != CtClass.voidType) bytecode.addLoad(retVar, retType); |