@@ -2,6 +2,7 @@ use std::marker::PhantomData;
2
2
3
3
use crate :: syntax:: { ast:: App , Context } ;
4
4
use crate :: { analyze:: Analysis , codegen:: bindings:: interrupt_mod, codegen:: util} ;
5
+ use proc_macro:: Span ;
5
6
use proc_macro2:: TokenStream as TokenStream2 ;
6
7
use quote:: quote;
7
8
@@ -195,8 +196,7 @@ pub fn codegen(ctxt: Context, app: &App, analysis: &Analysis) -> TokenStream2 {
195
196
let local_tasks_on_same_executor: Vec < _ > = app
196
197
. software_tasks
197
198
. iter ( )
198
- //.filter(|(_, t)| t.args.is_local_task && t.args.priority == priority)
199
- . map ( |( _, t) | t)
199
+ . filter ( |( _, t) | t. args . is_local_task && t. args . priority == priority)
200
200
. collect ( ) ;
201
201
202
202
if !local_tasks_on_same_executor. is_empty ( ) {
@@ -212,8 +212,9 @@ pub fn codegen(ctxt: Context, app: &App, analysis: &Analysis) -> TokenStream2 {
212
212
} ) ;
213
213
let tasks = local_tasks_on_same_executor
214
214
. iter ( )
215
- . map ( |task| {
215
+ . map ( |( ident , task) | {
216
216
// Copied mostly from software_tasks.rs
217
+ let internal_spawn_ident = util:: internal_task_ident ( ident, "spawn" ) ;
217
218
let context = & task. context ;
218
219
let attrs = & task. attrs ;
219
220
let cfgs = & task. cfgs ;
@@ -233,7 +234,7 @@ pub fn codegen(ctxt: Context, app: &App, analysis: &Analysis) -> TokenStream2 {
233
234
#( #attrs) *
234
235
#( #cfgs) *
235
236
#[ allow( non_snake_case) ]
236
- fn #name #generics( & self #( , #inputs) * ) {
237
+ fn #ident #generics( & self #( , #inputs) * ) {
237
238
// SAFETY: This is safe to call since this can only be called
238
239
// from the same executor
239
240
unsafe { #internal_spawn_ident( #( #input_vals, ) * ) } // <-- TODO strip the types
0 commit comments