 
   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) ->
 

          if m.name is '<init>' then class_name
          else if m.name is '<clinit>' then '__clinit__'
          else m.name
        rs = new RuntimeState
        m.code.each_opcode (idx, oc) ->
          opcodes[oc.name]?.execute rs, oc, idx
        "#{name}: function() {\n#{rs.compile()}\n},"
  "var #{class_name} = {\n#{methods.join "\n"}\n};\n"

# TODO: move to a separate file

        @blocks[d1].in.push idx
        @blocks[d2].in.push idx

    @compile_block(@blocks[0], 1)

  compile_block: (block, indent) ->
    indentation = (" " for i in [0...INDENT_SIZE * indent] by 1).join ''
    if block.in.length <= 1 && block.out.length == 2
      "#{indentation}if (#{block.cond.condFn block.cond.expr}) {\n#{
        @compile_block @blocks[block.out[1]], indent + 1
      }\n#{indentation}} else {\n#{
        @compile_block @blocks[block.out[0]], indent + 1
      }\n#{indentation}}"
    else
      indentation + block

class BasicBlock
  constructor: ->
