Explorar o código

+ WebAssembly internal asm support for the ref.null instruction

Nikolay Nikolov %!s(int64=2) %!d(string=hai) anos
pai
achega
957ff5b972
Modificáronse 1 ficheiros con 13 adicións e 1 borrados
  1. 13 1
      compiler/wasm32/aasmcpu.pas

+ 13 - 1
compiler/wasm32/aasmcpu.pas

@@ -581,7 +581,9 @@ uses
           a_i64_trunc_sat_f64_s,
           a_i64_trunc_sat_f64_s,
           a_i64_trunc_sat_f64_u,
           a_i64_trunc_sat_f64_u,
           a_memory_size,
           a_memory_size,
-          a_memory_grow:
+          a_memory_grow,
+          a_ref_null_funcref,
+          a_ref_null_externref:
             result:=2;
             result:=2;
           a_memory_copy:
           a_memory_copy:
             result:=4;
             result:=4;
@@ -1991,6 +1993,16 @@ uses
               WriteByte($FC);
               WriteByte($FC);
               WriteByte($07);
               WriteByte($07);
             end;
             end;
+          a_ref_null_funcref:
+            begin
+              WriteByte($D0);
+              WriteByte($70);
+            end;
+          a_ref_null_externref:
+            begin
+              WriteByte($D0);
+              WriteByte($6F);
+            end;
           else
           else
             internalerror(2021092624);
             internalerror(2021092624);
         end;
         end;