From 0ed88eb6e1eb757417c0d65adb2b1fdf9349ea6f Mon Sep 17 00:00:00 2001 From: "igor%mir2.org" Date: Mon, 27 Oct 2003 15:47:05 +0000 Subject: [PATCH] Added addPush version taking long argument. --- .../org/mozilla/classfile/ClassFileWriter.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/js/rhino/src/org/mozilla/classfile/ClassFileWriter.java b/js/rhino/src/org/mozilla/classfile/ClassFileWriter.java index 390735bbc9d..97a68797388 100644 --- a/js/rhino/src/org/mozilla/classfile/ClassFileWriter.java +++ b/js/rhino/src/org/mozilla/classfile/ClassFileWriter.java @@ -821,6 +821,22 @@ public class ClassFileWriter { } } + /** + * Generate code to load the given long on stack. + * + * @param k the constant + */ + public void addPush(long k) + { + int ik = (int)k; + if (ik == k) { + addPush(ik); + add(ByteCode.I2L); + } else { + addLoadConstant(k); + } + } + /** * Generate code to load the given double on stack. *