Replace deprecated format structures and functions in test cases.#85
Replace deprecated format structures and functions in test cases.#85gareth-rees wants to merge 4 commits intomasterfrom
Conversation
The object format variant structures (mps_fmt_A_s, mps_fmt_B_s, mps_fmt_auto_header_s) and the functions taking them as arguments (mps_fmt_create_A, mps_fmt_create_B, mps_fmt_create_auto_header) were deprecated in release 1.112.0. Using the recommended interface mps_fmt_create_k in test cases improves the coverage of that interfaces, makes it easy to remove the deprecated interfaces if needed, and prepares the test cases for the addition of more format methods if needed. Additionally, remove copy methods and associated code for counting the number of copies, as copy methods are not called and so this code is unreachable or ineffective.
54afc12 to
b4bda47
Compare
|
There is no issue connecting this pull request to customer requirements, however @gareth-rees ' paragraph 2 above explains why this PR is an improvement. |
…iew and to check it with CI.
|
Reviewing with @UNAA008 and @thejayps . I'm taking the "does it compile and run" role. On platform.lii6gc: On plaform.lii6ll: Some of these problems are not to do with this branch and pull request, but are present in master and shown up by work on #116 . But one of these at least is clearly local to this branch. |
thejayps
left a comment
There was a problem hiding this comment.
What is the reason for deleting fmtno.c and fmtno.h?
rptb1
left a comment
There was a problem hiding this comment.
Fails to build and link. See #85 (comment) .
Introduces numerous test failures on Windows. See https://github.com/Ravenbrook/mps/actions/runs/4016780980/jobs/6900268157#step:3:459
These need diagnosing and this branch needs revising.
|
Btw, this illustrates why I have been concentrating on CI, merge procedures, and review, to make up for lack of coverage and check these recent PRs thoroughly before merging. |
test/function/106.c
Outdated
| die(mps_thread_reg(&thread, arena), "register thread"); | ||
| cdie(mps_root_create_thread(&root, arena, thread, stack_pointer), "thread root"); | ||
| die(mps_fmt_create_A(&format, arena, &fmtLO), "create format"); | ||
| cdie(make_format_header(&format, arena), "create format"); |
There was a problem hiding this comment.
105.c and 107.c transformed mps_fmt_create_A into make_format, but this uses make_format_header, and fails to compile. Format A doesn't have a header field, so this is probably a mistake. Can you confirm @gareth-rees ?
This is failing on master. See https://github.com/Ravenbrook/mps/actions/runs/3939501021/jobs/6739430364#step:6:865 . No action needed in this branch. |
I'm stopping work now but I have a suspicion that this might be to do with the difference in Line 77 in 7d91d2e but Linux to 8 Line 241 in 7d91d2e When e.g. the Dylan objects are created with alignment 8, the MPS will complain on Windows and not on Linux. So perhaps somewhere an alignment has been dropped. There's another issue that we ought to have a good explanation of why these alignments vary by platform. |
The object format variant structures (
mps_fmt_A_s,mps_fmt_B_s,mps_fmt_auto_header_s) and the functions taking them as arguments (mps_fmt_create_A,mps_fmt_create_B,mps_fmt_create_auto_header) were deprecated in release 1.112.0.Using the recommended interface
mps_fmt_create_kin test cases improves the coverage of that interface, makes it easy to remove the deprecated interfaces if needed, and prepares the test cases for the addition of more format methods if needed.Additionally, remove copy methods and associated code for counting the number of copies, as copy methods are not called and so this code is unreachable or ineffective.