# Path: luna/objects.py
# class LuaValue(object):
# class LBoolean(LuaValue):
# class LNil(LuaValue):
# class LNumber(LuaValue):
# class LString(LuaValue):
# class LVar(LuaValue):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __iter__(self):
#     def __repr__(self):
#     def __init__(self, value):
#     def __hash__(self):
#     def __init__(self, value):
#     def __hash__(self):
#     def __init__(self, value):
#     def __hash__(self):
#     def __init__(self, value):
#     def __hash__(self):
# 
# Path: luna/stdlib/builtin.py
# def lua_print(luavalue):
# 
# Path: luna/vm/opcodes.py
# class OpCode(object):
# class BinaryAdd(OpCode):
# class BinarySubtract(OpCode):
# class Call(OpCode):
# class LoadConst(OpCode):
# class LoadName(OpCode):
# class PopBlock(OpCode):
# class SetupDo(OpCode):
# class StoreName(OpCode):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __iter__(self):
#     def __repr__(self):
#     def __init__(self, index):
#     def __init__(self, index):
#     def __init__(self, index):


from luna import objects as obj
from luna.stdlib import builtin
from luna.vm import opcodes as ops


class Frame(object):
    def __init__(self, code, consts, vars):
        self.code = code
        self.consts = consts
        self.vars = vars

        self.pc = 0
        self.env = {}
        self.stack = []

    def run(self):
        while self.pc < len(self.code):
            op = self.code[self.pc]

            if type(op) == ops.BinaryAdd:
                x = self.stack.pop()
                y = self.stack.pop()

# Path: luna/objects.py
# class LuaValue(object):
# class LBoolean(LuaValue):
# class LNil(LuaValue):
# class LNumber(LuaValue):
# class LString(LuaValue):
# class LVar(LuaValue):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __iter__(self):
#     def __repr__(self):
#     def __init__(self, value):
#     def __hash__(self):
#     def __init__(self, value):
#     def __hash__(self):
#     def __init__(self, value):
#     def __hash__(self):
#     def __init__(self, value):
#     def __hash__(self):
# 
# Path: luna/stdlib/builtin.py
# def lua_print(luavalue):
# 
# Path: luna/vm/opcodes.py
# class OpCode(object):
# class BinaryAdd(OpCode):
# class BinarySubtract(OpCode):
# class Call(OpCode):
# class LoadConst(OpCode):
# class LoadName(OpCode):
# class PopBlock(OpCode):
# class SetupDo(OpCode):
# class StoreName(OpCode):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __iter__(self):
#     def __repr__(self):
#     def __init__(self, index):
#     def __init__(self, index):
#     def __init__(self, index):


# Path: luna/vm/frame.py
from luna import objects as obj
from luna.stdlib import builtin
from luna.vm import opcodes as ops



class Frame(object):
    def __init__(self, code, consts, vars):
        self.code = code
        self.consts = consts
        self.vars = vars

        self.pc = 0
        self.env = {}
        self.stack = []

    def run(self):
        while self.pc < len(self.code):
            op = self.code[self.pc]

            if type(op) == ops.BinaryAdd:
                x = self.stack.pop()
                y = self.stack.pop()

                v = obj.LNumber(y.value + x.value)