putstring unfolds length

which means sys call doesn’t need to
and also interpreter sometimes gets a symbol length
This commit is contained in:
Torsten Ruger
2015-11-16 18:03:29 +02:00
parent f92ea36fe5
commit 303b7eb1f8
3 changed files with 14 additions and 4 deletions

View File

@ -121,7 +121,15 @@ module Interpreter
else
index = get_register(@instruction.index)
end
value = object.get_internal( index )
if object.is_a?(Symbol)
if( index == 2 )
value = object.to_s.length
else
raise "Unsupported action, must convert symbol to word:#{object}"
end
else
value = object.get_internal( index )
end
#value = value.object_id unless value.is_a? Fixnum
set_register( @instruction.register , value )
true