(serialize) should not be private since concurrency.distributed defines a method
parent
821fb8969c
commit
ca1f3b5af0
|
@ -15,6 +15,8 @@ locals prettyprint compiler.units sequences.private
|
|||
classes.tuple.private ;
|
||||
IN: serialize
|
||||
|
||||
GENERIC: (serialize) ( obj -- )
|
||||
|
||||
<PRIVATE
|
||||
|
||||
! Variable holding a assoc of objects already serialized
|
||||
|
@ -37,9 +39,6 @@ M: id equal? over id? [ [ obj>> ] bi@ eq? ] [ 2drop f ] if ;
|
|||
#! Return the id of an already serialized object
|
||||
<id> serialized get at ;
|
||||
|
||||
! Serialize object
|
||||
GENERIC: (serialize) ( obj -- )
|
||||
|
||||
! Numbers are serialized as follows:
|
||||
! 0 => B{ 0 }
|
||||
! 1<=x<=126 => B{ x | 0x80 }
|
||||
|
@ -304,10 +303,8 @@ SYMBOL: deserialized
|
|||
PRIVATE>
|
||||
|
||||
: deserialize ( -- obj )
|
||||
! [
|
||||
V{ } clone deserialized
|
||||
[ (deserialize) ] with-variable ;
|
||||
! ] with-compilation-unit ;
|
||||
|
||||
: serialize ( obj -- )
|
||||
H{ } clone serialized [ (serialize) ] with-variable ;
|
||||
|
|
Loading…
Reference in New Issue