Common Lisp Package: ELEPHANT-SERIALIZER2

README:

FUNCTION

Private

COMPATIBLE-UNICODE-SUPPORT-P

This is a crude hack and can be improved later, but we assume if you have code pages > 0 you need or use a 32-bit encoding. I'm assuming that 16-bit unicode supporting lisps only support code page 0 and do not use conjugate pair coding and variable length unicode string representations (formal utf-16)

DESERIALIZE

Deserialize a lisp value from a buffer-stream.

GET-CIRCULARITY-HASH

Get a clean hash for object serialization

GET-CIRCULARITY-VECTOR

Get a fresh vector

INT-BYTE-SPEC (POSITION)

Shared byte-spec peformance hack; not thread safe so removed from use for serializer2

RELEASE-CIRCULARITY-HASH

Return the hash to the queue for reuse

RELEASE-CIRCULARITY-VECTOR

Don't need to erase, just reset fill-pointer as it determines extent of valid data

SERIALIZE

Serialize a lisp value into a buffer-stream.

SERIALIZE-BIGNUM

Serialize bignum to buffer stream

SERIALIZE-STRING

Try to write each format type and bail if code is too big

SERIALIZE-TO-UTF16LE

Serialize to utf16le compliant format unless contains code pages > 0

SERIALIZE-TO-UTF32LE

Serialize to utf32 compliant format unless contains code pages > 0

SERIALIZE-TO-UTF8

Standard serialization

SLOTS-AND-VALUES (O)

List of slot names followed by values for object

STRUCT-SLOTS-AND-VALUES (OBJECT)

List of slot names followed by values for structure object

TRANSLATE-AND-INTERN-SYMBOL

Service for the serializer to translate any renamed packages or symbols and then intern the decoded symbol.

VALID-PERSISTENT-REFERENCE-P (OBJECT SC)

Ensures that object can be written as a reference into store sc

Undocumented

ARRAY-TYPE-FROM-BYTE (B)

BYTE-FROM-ARRAY-TYPE (TY)

DESERIALIZE-BIGNUM

DISABLE-DESERIALIZER-TRACING

ENABLE-DESERIALIZER-TRACING

PRINT-POST-DESERIALIZE-VALUE

SIGNAL-CROSS-REFERENCE-ERROR (OBJECT SC)

MACRO

Private

Undocumented

GC-MARK-NEW-WRITE (INST)

GENERIC-FUNCTION

Private

DATABASE-VERSION (SC)

Data stores implement this to store the serializer version. The protocol requires that data stores report their database version. On new database creation, the database is written with the *elephant-code-version* so that is returned by database-version. If a legacy database does not have a version according to the method then it should return nil

Undocumented

COMPUTE-SLOTS (CLASS)

CONTROLLER-RECREATE-INSTANCE (SC OID &OPTIONAL CLASSNAME)

DESERIALIZE-STRING (TYPE BSTREAM &OPTIONAL TEMP-STRING)

GET-CACHED-INSTANCE (SC OID)

RECREATE-INSTANCE-USING-CLASS (CLASS &REST INITARGS &ALLOW-OTHER-KEYS)

SLOT-ACCESSOR

Private

CONTROLLER-MARKING-P (OBJECT)

Used by the online GC to keep track of whether we're in the mark phase of a mark and sweep pass

SETFCONTROLLER-MARKING-P (NEW-VALUE OBJECT)

Used by the online GC to keep track of whether we're in the mark phase of a mark and sweep pass

OID (OBJECT)

All persistent objects have an oid

SETFOID (NEW-VALUE OBJECT)

All persistent objects have an oid

Undocumented

SLOT-DEFINITION-ALLOCATION (SLOTD)

SETFSLOT-DEFINITION-ALLOCATION (NEW-VALUE STANDARD-SLOT-DEFINITION)

SLOT-DEFINITION-NAME (SLOT-DEFINITION)

SETFSLOT-DEFINITION-NAME (NEW-VALUE SLOT-DEFINITION)

VARIABLE

Private

*CIRCULARITY-HASH-QUEUE*

Circularity ids for the serializer.

*CIRCULARITY-INITIAL-HASH-SIZE*

This is the default size of the circularity cache used in the serializer

*CIRCULARITY-VECTOR-QUEUE*

A list of vectors used for linear deserialization. This works nicely because all ID's are written in integer order to the stream, so we can just write the next one into the array already knowing what the ID is

Undocumented

*SERIALIZER-FAST-LOCK*

*TAG-TABLE*

*TRACE-DESERIALIZER*

NATIVE-STRING-TYPE

CONDITION

Private

ELEPHANT-TYPE-DESERIALIZATION-ERROR

This error is signaled when a tag is not recognized in the deserializer. This error is more specific than the generalized error condition and aids in diagnosis. This may be due to a mistake in counts in the serializer or a corruption of the source data

CONSTANT

Private

Undocumented

+2^31+

+2^32+

+2^63+

+2^64+

+ADJUSTABLE-P+

+ARRAY+

+CHAR+

+CLASS+

+COMPLEX+

+CONS+

+DOUBLE-FLOAT+

+FILL-POINTER-P+

+FIXNUM32+

+FIXNUM64+

+HASH-TABLE+

+NEGATIVE-BIGNUM+

+NIL+

+OBJECT+

+PATHNAME+

+PERSISTENT+

+PERSISTENT-REF+

+POSITIVE-BIGNUM+

+RATIONAL+

+RESERVED-DBINFO+

+SHORT-FLOAT+

+SINGLE-FLOAT+

+STRUCT+

+SYMBOL+

+UTF16-STRING+

+UTF32-STRING+

+UTF8-STRING+