فهرست منبع

+ write the wasm binary module header and version

Nikolay Nikolov 3 سال پیش
والد
کامیت
fd4d6b8fc3
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      compiler/ogwasm.pas

+ 3 - 1
compiler/ogwasm.pas

@@ -229,7 +229,9 @@ implementation
 
 
     function TWasmObjOutput.writeData(Data:TObjData):boolean;
     function TWasmObjOutput.writeData(Data:TObjData):boolean;
       begin
       begin
-        result:=false;
+        Writer.write(WasmModuleMagic,SizeOf(WasmModuleMagic));
+        Writer.write(WasmVersion,SizeOf(WasmVersion));
+        result:=true;
       end;
       end;
 
 
     constructor TWasmObjOutput.create(AWriter: TObjectWriter);
     constructor TWasmObjOutput.create(AWriter: TObjectWriter);