mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-19 14:25:18 +01:00
Monotonic codegen now passing compile stage
This commit is contained in:
parent
97a48983d2
commit
8e8ec9b7b8
8 changed files with 189 additions and 219 deletions
|
|
@ -70,22 +70,6 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
|
|||
let inputs = util::inputs_ident(name);
|
||||
let (_, tupled, pats, _) = util::regroup_inputs(&task.inputs);
|
||||
|
||||
// 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!())
|
||||
// };
|
||||
let (let_instant, instant) = (quote!(), quote!());
|
||||
|
||||
let locals_new = if task.locals.is_empty() {
|
||||
quote!()
|
||||
} else {
|
||||
|
|
@ -99,12 +83,11 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
|
|||
#t::#name => {
|
||||
let #tupled =
|
||||
#inputs.get_unchecked(usize::from(index)).as_ptr().read();
|
||||
#let_instant
|
||||
#fq.split().0.enqueue_unchecked(index);
|
||||
let priority = &rtic::export::Priority::new(PRIORITY);
|
||||
#app_path::#name(
|
||||
#locals_new
|
||||
#name::Context::new(priority #instant)
|
||||
#name::Context::new(priority)
|
||||
#(,#pats)*
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue