Пример #1
0
 def unwrapper(w_arg):
     assert w_arg is not None
     # the following precise type check is intentional.
     # record_exact_class records a precise class to the JIT,
     # excluding subclasses
     assert type(w_arg) is typ
     jit.record_exact_class(w_arg, typ)
     return w_arg
Пример #2
0
 def unwrapper(w_arg):
     assert w_arg is not None
     # the following precise type check is intentional.
     # record_exact_class records a precise class to the JIT,
     # excluding subclasses
     assert type(w_arg) is typ
     jit.record_exact_class(w_arg, typ)
     return w_arg
Пример #3
0
 def fn(n):
     if n == 99:
         c.x = 12
         c.b = B()
         c.b.x = 12
         return 15
     b = c.b
     x = b.x
     jit.record_exact_class(c.b, A)
     y = b.x
     return x + y