petdance/scratch — Issue #296: [RFC] Text format serializer for PASM/PIR constants
Author: petdance
Created: 2011-11-14 06:07:32+00:00
State: open
Labels: imcc, Pri-normal, rfc, Sev-medium

This would allow the freezing and thawing of arbitrary constants that can be held in PBC to and from PIR/PASM.
Attached is a proof of concept PMC to acheive the serialization/deserialization. Currently it only serializes, but it is based on the ImageIO API for object serialization/deserialization and mostly reuses existing tokens from PIR/PASM, so the deserializatoin shouldn't be terribly difficult.

New syntax would also have to be added to demarkate the beginings and ends of constant sections as well as to use constants in code sections. Perhaps '.begin_data(123)', '.end_data', and '$C123'.

I haven't put much work into what the punctuation should be and I'm not quite happy with it yet. I'd appreciate advice in this area especially.

Originally http://trac.parrot.org/parrot/ticket/1644