diff options
author | 2021-08-19 21:32:12 +0200 | |
---|---|---|
committer | 2021-08-20 08:12:13 +0200 | |
commit | cdbd8a2cede668e1181030bd7c439592a8f0e980 (patch) | |
tree | c39efb7e0259faef3f9ca03ac87b9d525c1e6093 /macros/src/codegen/post_init.rs | |
parent | 3bf5a4f7a06fdb5d341d900c3e937d4c9afd2dda (diff) | |
download | rtic-cdbd8a2cede668e1181030bd7c439592a8f0e980.tar.gz rtic-cdbd8a2cede668e1181030bd7c439592a8f0e980.tar.zst rtic-cdbd8a2cede668e1181030bd7c439592a8f0e980.zip |
Use `mark_internal_name` by default for methods in `util` to make usage of these functions more straightforward.
fq_ident is always internal
rq_ident is always internal
monotonic_ident is always internal
inputs_ident is always internal
local_resources_ident is always internal
shared_resources_ident is always internal
monotonic_instants_ident is always internal
tq_ident is always internal
timer_queue_marker_ident is always internal
static_shared_resource_ident is always internal
static_local_resource_ident is always internal
declared_static_local_resource_ident is always internal
Only names, not idents, are now marked as internal
Use same rtic internal everywhere
Diffstat (limited to 'macros/src/codegen/post_init.rs')
-rw-r--r-- | macros/src/codegen/post_init.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/macros/src/codegen/post_init.rs b/macros/src/codegen/post_init.rs index 161068d2..5624b20a 100644 --- a/macros/src/codegen/post_init.rs +++ b/macros/src/codegen/post_init.rs @@ -11,7 +11,7 @@ pub fn codegen(app: &App, analysis: &Analysis) -> Vec<TokenStream2> { // Initialize shared resources for (name, res) in &app.shared_resources { - let mangled_name = util::mark_internal_ident(&util::static_shared_resource_ident(name)); + let mangled_name = util::static_shared_resource_ident(name); // If it's live let cfgs = res.cfgs.clone(); if analysis.shared_resource_locations.get(name).is_some() { @@ -29,7 +29,7 @@ pub fn codegen(app: &App, analysis: &Analysis) -> Vec<TokenStream2> { // Initialize local resources for (name, res) in &app.local_resources { - let mangled_name = util::mark_internal_ident(&util::static_local_resource_ident(name)); + let mangled_name = util::static_local_resource_ident(name); // If it's live let cfgs = res.cfgs.clone(); if analysis.local_resource_locations.get(name).is_some() { @@ -58,7 +58,6 @@ pub fn codegen(app: &App, analysis: &Analysis) -> Vec<TokenStream2> { // Store the monotonic let name = util::monotonic_ident(&monotonic.to_string()); - let name = util::mark_internal_ident(&name); stmts.push(quote!(*#name.get_mut_unchecked() = Some(monotonics.#idx);)); } |