Exemplo n.º 1
0
def test_call_descr_dynamic():

    args = [types.sint, types.double, types.pointer]
    descr = get_call_descr_dynamic(args, types.void)
    assert isinstance(descr, VoidCallDescr)
    assert descr.arg_classes == 'ifi'

    descr = get_call_descr_dynamic([], types.sint8)
    assert isinstance(descr, DynamicIntCallDescr)
    assert descr.get_result_size(False) == 1
    assert descr.is_result_signed() == True

    descr = get_call_descr_dynamic([], types.uint8)
    assert isinstance(descr, DynamicIntCallDescr)
    assert descr.get_result_size(False) == 1
    assert descr.is_result_signed() == False

    descr = get_call_descr_dynamic([], types.float)
    assert descr is None # single floats are not supported so far
Exemplo n.º 2
0
 def calldescrof_dynamic(self, ffi_args, ffi_result, extrainfo=None):
     from pypy.jit.backend.llsupport import ffisupport
     return ffisupport.get_call_descr_dynamic(self, ffi_args, ffi_result,
                                              extrainfo)
Exemplo n.º 3
0
 def calldescrof_dynamic(self, ffi_args, ffi_result, extrainfo, ffi_flags):
     from pypy.jit.backend.llsupport import ffisupport
     return ffisupport.get_call_descr_dynamic(self, ffi_args, ffi_result,
                                              extrainfo, ffi_flags)