 
 root = exports ? window.opcodes = {}
 
+INDENT_SIZE = 4
+
 class RuntimeState
   constructor: ->
     @_cs = []
     @locals = []
+    @var_count = 0
+
     @blocks = []
     @block_start_idxs = []
     @new_block 0


opcodes = {
  nop: { execute: -> }
  aconst_null: { execute: (rs) -> rs.push null }
  iconst_m1: { execute: (rs) -> rs.push new Primitive -1 }
  iconst_0: { execute: (rs) -> rs.push new Primitive 0 }
  iconst_1: { execute: (rs) -> rs.push new Primitive 1 }


  toString: -> @val

class Variable extends Expr

  constructor: (id) ->
    @strId = ""
    while id >= 0
      @strId = String.fromCharCode((id % 26) + 97) # 97 = 'a'
      id -= 26

  toString: -> @strId

class BinaryOp extends Expr
  constructor: (@op_func, @left, @right) ->

