From 2ebc771c55c34efa007b35283ffa606db82ef4d9 Mon Sep 17 00:00:00 2001 From: Volker Berlin Date: Tue, 24 Dec 2019 13:22:25 +0100 Subject: [PATCH] fix param names of instance methods. idx==0 is the this parameter. --- src/de/inetsoftware/jwebassembly/module/ModuleGenerator.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/de/inetsoftware/jwebassembly/module/ModuleGenerator.java b/src/de/inetsoftware/jwebassembly/module/ModuleGenerator.java index 5fe6573..486d5e1 100644 --- a/src/de/inetsoftware/jwebassembly/module/ModuleGenerator.java +++ b/src/de/inetsoftware/jwebassembly/module/ModuleGenerator.java @@ -580,6 +580,7 @@ public class ModuleGenerator { if( !isStatic ) { StructType instanceType = types.valueOf( name.className ); writer.writeMethodParam( "param", instanceType, "this" ); + paramCount++; } Iterator parser = name.getSignature( types ); AnyType type; @@ -598,9 +599,6 @@ public class ModuleGenerator { } } if( codeBuilder != null ) { - if( !isStatic ) { - paramCount++; - } List localTypes = codeBuilder.getLocalTypes( paramCount ); for( int i = 0; i < localTypes.size(); i++ ) { type = localTypes.get( i );