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
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
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)
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)