Page 3 of 3

Re: assert that with (have you hugged your compiler today)

Posted: Fri Mar 20, 2020 1:47 am
by Octocontrabass
mikegonta wrote:No actual assembly language is generated and there is no assembler.
It still sounds like an assembler to me, even if the language you're using is "put the u32 into the other u32;" instead of "mov esi, [esp+4]; mov edi, [esp+8]; mov eax, [esi]; mov [edi], eax;".
mikegonta wrote:The generation of x64, elf for Linux, C and object file format are on my todo list.
Perhaps you should consider generating LLVM IR. It'll speed up porting to other binary formats, and LLVM includes an optimizer for it.

Re: assert that with (have you hugged your compiler today)

Posted: Fri Mar 20, 2020 2:32 am
by iansjack
As a general comment on this subject, you might like to look at Eiffel which supports a framework of contracts and assertions far superior to the simple assertions discussed here. It's not my favourite language but it's worth looking at if you are interested in assertions of program correctness.