Automatically load needed vocabularies when deserializing words
parent
2f15ac3c8f
commit
03e956d72e
|
@ -12,7 +12,7 @@ vectors byte-arrays quotations hashtables assocs help.syntax
|
||||||
help.markup splitting io.streams.byte-array io.encodings.string
|
help.markup splitting io.streams.byte-array io.encodings.string
|
||||||
io.encodings.utf8 io.encodings.binary combinators accessors
|
io.encodings.utf8 io.encodings.binary combinators accessors
|
||||||
locals prettyprint compiler.units sequences.private
|
locals prettyprint compiler.units sequences.private
|
||||||
classes.tuple.private ;
|
classes.tuple.private vocabs.loader ;
|
||||||
IN: serialize
|
IN: serialize
|
||||||
|
|
||||||
GENERIC: (serialize) ( obj -- )
|
GENERIC: (serialize) ( obj -- )
|
||||||
|
@ -202,7 +202,7 @@ SYMBOL: deserialized
|
||||||
(deserialize-string) dup intern-object ;
|
(deserialize-string) dup intern-object ;
|
||||||
|
|
||||||
: deserialize-word ( -- word )
|
: deserialize-word ( -- word )
|
||||||
(deserialize) (deserialize) 2dup lookup
|
(deserialize) (deserialize) 2dup [ require ] keep lookup
|
||||||
dup [ 2nip ] [
|
dup [ 2nip ] [
|
||||||
drop
|
drop
|
||||||
2array unparse "Unknown word: " prepend throw
|
2array unparse "Unknown word: " prepend throw
|
||||||
|
|
Loading…
Reference in New Issue