New .mrb format. #964
Conversation
|
It's nice! |
|
Nit-picking, it's better to use uint8_t instead of "unsigned char". Type "char" is not always 8bits in C99 spec. And I wonder it could separate stdio dependency from the patch. But it should be discussed by the another issue after this patch is merged. |
|
BTW, Just for confirmation of consent. |
|
I think so. Current Matz version will be obsolete. |
|
Do I understand it right that the main idea behind this new format is to make it possible to better integrate debugging support by having more flexible sections? At the same time you are shrinking the overall size by changing to a binary format? I would just like to summarise the discussion from #944 due to the reason that it seems to me that two targets are tried to been reached which are eliminate each other -> having more flexibility and at the same time making the code more compact. |
|
This patch gave extendable and compaction. |
|
@monaka I changed code for useless unsigned char |
There was a problem hiding this comment.
Thank you! I already fixed and pushed it.
|
I've not tested. But it looks ok except a point I commented in the diff. |
|
I tried to build. Totally this works. But I have some comments. I'll send pull request to branch masuidrive:new_mrb_format tomorrow. |
|
@monaka Thank you. |
|
@matz |
|
I sent pull request to masuidrive:new_mrb_format branch. |
Patches to new_mrb_format
|
@matz Could you review it? |
|
That image is too messy, so I made a diagram in Dia: Download the Dia file here (use "save as" functionality of your browser): |
|
Now binary mrbc dump format is available. |
|
👍 |
|
I would like to implement ROM-able ISEQ on my fork. My plan is:
Implementation
I think same format for both *.mrb and *.c is OK for simplicity as current mruby. But endian field is meaningless for *.mrb, and CRC is meaning for *.c. I'm not sure separate representation is better or not. Any comment? |

This patch is made from #944.
It's cleared Matz request.
And I made .mrb binary file dump tool.
https://github.com/masuidrive/mrbdump
It's dump and format verification tool.