fix remaining constant issues

all but integer creation
and integer builtins off course
This commit is contained in:
Torsten Ruger
2018-03-31 13:58:08 +03:00
parent cb9f6973d9
commit a5189570c6
5 changed files with 19 additions and 6 deletions

View File

@ -11,6 +11,7 @@ module Parfait
#FIXME: this is "just" for compilation
def initialize(value)
super()
@value = value
end
attr_reader :value
@ -32,16 +33,19 @@ module Parfait
class FalseClass < Data2
#FIXME: this is "just" for compilation
def initialize
super
end
end
class TrueClass < Data2
#FIXME: this is "just" for compilation
def initialize
super
end
end
class NilClass < Data2
#FIXME: this is "just" for compilation
def initialize
super
end
end
end

View File

@ -87,6 +87,8 @@ module Risc
write_String obj
when Parfait::BinaryCode
write_BinaryCode obj
when Parfait::Data2
write_data2 obj
else
write_object obj
end
@ -138,6 +140,12 @@ module Risc
written
end
def write_data2( code )
@stream.write_signed_int_32( MARKER )
write_ref_for( code.get_type )
log.debug "Data2 witten stream 0x#{@stream.length.to_s(16)}"
end
def write_BinaryCode( code )
@stream.write_signed_int_32( MARKER )
write_ref_for( code.get_type )