Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jruby.ir.operands;
 
 
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
   end
 
public class Bignum extends ImmutableLiteral {
    final public BigInteger value;
    public Bignum(BigInteger value) {
        this. = value;
    }
    
    @Override
    public Object createCacheObject(ThreadContext context) {
        return RubyBignum.newBignum(context.runtime);
    }
    @Override
    public String toString() { 
        return "Bignum:" + ;
    }
    @Override
    public void visit(IRVisitor visitor) {
        visitor.Bignum(this);
    }
New to GrepCode? Check out our FAQ X