-
Notifications
You must be signed in to change notification settings - Fork 160
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
Show where compiled functions are #745
Comments
Just so you know -- that field in the C level structure is only required to be a unique string (used in workspace save-load). The convention to use filename:function-name is just a convention and is even deliberately violated in a handful of places to make the string shorter (since it appears many times in a saved workspace). |
That's good to know, I knew it didn't have meaning, but I was considering standardising them on filename:function. I didn't know there was any reason not to do that. It would be easy to add another, optional field which would be the actual filename:function info, for when we don't want to put that in the cookie. |
I am not very enthusiastic about changing a function called As to renaming it: Don't forget there's also Looking at |
Or how about replacing all these custom functions with one likely |
Yes, that's probably nicer. I wanted to avoid breaking any code that's using this stuff, but only
|
Closed by #755. |
When GAP displays information about a compiled function, it doesn't show where it comes from. a compiled function, it doesn't show where it came from.
We do store this information at the C level, in the final argument here we find this function is
src/range.c:IS_RANGE
{ "IS_RANGE", "obj", &IsRangeFilt, FuncIS_RANGE, "src/range.c:IS_RANGE" },
But at the moment, this information is not accessible at the GAP level. I would like to make it available, preferably with minimal existing changes. I can think of two sensible options:
Make the
FILENAME_FUNC
equal tosrc/range.c:IS_RANGE
(so technically the filename now isn't a filename)Make
FILENAME_FUNC
equal tosrc/range.c
, and makeSTARTLINE_FUNC
equal toIS_RANGE
(so nowSTARTLINE_FUNC
isn't always an integer). We could renameSTARTLINE_FUNC
toSTART_FUNC
, as it is already undocumented (leaving in an alias..)Just set
FILENAME_FUNC
, and let users go and find the function in the file.I don't really want to introduce a new separate way of getting the C name
If no-one expresses a strong opinion, I plan on doing (2), as that (in my mind) fits most nicely with what's already in GAP in my opinion.
The text was updated successfully, but these errors were encountered: