@@ -436,6 +436,9 @@ impl<'a, 'b> Compiler<'a, 'b> {
436436 self . instruction ( I32Const (
437437 i32:: try_from ( adapter. lower . instance . as_u32 ( ) ) . unwrap ( ) ,
438438 ) ) ;
439+ self . instruction ( I32Const (
440+ i32:: try_from ( adapter. lift . instance . as_u32 ( ) ) . unwrap ( ) ,
441+ ) ) ;
439442 self . instruction ( I32Const (
440443 i32:: try_from ( self . types [ adapter. lift . ty ] . results . as_u32 ( ) ) . unwrap ( ) ,
441444 ) ) ;
@@ -463,13 +466,7 @@ impl<'a, 'b> Compiler<'a, 'b> {
463466 format ! ( "[adapter-callee]{}" , adapter. name) ,
464467 ) ) ;
465468
466- self . instruction ( I32Const (
467- i32:: try_from ( adapter. lower . instance . as_u32 ( ) ) . unwrap ( ) ,
468- ) ) ;
469469 self . instruction ( RefFunc ( adapter. callee . as_u32 ( ) ) ) ;
470- self . instruction ( I32Const (
471- i32:: try_from ( adapter. lift . instance . as_u32 ( ) ) . unwrap ( ) ,
472- ) ) ;
473470 self . instruction ( I32Const ( param_count) ) ;
474471 // The result count for an async callee is either one (if there's a
475472 // callback) or zero (if there's no callback). We conservatively use
@@ -519,6 +516,9 @@ impl<'a, 'b> Compiler<'a, 'b> {
519516 self . instruction ( I32Const (
520517 i32:: try_from ( adapter. lower . instance . as_u32 ( ) ) . unwrap ( ) ,
521518 ) ) ;
519+ self . instruction ( I32Const (
520+ i32:: try_from ( adapter. lift . instance . as_u32 ( ) ) . unwrap ( ) ,
521+ ) ) ;
522522 self . instruction ( I32Const (
523523 i32:: try_from ( self . types [ adapter. lift . ty ] . results . as_u32 ( ) ) . unwrap ( ) ,
524524 ) ) ;
@@ -561,13 +561,7 @@ impl<'a, 'b> Compiler<'a, 'b> {
561561 format ! ( "[adapter-callee]{}" , adapter. name) ,
562562 ) ) ;
563563
564- self . instruction ( I32Const (
565- i32:: try_from ( adapter. lower . instance . as_u32 ( ) ) . unwrap ( ) ,
566- ) ) ;
567564 self . instruction ( RefFunc ( adapter. callee . as_u32 ( ) ) ) ;
568- self . instruction ( I32Const (
569- i32:: try_from ( adapter. lift . instance . as_u32 ( ) ) . unwrap ( ) ,
570- ) ) ;
571565 self . instruction ( I32Const ( lift_param_count) ) ;
572566 self . instruction ( Call ( exit. as_u32 ( ) ) ) ;
573567
@@ -608,6 +602,9 @@ impl<'a, 'b> Compiler<'a, 'b> {
608602 self . instruction ( I32Const (
609603 i32:: try_from ( adapter. lower . instance . as_u32 ( ) ) . unwrap ( ) ,
610604 ) ) ;
605+ self . instruction ( I32Const (
606+ i32:: try_from ( adapter. lift . instance . as_u32 ( ) ) . unwrap ( ) ,
607+ ) ) ;
611608 self . instruction ( I32Const (
612609 i32:: try_from ( self . types [ adapter. lift . ty ] . results . as_u32 ( ) ) . unwrap ( ) ,
613610 ) ) ;
@@ -626,13 +623,7 @@ impl<'a, 'b> Compiler<'a, 'b> {
626623 format ! ( "[adapter-callee]{}" , adapter. name) ,
627624 ) ) ;
628625
629- self . instruction ( I32Const (
630- i32:: try_from ( adapter. lower . instance . as_u32 ( ) ) . unwrap ( ) ,
631- ) ) ;
632626 self . instruction ( RefFunc ( adapter. callee . as_u32 ( ) ) ) ;
633- self . instruction ( I32Const (
634- i32:: try_from ( adapter. lift . instance . as_u32 ( ) ) . unwrap ( ) ,
635- ) ) ;
636627 self . instruction ( I32Const ( param_count) ) ;
637628 self . instruction ( I32Const ( result_count) ) ;
638629 self . instruction ( I32Const ( 0 ) ) ;
0 commit comments