示例#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
示例#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
示例#3
0
文件: cirparser.py 项目: B-Rich/pykit
 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)
示例#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)