示例#1
0
 def f(n):
     if NonConstant(False):
         dtype = float64_dtype
     else:
         dtype = int32_dtype
     ar = W_NDimArray(n, [n], dtype=dtype)
     i = 0
     while i < n:
         ar.get_concrete().setitem(i, int32_dtype.box(7))
         i += 1
     v = ar.descr_add(space, ar).descr_sum(space)
     assert isinstance(v, IntObject)
     return v.intval