# Path: evaluator/optable.py



from rpython.rlib.listsort import make_timsort_class
from evaluator import optable
        for op in self:
            result.extend(op.dump(consttab))
        return result

class Constant(object):
    def __init__(self, value):
        self.value = value

    def as_arg(self, consttab, vt):
        assert vt == 'constant' or vt == 'string' and isinstance(self.value, (str, unicode))
        return consttab.get(self.value)

    def __repr__(self):
        return "Constant({})".format(self.value)

class Op(object):
    index = None

    def __init__(self, loc, opname, args):
        self.loc = loc
        self.args = args
        self.opname = opname
        (self.opcode, self.has_result,
         self.pattern, self.variadic) = optable.enc[opname]

    def as_arg(self, consttab, vt):
        assert vt == 'vreg'
        assert self.has_result
        return self.index


# Path: evaluator/optable.py



# Path: compiler_program.py
from rpython.rlib.listsort import make_timsort_class
from evaluator import optable

        for op in self:
            result.extend(op.dump(consttab))
        return result

class Constant(object):
    def __init__(self, value):
        self.value = value

    def as_arg(self, consttab, vt):
        assert vt == 'constant' or vt == 'string' and isinstance(self.value, (str, unicode))
        return consttab.get(self.value)

    def __repr__(self):
        return "Constant({})".format(self.value)

class Op(object):
    index = None

    def __init__(self, loc, opname, args):
        self.loc = loc
        self.args = args
        self.opname = opname
        (self.opcode, self.has_result,
         self.pattern, self.variadic) = optable.enc[opname]

    def as_arg(self, consttab, vt):
        assert vt == 'vreg'
        assert self.has_result
        return self.index


    def dump(self, consttab):