OSDev.org
https://forum.osdev.org/

assert that with (have you hugged your compiler today)
https://forum.osdev.org/viewtopic.php?f=13&t=36581
Page 3 of 3

Author:  Octocontrabass [ Fri Mar 20, 2020 1:47 am ]
Post subject:  Re: assert that with (have you hugged your compiler today)

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.

Author:  iansjack [ Fri Mar 20, 2020 2:32 am ]
Post subject:  Re: assert that with (have you hugged your compiler today)

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.

Page 3 of 3 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/