- Notifications
You must be signed in to change notification settings - Fork564
[CoreCLR] Code cleanup and filling-in gaps#10148
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
543b10a toa7599fbCompareThis needs to be revisited after the GC bridge is in. It is alsopossible that there is a problem in JI / Mono.Android.dll whichcauses this issue.
fc706c4 to43dfeccCompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR performs a comprehensive code cleanup by converting function parameter types and log messages to use std::string_view literal (sv) syntax and by removing unused or redundant parameters. Key changes include:
- Updating function signatures to replace const char* with std::string_view and removal of unused parameters.
- Converting logging format strings throughout the codebase to use the new sv literal.
- Minor refactoring in host and assembly-related source files to improve code consistency.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/native/clr/include/runtime-base/util.hh | Updated set_environment_variable_for_directory() parameter type to use std::string_view. |
| src/native/clr/include/host/runtime-util.hh | Updated get_class_from_runtime_field() parameter type to std::string_view. |
| src/native/clr/include/host/assembly-store.hh | Removed the force_rw parameter from get_assembly_data() to simplify the API. |
| src/native/clr/host/typemap.cc | Updated log_debug() and log_warn() calls to include sv literal suffix. |
| src/native/clr/host/runtime-util.cc | Updated get_class_from_runtime_field() to use std::string_view and .data() accordingly. |
| src/native/clr/host/pinvoke-override.cc | Converted logging calls to use the sv literal and ensured consistent formatting. |
| src/native/clr/host/os-bridge.cc | Updated include directive and logging calls to use RuntimeUtil and sv literal suffix. |
| src/native/clr/host/internal-pinvokes.cc | Disabled a problematic log call (with appropriate comments) and updated logging syntax. |
| src/native/clr/host/host.cc | Added [[maybe_unused]] attributes, updated logging calls to sv literal, and refined env var usage. |
| src/native/clr/host/host-jni.cc | Marked JNI methods with TODO comments for future implementation. |
| src/native/clr/host/fastdev-assemblies.cc | Updated logging calls to use sv literal suffix consistently. |
| src/native/clr/host/assembly-store.cc | Removed force_rw parameter use in get_assembly_data() and updated log messages to sv literal. |
Comments suppressed due to low confidence (1)
src/native/clr/include/host/assembly-store.hh:27
- The removal of the 'force_rw' parameter from get_assembly_data() alters its public API. Please confirm that this change is intentional and that all call sites no longer require the force_rw behavior.
static auto get_assembly_data (AssemblyStoreSingleAssemblyRuntimeData const& e, std::string_view const& name, bool force_rw = false) noexcept -> std::tuple<uint8_t*, uint32_t>;Uh oh!
There was an error while loading.Please reload this page.
a3d4825 intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This PR performs a comprehensive code cleanup by converting function parameter types and log messages to use std::string_view literal (sv) syntax and by removing unused or redundant parameters. Key changes include: