giuseppebarba / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
Other
0 stars 0 forks source link

Implement marshal system for v10 #208

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The design for v10 of the VM relies on a marshal system for data transfer, 
especially ipm.  The marshal system needs to be in the VM with a python API 
available in src/lib/ and a desktop API available in src/tools/.  The marshal 
format does not need to be compatible with Python's.  In fact, there is room 
for byte-savings if a more compact marshal format is designed.

Original issue reported on code.google.com by dwhall...@gmail.com on 11 Jul 2011 at 1:25

GoogleCodeExporter commented 9 years ago
Documentation for the p14p marshal format is documented in 
docs/src/MarshalFormat.rst

Original comment by dwhall...@gmail.com on 11 Jul 2011 at 1:26

GoogleCodeExporter commented 9 years ago
Updated MarshalFormat.rst so that lowercase letters (or opening grouping 
symbol) are for when using one-byte for the size.
Updated src/tools/pmMarshal.py to match the format changes; also added new 
tests for float and code object.
Added src/lib/pmMarshal.py module with dumps() and loads() functions.
Added src/vm/marshal.c,h (fileid 0x1A); stub for loading ops.  implementation 
for dumping is mostly there.  Dumping an 8 and 16-byte int works, the rest is 
untested.

TODO: The rest of dumping.  All of loading;  Make sure to care for sign 
extension.

Original comment by dwhall...@gmail.com on 11 Jul 2011 at 4:42

GoogleCodeExporter commented 9 years ago
Filled out src/vm/marshal.c for all supported data types, dumping and loading.
Created System test t408.

Original comment by dwhall...@gmail.com on 24 Jul 2011 at 1:12

GoogleCodeExporter commented 9 years ago
Removed ifdef around signal/ualarm on posix so that timers worked during system 
tests on posix desktop.
Added __code__ attribute to functions.
Added "__code__" to the list of named objects generated by pmCoCreator.py
Adjusted system test t162 to recognize that function objects have __code__ attr.
Removed a C_ASSERT() from float.c because snprintf() reports the number of 
bytes that would be written if the buffer were unlimited; not the actual bytes 
written.  And added minus one to fit the null terminator.
Fixed heap_markObj() for the case of code objects (which may now occur in RAM).

Original comment by dwhall...@gmail.com on 24 Jul 2011 at 1:42

GoogleCodeExporter commented 9 years ago
This issue was closed by revision d2ba5d5a5474.

Original comment by dwhall...@gmail.com on 24 Jul 2011 at 1:46