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. *