Beispiel #1
0
def verify_lowlevel(func):
    """
    Assert that the function is lowered for code generation.
    """
    for op in func.ops:
        assert type(resolve_typedef(op.type)) in (
            Boolean, Integral, Real, Struct, Pointer, Function, VoidT), op.type
Beispiel #2
0
def verify_lowlevel(func):
    """
    Assert that the function is lowered for code generation.
    """
    for op in func.ops:
        assert type(resolve_typedef(op.type)) in (
            Boolean, Array, Integral, Real, Struct, Pointer, Function, VoidT, Vector), op
Beispiel #3
0
 def visit_Constant(self, node):
     type = self.type_env[node.type]
     const = types.convert(node.value, types.resolve_typedef(type))
     if isinstance(const, basestring):
         const = const[1:-1] # slice away quotes
     return Const(const)
Beispiel #4
0
 def visit_Constant(self, node):
     type = self.type_env[node.type]
     const = types.convert(node.value, types.resolve_typedef(type))
     if isinstance(const, basestring):
         const = const[1:-1]  # slice away quotes
     return Const(const)