Skip to content

Conversation

@nbriggs
Copy link
Collaborator

@nbriggs nbriggs commented Mar 16, 2021

There were a number of sub-optimal behaviors in the package/atom handling code used in C to access atoms in the running image. These changes make error reporting more explanatory and remove some unneeded functions.

nbriggs added 2 commits March 16, 2021 15:29
Remove S_TOPVAL and S_MAKEATOM which only existed to deal with an old issue
with dbx where you supposedly couldn't enter a string with "\" in it.

Remove countchar(), which is functionally identical to  strlen(), and adjust
code that used it.

Adjust return type of MAKEATOM() to be the LispPTR that it should be, instead of int.

Limit find_package_from_name() to examining only the number of entries that are
present in the *PACKAGE-FROM-INDEX* array, instead of walking off the end.

MakeAtom68k() now drops into uraid() if asked to look up an atom that does not exist
(Make... is a misnomer, it will never *make* the atom, only lookup an existing
one)
Copy link
Member

@masinter masinter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how to test this. I doubt that it will work with "Fat" strings of 16 bit characters.

This is just stuff in URaid though, right?

@nbriggs
Copy link
Collaborator Author

nbriggs commented Mar 29, 2021

@masinter -- the S_TOPVAL and S_MAKEATOM were used from the debugger (dbx) and are no longer necessary.
The other changes are in code used by the rest of the maiko code during startup initialization -- they get native pointers to Lisp atoms in the loaded VM that are used for various purposes. The new error handling will show up if you try to use a standard lde instead of ldeinit to do the step in the loadup which requires ldeinit.

@masinter
Copy link
Member

I'd like to get rid of ldeinit if possible, but that's another issue

@masinter masinter merged commit c4873d0 into master Mar 29, 2021
@nbriggs nbriggs deleted the atom-handling branch April 8, 2021 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants