TarCV / botc

Fork of Dusk's botc compiler *OPEN FOR ADOPTION*
Other
1 stars 0 forks source link

Compiled lumps differ in size from debotc output #18

Open ghost opened 4 years ago

ghost commented 4 years ago

I have talked to Torr about botc, he seemed happy about this and asked the following:

Quick question: Should it be possible to exactly recreate the compiled bot scripts from zandronum.pk3 with debotc and botc? I tried decompiling and recompiling crashbot.lump, but the result differed from the original crashbot.lump.

TarCV commented 4 years ago

No, it should generate functionally same byte code, but byte by byte comparison would yield some differences. For example botc generates some sections in different order, and it does some simple optimizations like evaluating some expressions at compile time.

If it helps, I can finish disassemble feature in debotc, so that anyone interested can check that outputs are actually functionally same. Disasm output would be like:

00000010 DH_PUSHNUMBER(10)
00000018 DH_BOTCMD Delay
ghost commented 4 years ago

Maybe that will make him happy. In any case, I have linked him this issue, if he says anything I will post it.