Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Rewrite name lookup in module object#184

Merged
klmr merged 12 commits intomainfrom
feature-lookup-error
Mar 17, 2021
Merged

Rewrite name lookup in module object#184
klmr merged 12 commits intomainfrom
feature-lookup-error

Conversation

@klmr
Copy link
Owner

@klmr klmr commented Mar 4, 2021

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_fun from GC is sufficient (‘rlang’ does a lot more than just call PROTECT to achieve this).

Furthermore, the code should probably be refactored to cache the sys.call(-1L) call in the same way as it caches the sys.frame(-1L) call.

Closes #180.

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).
@klmr klmr changed the title WIP: Rewrite name lookup in module object Rewrite name lookup in module object Mar 4, 2021
@klmr klmr force-pushed the feature-lookup-error branch from 07faa22 to 48ed8aa Compare March 14, 2021 00:30
@klmr klmr marked this pull request as ready for review March 14, 2021 00:36
@klmr klmr requested a review from mschubert March 14, 2021 11:27
Copy link
Collaborator

@mschubert mschubert left a comment

Choose a reason for hiding this comment

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

This looks good to me - but I'm far from an expert on the R internals C code

@klmr
Copy link
Owner Author

klmr commented Mar 17, 2021

Checks successfully run with -fsanitize=address.

@klmr klmr merged commit 2918ef2 into main Mar 17, 2021
@klmr klmr deleted the feature-lookup-error branch March 17, 2021 22:02
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve error message for undefined module exports

2 participants