-
Notifications
You must be signed in to change notification settings - Fork 178
kernel: replace COPYING tnums by single T_COPYING #2777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f63a852 to
bf3c5f0
Compare
Codecov Report
@@ Coverage Diff @@
## master #2777 +/- ##
=========================================
Coverage ? 75.87%
=========================================
Files ? 481
Lines ? 241174
Branches ? 0
=========================================
Hits ? 182982
Misses ? 58192
Partials ? 0
|
2436dd3 to
9ec8ed8
Compare
This removes a lot of duplicate code, and makes it simpler to add further copying functions in the future. In addition, this is a first small step towards reducing the differences between the "traditional" copying code, and the HPC-GAP copying code; my hope is that we can eventually share a lot of the code to implement them.
9ec8ed8 to
16ffa1a
Compare
|
Just out of interest, what will happen when / if T_COPYING get out into general GAP sessions? (I imagine that could happen if the memory limit is reached during copying) |
|
Good question, I'll try to answer this on multiple levels: First off, I don't think the "memory limit" being reached during copying is an issue: either we double the heap, and resume; or else GAP aborts. End of story. In GAP, Next, the effect of a But now suppose it does escape. We are not really prepared to that (just like we are not prepared for a Of course we could address this: e.g. by moving |
|
Thanks for the extensive feedback. I forgot GAP's "memory is full, type return to continue" messages aren't generated until you next execute a GAP bytecode instruction, so they won't interrupt copying. |
This removes a lot of duplicate code, and makes it simpler to add further copying functions in the future.
Point in case: the semigroups package (the only to implement a non-trivial
CopyObjFuncsentry) gets it wrong (paging @james-d-mitchell ), as it does not use a forwarding pointer approach at al. That is, it violates this invariant:Now, I am not blaming anybody here: the copying logic in the GAP kernel simply is not that easy to understand. In fact, we made the same mistake in the
SingularInterfacepackage. With the changes in this PR, getting it right will be much simplerI have incremented
GAP_KERNEL_MAJOR_VERSIONto detect the new code in the semigroups code. Among the few other packages implementingCopyObjFuncs, only SingularInterface needs a fix.In addition, this is a first small step towards reducing the differences between the "traditional" copying code, and the HPC-GAP copying code; my hope is that we can eventually share a lot of the code to implement them.
This should not be merged before we branch stable-4.10, it's too risky.