aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/bytecode/Bytecode.java
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2003-07-08 02:20:59 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2003-07-08 02:20:59 +0000
commit5a846bbe359bb0ff658d79e31c319276e47da4e9 (patch)
treea22efbdb289fcea2f9b9a645c137550149a93b91 /src/main/javassist/bytecode/Bytecode.java
parent5372926c9102cd4fbc16bb8297bd80c50f3d8ab6 (diff)
downloadjavassist-5a846bbe359bb0ff658d79e31c319276e47da4e9.tar.gz
javassist-5a846bbe359bb0ff658d79e31c319276e47da4e9.zip
minor bugs have been fixed.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@27 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/bytecode/Bytecode.java')
-rw-r--r--src/main/javassist/bytecode/Bytecode.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/javassist/bytecode/Bytecode.java b/src/main/javassist/bytecode/Bytecode.java
index 198addb5..9c742396 100644
--- a/src/main/javassist/bytecode/Bytecode.java
+++ b/src/main/javassist/bytecode/Bytecode.java
@@ -688,13 +688,16 @@ public class Bytecode implements Opcode {
/**
* Appends instructions for loading all the parameters onto the
* operand stack.
+ *
+ * @param offset the index of the first parameter. It is 0
+ * if the method is static. Otherwise, it is 1.
*/
- public int addLoadParameters(CtClass[] params) {
+ public int addLoadParameters(CtClass[] params, int offset) {
int stacksize = 0;
if (params != null) {
int n = params.length;
for (int i = 0; i < n; ++i)
- stacksize += addLoad(stacksize + 1, params[i]);
+ stacksize += addLoad(stacksize + offset, params[i]);
}
return stacksize;