@@ -110,7 +110,7 @@ impl InstructionBuilder<'_, '_> {
110
110
Descriptor :: Ref ( d) => self . outgoing_ref ( false , d) ?,
111
111
Descriptor :: RefMut ( d) => self . outgoing_ref ( true , d) ?,
112
112
113
- Descriptor :: CachedString => self . cached_string ( false , true ) ?,
113
+ Descriptor :: CachedString => self . cached_string ( true ) ?,
114
114
115
115
Descriptor :: String => {
116
116
// fetch the ptr/length ...
@@ -193,7 +193,7 @@ impl InstructionBuilder<'_, '_> {
193
193
& [ AdapterType :: NamedExternref ( name. clone ( ) ) ] ,
194
194
) ;
195
195
}
196
- Descriptor :: CachedString => self . cached_string ( false , false ) ?,
196
+ Descriptor :: CachedString => self . cached_string ( false ) ?,
197
197
198
198
Descriptor :: String => {
199
199
self . instruction (
@@ -335,7 +335,7 @@ impl InstructionBuilder<'_, '_> {
335
335
Descriptor :: Ref ( d) => self . outgoing_option_ref ( false , d) ?,
336
336
Descriptor :: RefMut ( d) => self . outgoing_option_ref ( true , d) ?,
337
337
338
- Descriptor :: CachedString => self . cached_string ( true , true ) ?,
338
+ Descriptor :: CachedString => self . cached_string ( true ) ?,
339
339
340
340
Descriptor :: String | Descriptor :: Vector ( _) => {
341
341
let kind = arg. vector_kind ( ) . ok_or_else ( || {
@@ -525,7 +525,7 @@ impl InstructionBuilder<'_, '_> {
525
525
& [ AdapterType :: NamedExternref ( name. clone ( ) ) . option ( ) ] ,
526
526
) ;
527
527
}
528
- Descriptor :: CachedString => self . cached_string ( true , false ) ?,
528
+ Descriptor :: CachedString => self . cached_string ( false ) ?,
529
529
Descriptor :: String | Descriptor :: Slice ( _) => {
530
530
let kind = arg. vector_kind ( ) . ok_or_else ( || {
531
531
format_err ! (
@@ -574,14 +574,13 @@ impl InstructionBuilder<'_, '_> {
574
574
self . instruction ( & [ AdapterType :: I64 ] , instr, & [ output] ) ;
575
575
}
576
576
577
- fn cached_string ( & mut self , optional : bool , owned : bool ) -> Result < ( ) , Error > {
577
+ fn cached_string ( & mut self , owned : bool ) -> Result < ( ) , Error > {
578
578
let mem = self . cx . memory ( ) ?;
579
579
let free = self . cx . free ( ) ?;
580
580
self . instruction (
581
581
& [ AdapterType :: I32 , AdapterType :: I32 ] ,
582
582
Instruction :: CachedStringLoad {
583
583
owned,
584
- optional,
585
584
mem,
586
585
free,
587
586
table : None ,
0 commit comments