Conversation
The new name lookup method is rewritten in C; this makes it faster; but, more importantly, it also displays a more readable error message when the name does not exist in the module (see #180).
* Fix static object GC preservation * Move utility functions below exported function * Remove debug logging * Extract helper code from main code * Add comments
07faa22 to
48ed8aa
Compare
mschubert
approved these changes
Mar 16, 2021
Collaborator
mschubert
left a comment
There was a problem hiding this comment.
This looks good to me - but I'm far from an expert on the R internals C code
Owner
Author
|
Checks successfully run with |
radbasa
pushed a commit
to Appsilon/box
that referenced
this pull request
Jul 1, 2024
Rewrite name lookup in module object The new name lookup method is rewritten in C; this makes it faster; but, more importantly, it also displays a more readable error message when the name does not exist in the module (see klmr#180).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrite of the name lookup method in C.
This
All tests run. Unfortunately executing the independent benchmark code reproducibly segfaults, so I’m not yet confident that the code is error-free. In particular, I’m not sure that my protection of the static
current_frame_funfrom GC is sufficient (‘rlang’ does a lot more than just callPROTECTto achieve this).Furthermore, the code should probably be refactored to cache the
sys.call(-1L)call in the same way as it caches thesys.frame(-1L)call.Closes #180.