<feed xmlns='http://www.w3.org/2005/Atom'>
<title>antcc/obj/obj.c, branch trunk</title>
<subtitle>A little C compiler</subtitle>
<id>https://git.lemon.rip/antcc/atom?h=trunk</id>
<link rel='self' href='https://git.lemon.rip/antcc/atom?h=trunk'/>
<link rel='alternate' type='text/html' href='https://git.lemon.rip/antcc/'/>
<updated>2026-03-17T12:22:00+00:00</updated>
<entry>
<title>REFACTOR: move sources to src/</title>
<updated>2026-03-17T12:22:00+00:00</updated>
<author>
<name>lemon</name>
<email>lsof@mailbox.org</email>
</author>
<published>2026-03-17T12:22:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lemon.rip/antcc/commit/?id=a8d6f8bf30c07edb775e56889f568ca20240bedf'/>
<id>urn:sha1:a8d6f8bf30c07edb775e56889f568ca20240bedf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>create distinct interned string type</title>
<updated>2025-12-15T21:39:52+00:00</updated>
<author>
<name>lemon</name>
<email>lsof@mailbox.org</email>
</author>
<published>2025-12-15T21:39:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lemon.rip/antcc/commit/?id=302e24671942051d70707586cf8c605a5815edac'/>
<id>urn:sha1:302e24671942051d70707586cf8c605a5815edac</id>
<content type='text'>
Interned strings are used pervasively, so it's a good idea to add a
layer of type safety to differentiate them from general cstrs and avoid
potential bugs from comparing non-interned and interned strings. Not
that that's happened so far that I can remember, but it could.

I'm 90% sure it's legal to alias `struct {char c;}` pointers with `char`
pointers. This specific typedef gives type safety but with a simple
one-way `internstr -&gt; const char *` typecast (with `&amp;istr-&gt;c`).
Converting the other way around is more intentional: a straight up cast
`(internstr)cstr` which sticks out as unchecked and probably wrong, or
calling the intern(cstr) function, which is the right way.
</content>
</entry>
<entry>
<title>various relocation related optimization</title>
<updated>2025-12-14T11:15:59+00:00</updated>
<author>
<name>lemon</name>
<email>lsof@mailbox.org</email>
</author>
<published>2025-12-14T11:15:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lemon.rip/antcc/commit/?id=d8b4e87af669c2b260686a5db67f7f02b4c164d9'/>
<id>urn:sha1:d8b4e87af669c2b260686a5db67f7f02b4c164d9</id>
<content type='text'>
With 59ca5a8db, querying if a symbol is defined is cheap. If we're
compiling code that calls foo() and we defined foo() in this compilation
unit, we already know its offset within the .text section, so use it
instead of emitting a relocation for the linker to handle.  Also, put
small literal data in the .text section instead of .rodata.  This seems
to improve performance (cache locality?), and as a bonus, it will be
good for aarch64's instr encoding with smallish PC-relative offsets.
</content>
</entry>
<entry>
<title>c: make tentative definitions work</title>
<updated>2025-12-02T13:21:59+00:00</updated>
<author>
<name>lemon</name>
<email>lsof@mailbox.org</email>
</author>
<published>2025-12-01T18:10:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lemon.rip/antcc/commit/?id=c14321c4d35549d989d614437953b36b8c771cc2'/>
<id>urn:sha1:c14321c4d35549d989d614437953b36b8c771cc2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Organize source files into directories</title>
<updated>2025-10-19T06:09:09+00:00</updated>
<author>
<name>lemon</name>
<email>lsof@mailbox.org</email>
</author>
<published>2025-10-19T06:09:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lemon.rip/antcc/commit/?id=dea8fd171acb54b6d9685422d5e391fb55074008'/>
<id>urn:sha1:dea8fd171acb54b6d9685422d5e391fb55074008</id>
<content type='text'>
</content>
</entry>
</feed>
