pub fn to_int(val: ObjectRef) -> RuntimeResult<BigInt>