Ticket #1644 (new RFC)

Opened 12 years ago

Last modified 10 years ago

[RFC] Text format serializer for PASM/PIR constants

Reported by: plobsing Owned by:
Priority: normal Milestone:
Component: imcc Version: 2.3.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

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.

Attachments

pasmserializer.pmc Download (6.2 KB) - added by plobsing 12 years ago.
Serializer POC
pasmserializer_test.pir Download (0.7 KB) - added by plobsing 12 years ago.
demonstration of serializer functionality
pasmserializer_output.txt Download (262 bytes) - added by plobsing 12 years ago.
output of demonstration
pasmserializer.2.pmc Download (6.0 KB) - added by plobsing 12 years ago.
pasmserializer_output.2.txt Download (254 bytes) - added by plobsing 12 years ago.

Change History

Changed 12 years ago by plobsing

Serializer POC

Changed 12 years ago by plobsing

demonstration of serializer functionality

Changed 12 years ago by plobsing

output of demonstration

  Changed 12 years ago by plobsing

In r46776, freezing PMCs was made more breadth-first. The update to PASMSerializer reflects this by holding PMC contents in one place.

Changed 12 years ago by plobsing

Changed 12 years ago by plobsing

follow-up: ↓ 3   Changed 11 years ago by cotto

plobsing, could you put this code into a branch on github? I'd like to see where we can go with this idea.

in reply to: ↑ 2   Changed 11 years ago by plobsing

Replying to cotto:

plobsing, could you put this code into a branch on github? I'd like to see where we can go with this idea.

This is now in the pasm-serializer branch.

I've made a few adjustments to the serializer pmc and converted the example into a test.

  Changed 10 years ago by jkeenan

cotto, plobsing:

Are we going to pursue the approach taken in the pasm-serializer branch?

Thank you very much.

kid51

Note: See TracTickets for help on using tickets.