# Path: cbl/containers.py
# class AsyncReturn:
# class DelegatedWrite:
#     def __init__(self, realret, callback):
#     def must_await(self):
#     def type(self):
#     def value(self):
#     def write(self, compiler, other):
# 
# Path: cbl/util.py
# def safe_typename(type):
#     return ''.join(map(lambda c: '_%s_' % op_name[c] if c in op_name else c,
#                        type.typename))


from .containers import Temporary
from .util import safe_typename
        with compiler.set_create_var(shift_var):
            value = self.allocate(compiler, 'restored')
            # Check we consumed all the variables
            assert all(False for _ in it)
            return value

    def effective_var_size(self):
        if self.ir_type:
            return 1
        assert False

    def run_constructor(self, compiler, container, arguments):
        assert not arguments, (self, arguments)

    def do_construction(self, compiler, instance, member_inits):
        assert not member_inits

    def coerce_to(self, compiler, container, type):
        if type == self:
            return container
        return None

class MetaType(NativeType):

    def __init__(self, the_type):
        self.the_type = the_type

    def call_constructor(self, compiler, container, args):
        the_type = container.type.the_type
        obj = the_type.allocate(compiler, safe_typename(the_type) + '_inst')

# Path: cbl/containers.py
# class AsyncReturn:
# class DelegatedWrite:
#     def __init__(self, realret, callback):
#     def must_await(self):
#     def type(self):
#     def value(self):
#     def write(self, compiler, other):
# 
# Path: cbl/util.py
# def safe_typename(type):
#     return ''.join(map(lambda c: '_%s_' % op_name[c] if c in op_name else c,
#                        type.typename))


# Path: cbl/native_type.py
from .containers import Temporary
from .util import safe_typename

        with compiler.set_create_var(shift_var):
            value = self.allocate(compiler, 'restored')
            # Check we consumed all the variables
            assert all(False for _ in it)
            return value

    def effective_var_size(self):
        if self.ir_type:
            return 1
        assert False

    def run_constructor(self, compiler, container, arguments):
        assert not arguments, (self, arguments)

    def do_construction(self, compiler, instance, member_inits):
        assert not member_inits

    def coerce_to(self, compiler, container, type):
        if type == self:
            return container
        return None

class MetaType(NativeType):

    def __init__(self, the_type):
        self.the_type = the_type

    def call_constructor(self, compiler, container, args):
        the_type = container.type.the_type
        obj = the_type.allocate(compiler, safe_typename(the_type) + '_inst')

        tmp = Temporary(the_type, obj)