node/lib/metasm/metasm/cpu/x86_64/compile_c.rb
# removes elements from @state.inuse, free @state.used if unreferenced
# must be the exact object present in inuse
removes elements from @state.inuse, free @state.used if unreferenced
must be the exact object present in inuse
removes elements from @state . inuse free @state . used if unreferenced must be the exact object present in inuse
def unuse(*vals)
		vals.each { |val|
			val = val.modrm if val.kind_of? Address
			@state.inuse.delete val
		}
		exempt = @state.bound.values.map { |r| r.val }
		exempt << 4
		exempt << 5 if @state.saved_rbp
		@state.used.delete_if { |regval|
			next if exempt.include? regval
			not @state.inuse.find { |val|
				case val
				when Reg; val.val == regval
				when ModRM; (val.b and val.b.val == regval) or (val.i and val.i.val == regval)
				else raise 'internal error - inuse ' + val.inspect
				end
			}
		}
	end
def unuse ( * vals ) vals . each { | val | val = val . modrm if val . kind_of? Address @state . inuse . delete val } exempt = @state . bound . values . map { | r | r . val } exempt << 4 exempt << 5 if @state . saved_rbp @state . used . delete_if { | regval | next if exempt . include? regval not @state . inuse . find { | val | case val when Reg ; val . val == regval when ModRM ; ( val . b and val . b . val == regval ) or ( val . i and val . i . val == regval ) else raise 'internal error - inuse ' + val . inspect end } } end
removes elements from @state.inuse, free @state.used if unreferenced
must be the exact object present in inuse
removes elements from @state . inuse free @state . used if unreferenced must be the exact object present in inuse
# XXX cache exempt
vals