Index: lang/ruby/asc3to2/actionbuffer.rb
===================================================================
--- lang/ruby/asc3to2/actionbuffer.rb (revision 6561)
+++ lang/ruby/asc3to2/actionbuffer.rb (revision 6611)
@@ -34,4 +34,6 @@
 	def initialize(bytes_array)
 		@bytes = bytes_array
+		@now_bytes = []
+		
 		@disasm_actions = []
 		@current_dict = nil
@@ -43,4 +45,5 @@
 	end
 
+	attr_reader :disasm_actions
 
 	# indent utils
@@ -71,11 +74,19 @@
 		@address += 1
 		
-		@bytes.shift
+		ret = @bytes.shift
+		@now_bytes << ret
+		
+		ret
 	end
 	
 	def read_short
 		@address += 2
-		
-		@bytes.shift | (@bytes.shift << 8)
+
+		low  = @bytes.shift
+		high = @bytes.shift
+		@now_bytes << low
+		@now_bytes << high
+		
+		low | (high << 8)
 	end
 
@@ -87,6 +98,15 @@
 	def read_int32
 		@address += 4
-		
-		@bytes.shift | (@bytes.shift << 8) | (@bytes.shift << 16) | (@bytes.shift << 24)
+
+		b1 = @bytes.shift
+		b2 = @bytes.shift
+		b3 = @bytes.shift
+		b4 = @bytes.shift
+		@now_bytes << b1
+		@now_bytes << b2
+		@now_bytes << b3
+		@now_bytes << b4
+		
+		b1 | (b2 << 8) | (b3 << 16) | (b4 << 24)
 	end
 
@@ -103,4 +123,5 @@
 		db = ""
 
+		8.times{|i| @now_bytes << @bytes[i]}
 		8.times{arr << @bytes.shift.chr}
 		4.times{|i| db << arr[4+i]}
@@ -147,4 +168,7 @@
 		check_indent(@prev_address)
 
+		a.bytecode = @now_bytes
+		@now_bytes = []
+		
 		a.address = @prev_address
 		a.indent_level = indent
@@ -159,5 +183,5 @@
 	def dump(prefix = "")
 		@disasm_actions.each{|act|
-			puts "#{prefix}%04X: #{'  '*act.indent_level}#{act}" % act.address
+			puts "#{prefix}%04X: #{'  '*act.indent_level}#{act}  # #{act.bytecode.map{|c| "%02X" % c}.join(' ')}" % act.address
 		}
 	end
@@ -275,4 +299,5 @@
 	attr_accessor :indent_shift
 	attr_reader   :indent_span
+	attr_accessor :bytecode
 
 	def initialize
@@ -307,4 +332,12 @@
 	def append(type, data)
 		@datas << {:type => type, :data => data}
+	end
+	
+	def length
+		@datas.length
+	end
+	
+	def [](i)
+		@datas[i]
 	end
 	
@@ -372,4 +405,7 @@
 	end
 	
+	attr_reader :body_len
+	attr_reader :name
+	
 	def to_s
 		"defineFunction2 name='#{@name}', len=#{@body_len}"
