@@ -180,7 +180,7 @@ pub(super) fn compile(module: &mut Module<'_>, adapter: &AdapterData) {
180180 compiler. compile_sync_to_sync_adapter ( adapter, & lower_sig, & lift_sig)
181181 }
182182 ( true , true ) => {
183- assert ! ( module. enable_async ) ;
183+ assert ! ( module. tunables . component_model_concurrency ) ;
184184
185185 // In the async->async case, we must compile a couple of helper functions:
186186 //
@@ -209,7 +209,7 @@ pub(super) fn compile(module: &mut Module<'_>, adapter: &AdapterData) {
209209 ) ;
210210 }
211211 ( false , true ) => {
212- assert ! ( module. enable_async ) ;
212+ assert ! ( module. tunables . component_model_concurrency ) ;
213213
214214 // Like the async->async case above, for the sync->async case we
215215 // also need `async-start` and `async-return` helper functions to
@@ -235,7 +235,7 @@ pub(super) fn compile(module: &mut Module<'_>, adapter: &AdapterData) {
235235 ) ;
236236 }
237237 ( true , false ) => {
238- assert ! ( module. enable_async ) ;
238+ assert ! ( module. tunables . component_model_concurrency ) ;
239239
240240 // As with the async->async and sync->async cases above, for the
241241 // async->sync case we use `async-start` and `async-return` helper
@@ -759,7 +759,7 @@ impl<'a, 'b> Compiler<'a, 'b> {
759759 Trap :: CannotLeaveComponent ,
760760 ) ;
761761
762- let old_task_may_block = if self . module . enable_async {
762+ let old_task_may_block = if self . module . tunables . component_model_concurrency {
763763 // Save, clear, and later restore the `may_block` field.
764764 let task_may_block = self . module . import_task_may_block ( ) ;
765765 let old_task_may_block = if self . types [ adapter. lift . ty ] . async_ {
@@ -871,7 +871,7 @@ impl<'a, 'b> Compiler<'a, 'b> {
871871 self . instruction ( Call ( exit. as_u32 ( ) ) ) ;
872872 }
873873
874- if self . module . enable_async {
874+ if self . module . tunables . component_model_concurrency {
875875 // Pop the task we pushed earlier off of the current task stack.
876876 //
877877 // FIXME: Apply the optimizations described in #12311.
@@ -1993,7 +1993,7 @@ impl<'a, 'b> Compiler<'a, 'b> {
19931993
19941994 // In debug mode verify the first result consumed the entire string,
19951995 // otherwise simply discard it.
1996- if self . module . debug {
1996+ if self . module . tunables . debug_adapter_modules {
19971997 self . instruction ( LocalGet ( src. len . idx ) ) ;
19981998 self . instruction ( LocalGet ( src_len_tmp. idx ) ) ;
19991999 self . ptr_sub ( src_mem_opts) ;
@@ -2020,7 +2020,7 @@ impl<'a, 'b> Compiler<'a, 'b> {
20202020
20212021 // If the first transcode was enough then assert that the returned
20222022 // amount of destination items written equals the byte size.
2023- if self . module . debug {
2023+ if self . module . tunables . debug_adapter_modules {
20242024 self . instruction ( Else ) ;
20252025
20262026 self . instruction ( LocalGet ( dst. len . idx ) ) ;
@@ -2191,7 +2191,7 @@ impl<'a, 'b> Compiler<'a, 'b> {
21912191
21922192 // Assert that the untagged code unit length is the same as the
21932193 // source code unit length.
2194- if self . module . debug {
2194+ if self . module . tunables . debug_adapter_modules {
21952195 self . instruction ( LocalGet ( dst. len . idx ) ) ;
21962196 self . ptr_uconst ( dst_mem_opts, !UTF16_TAG ) ;
21972197 self . ptr_and ( dst_mem_opts) ;
@@ -3464,7 +3464,7 @@ impl<'a, 'b> Compiler<'a, 'b> {
34643464
34653465 fn assert_aligned ( & mut self , ty : & InterfaceType , mem : & Memory ) {
34663466 let mem_opts = mem. mem_opts ( ) ;
3467- if !self . module . debug {
3467+ if !self . module . tunables . debug_adapter_modules {
34683468 return ;
34693469 }
34703470 let align = self . types . align ( mem_opts, ty) ;
@@ -3654,7 +3654,7 @@ impl<'a, 'b> Compiler<'a, 'b> {
36543654 }
36553655
36563656 fn assert_i64_upper_bits_not_set ( & mut self , local : u32 ) {
3657- if !self . module . debug {
3657+ if !self . module . tunables . debug_adapter_modules {
36583658 return ;
36593659 }
36603660 self . instruction ( LocalGet ( local) ) ;
0 commit comments