Преглед на файлове

* write a WebAssembly header in TWasmExeOutput.writeData

Nikolay Nikolov преди 1 година
родител
ревизия
54eb8de658
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6 0
      compiler/ogwasm.pas

+ 6 - 0
compiler/ogwasm.pas

@@ -2215,7 +2215,13 @@ implementation
     function TWasmExeOutput.writeData: boolean;
     function TWasmExeOutput.writeData: boolean;
       begin
       begin
         result:=false;
         result:=false;
+
         {TODO: implement}
         {TODO: implement}
+
+        Writer.write(WasmModuleMagic,SizeOf(WasmModuleMagic));
+        Writer.write(WasmVersion,SizeOf(WasmVersion));
+
+        result := true;
       end;
       end;
 
 
     procedure TWasmExeOutput.DoRelocationFixup(objsec: TObjSection);
     procedure TWasmExeOutput.DoRelocationFixup(objsec: TObjSection);