Browse Source

* added support and simplified the handling of results in create_functype_common for reference types

Nikolay Nikolov 2 years ago
parent
commit
bebe53ef9f
1 changed files with 1 additions and 10 deletions
  1. 1 10
      compiler/wasm32/symcpu.pas

+ 1 - 10
compiler/wasm32/symcpu.pas

@@ -264,16 +264,7 @@ implementation
         begin
         begin
           if not defToWasmBasic(pd.returndef,bt) then
           if not defToWasmBasic(pd.returndef,bt) then
             bt:=wbt_i32;
             bt:=wbt_i32;
-          case bt of
-            wbt_i64:
-              result.add_result(wbt_i64);
-            wbt_f32:
-              result.add_result(wbt_f32);
-            wbt_f64:
-              result.add_result(wbt_f64);
-          else
-            result.add_result(wbt_i32);
-          end;
+          result.add_result(bt);
         end;
         end;
     end;
     end;