       b.push val
   ArrayLoadOpcode: (b) ->
     temp = b.new_temp()
-    b.add_stmt """
-    var idx = #{b.pop()};
-    var obj = rs.check_null(#{b.pop()});
+    b.add_stmt new Expr """
+    var idx = $0;
+    var obj = rs.check_null($1);
     var array = obj.array;
     if (!(0 <= idx && idx < array.length))
       java_throw(rs, 'java/lang/ArrayIndexOutOfBoundsException',
         idx + " not in length " + array.length + " array of type " + obj.type.toClassString());
-    #{temp} = array[idx]
-    """
+    $2 = array[idx]
+    """, b.pop(), b.pop(), temp
     if @name.match /[ld]aload/ then b.push2 temp else b.push temp
   UnaryBranchOpcode: (b, idx) ->
     cmpCode = @name[2..]

        labels.push target

    for idx, i in labels
      @blocks.push new BasicBlock @, idx
      @instr2block[idx] = i
      # we initially assume all blocks are connected linearly.
      # compiling the individual instructions will adjust this as needed.
      if @blocks.length > 1
        @blocks[@blocks.length - 2].next.push idx

    current_block = -1
    method.code.each_opcode (idx, oc) =>


        block_chain = new BlockChain m

        block_chain.compile()

        temps = block_chain.get_all_temps()

        """
        #{name}: function(#{block_chain.param_names.join ", "}) {
          var label = 0;
          #{if temps.length > 0 then "var #{temps.join ", "};" else ""}
          while (true) {
