jasmin icon indicating copy to clipboard operation
jasmin copied to clipboard

Stack alloc: option to print in JSON format

Open eponier opened this issue 2 years ago • 9 comments

eponier avatar Nov 29 '23 15:11 eponier

Ok, I will print to a dedicated file.

What do you have in mind for the test? Testing this is valid JSON, that it prints the same information that the option we already have, something else?

eponier avatar Nov 30 '23 10:11 eponier

I don’t have anything in mind beyond the following invariant of software engineering: untested features eventually break.

vbgl avatar Nov 30 '23 10:11 vbgl

I implemented what you suggested.

And I added a test that checks that -print-stack-alloc and -json-stack-alloc stay in sync. I find the implementation dirty (the parsing of JSON is written in OCaml and I call ocaml to interpret it), but I don't know how to do it in a cleaner way. The test is not run by default because I don't think we will touch that part really often.

eponier avatar Nov 30 '23 15:11 eponier

Are we happy with this one ?

bgregoir avatar Dec 05 '23 04:12 bgregoir

I now regret to have suggested to test that feature…

vbgl avatar Dec 05 '23 08:12 vbgl

If you find the tests too ugly, I can just drop them. Another option, suggested by Benjamin last week, is to test the output like we do for the SCT checker.

eponier avatar Dec 05 '23 09:12 eponier

I'd like to close this one, I think the consensus is rejection. @bgregoir, you mentioned that you wanted to discuss with Tiago about this PR, did you do it?

eponier avatar Feb 07 '24 13:02 eponier

@bgregoir ping

eponier avatar Feb 20 '24 15:02 eponier

I forgot, I should do it.

bgregoir avatar Feb 20 '24 16:02 bgregoir

This has been stale for too long, I'm closing. Please reopen if needed.

eponier avatar Sep 18 '25 13:09 eponier