Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Represents a literal Bignum. We cache the value so that when the same Bignum Operand is copy-propagated across multiple instructions, the same RubyBignum object is created. In a ddition, the same constant across loops should be the same object. So, in this example, the output should be false, true, true
   n = 0
   olda = nil
   while (n < 3)
     a = 81402749386839761113321
     p a.equal?(olda)
     olda = a
     n += 1
public class Bignum extends ImmutableLiteral {
    final public BigInteger value;
    public Bignum(BigInteger value) {
        this. = value;
    public Object createCacheObject(ThreadContext context) {
        return RubyBignum.newBignum(context.runtime);
    public String toString() {
        return "Bignum:" + ;
    public void visit(IRVisitor visitor) {
New to GrepCode? Check out our FAQ X