Keep comments

This commit is contained in:
Emil Fresk 2021-04-22 18:38:42 +02:00
parent 6aa0fb450f
commit 50f26e78ed
6 changed files with 12 additions and 1 deletions

View file

@ -26,6 +26,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
}) })
.collect::<Vec<_>>(); .collect::<Vec<_>>();
// For future use
// let doc = format!( // let doc = format!(
// "Software tasks to be dispatched at priority level {}", // "Software tasks to be dispatched at priority level {}",
// level, // level,
@ -53,6 +54,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
) )
}; };
// For future use
// let doc = format!( // let doc = format!(
// "Queue of tasks ready to be dispatched at priority level {}", // "Queue of tasks ready to be dispatched at priority level {}",
// level // level

View file

@ -305,6 +305,7 @@ pub fn codegen(
let user_imports = &app.user_imports; let user_imports = &app.user_imports;
let tq_marker = util::mark_internal_ident(&util::timer_queue_marker_ident()); let tq_marker = util::mark_internal_ident(&util::timer_queue_marker_ident());
// For future use
// let doc = format!(" RTIC internal: {}:{}", file!(), line!()); // let doc = format!(" RTIC internal: {}:{}", file!(), line!());
// items.push(quote!(#[doc = #doc])); // items.push(quote!(#[doc = #doc]));

View file

@ -31,6 +31,7 @@ pub fn codegen(app: &App, analysis: &Analysis) -> Vec<TokenStream2> {
} }
for (i, (monotonic, _)) in app.monotonics.iter().enumerate() { for (i, (monotonic, _)) in app.monotonics.iter().enumerate() {
// For future use
// let doc = format!(" RTIC internal: {}:{}", file!(), line!()); // let doc = format!(" RTIC internal: {}:{}", file!(), line!());
// stmts.push(quote!(#[doc = #doc])); // stmts.push(quote!(#[doc = #doc]));

View file

@ -31,7 +31,6 @@ pub fn codegen(
let mangled_name = util::mark_internal_ident(&name); let mangled_name = util::mark_internal_ident(&name);
{ {
// TODO: do we really need this in the single core case
// late resources in `util::link_section_uninit` // late resources in `util::link_section_uninit`
let section = if expr.is_none() { let section = if expr.is_none() {
util::link_section_uninit(true) util::link_section_uninit(true)
@ -56,6 +55,7 @@ pub fn codegen(
let attrs = &res.attrs; let attrs = &res.attrs;
// For future use
// let doc = format!(" RTIC internal: {}:{}", file!(), line!()); // let doc = format!(" RTIC internal: {}:{}", file!(), line!());
mod_app.push(quote!( mod_app.push(quote!(
#[allow(non_upper_case_globals)] #[allow(non_upper_case_globals)]
@ -69,6 +69,7 @@ pub fn codegen(
} }
let r_prop = &res.properties; let r_prop = &res.properties;
// For future use
// let doc = format!(" RTIC internal: {}:{}", file!(), line!()); // let doc = format!(" RTIC internal: {}:{}", file!(), line!());
if !r_prop.task_local && !r_prop.lock_free { if !r_prop.task_local && !r_prop.lock_free {
@ -122,6 +123,7 @@ pub fn codegen(
None => 0, None => 0,
}; };
// For future use
// let doc = format!(" RTIC internal ({} resource): {}:{}", doc, file!(), line!()); // let doc = format!(" RTIC internal ({} resource): {}:{}", doc, file!(), line!());
mod_app.push(util::impl_mutex( mod_app.push(util::impl_mutex(

View file

@ -65,6 +65,7 @@ pub fn codegen(
let mono_type = &monotonic.ty; let mono_type = &monotonic.ty;
let uninit = mk_uninit(); let uninit = mk_uninit();
// For future use
// let doc = format!(" RTIC internal: {}:{}", file!(), line!()); // let doc = format!(" RTIC internal: {}:{}", file!(), line!());
mod_app.push(quote!( mod_app.push(quote!(
#uninit #uninit

View file

@ -35,6 +35,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
}) })
.collect::<Vec<_>>(); .collect::<Vec<_>>();
// For future use
// let doc = "Tasks that can be scheduled".to_string(); // let doc = "Tasks that can be scheduled".to_string();
items.push(quote!( items.push(quote!(
// #[doc = #doc] // #[doc = #doc]
@ -61,6 +62,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
// Static variables and resource proxy // Static variables and resource proxy
{ {
// For future use
// let doc = &format!("Timer queue for {}", monotonic_name); // let doc = &format!("Timer queue for {}", monotonic_name);
let cap = app let cap = app
.software_tasks .software_tasks
@ -71,6 +73,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
let tq_ty = let tq_ty =
quote!(core::mem::MaybeUninit<rtic::export::TimerQueue<#mono_type, #t, #n>>); quote!(core::mem::MaybeUninit<rtic::export::TimerQueue<#mono_type, #t, #n>>);
// For future use
// let doc = format!(" RTIC internal: {}:{}", file!(), line!()); // let doc = format!(" RTIC internal: {}:{}", file!(), line!());
items.push(quote!( items.push(quote!(
#[doc(hidden)] #[doc(hidden)]
@ -80,6 +83,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
let mono = util::monotonic_ident(&monotonic_name); let mono = util::monotonic_ident(&monotonic_name);
let mono = util::mark_internal_ident(&mono); let mono = util::mark_internal_ident(&mono);
// For future use
// let doc = &format!("Storage for {}", monotonic_name); // let doc = &format!("Storage for {}", monotonic_name);
items.push(quote!( items.push(quote!(