mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-19 06:15:45 +01:00
TQ handlers being generated
This commit is contained in:
parent
ef50aeb2e8
commit
b23bb1192c
10 changed files with 157 additions and 140 deletions
|
|
@ -70,19 +70,21 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream
|
|||
let inputs = util::inputs_ident(name);
|
||||
let (_, tupled, pats, _) = util::regroup_inputs(&task.inputs);
|
||||
|
||||
let (let_instant, instant) = if extra.monotonic.is_some() {
|
||||
let instants = util::instants_ident(name);
|
||||
// TODO: Fix for new monotonics
|
||||
// let (let_instant, instant) = if extra.monotonic.is_some() {
|
||||
// let instants = util::instants_ident(name);
|
||||
|
||||
(
|
||||
quote!(
|
||||
let instant =
|
||||
#instants.get_unchecked(usize::from(index)).as_ptr().read();
|
||||
),
|
||||
quote!(, instant),
|
||||
)
|
||||
} else {
|
||||
(quote!(), quote!())
|
||||
};
|
||||
// (
|
||||
// quote!(
|
||||
// let instant =
|
||||
// #instants.get_unchecked(usize::from(index)).as_ptr().read();
|
||||
// ),
|
||||
// quote!(, instant),
|
||||
// )
|
||||
// } else {
|
||||
// (quote!(), quote!())
|
||||
// };
|
||||
let (let_instant, instant) = (quote!(), quote!());
|
||||
|
||||
let locals_new = if task.locals.is_empty() {
|
||||
quote!()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue