<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sinter/llvm_codegen.c, branch master</title>
<subtitle>Intermediate functional language that compiles to LLVMIR</subtitle>
<link rel='alternate' type='text/html' href='https://www.magnostherobot.co.uk/git.cgi/5th-year-coursework/sinter/'/>
<entry>
<title>Correct indentation of case statement</title>
<updated>2022-08-26T16:50:24+00:00</updated>
<author>
<name>Tom Harley</name>
</author>
<published>2022-08-26T16:50:24+00:00</published>
<link rel='alternate' type='text/html' href='https://www.magnostherobot.co.uk/git.cgi/5th-year-coursework/sinter/commit/?id=c475f590aa0f1ba9959bced4ae427665292d2ee8'/>
<id>c475f590aa0f1ba9959bced4ae427665292d2ee8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix issue with nested case statements</title>
<updated>2022-05-11T10:59:16+00:00</updated>
<author>
<name>Tom Harley</name>
</author>
<published>2022-05-11T10:59:16+00:00</published>
<link rel='alternate' type='text/html' href='https://www.magnostherobot.co.uk/git.cgi/5th-year-coursework/sinter/commit/?id=8432156ed42e4f2bb636c23434008ac7be291d38'/>
<id>8432156ed42e4f2bb636c23434008ac7be291d38</id>
<content type='text'>
Previously, nested case statements would cause phis to be given
incorrect incoming blocks, causing issues when compiling the LLVMIR
with clang.

To fix this, all case branches are given a second "exit" block
that they jump to before jumping to the phi block. This way, we
always know the block that was just left to get to the phi.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, nested case statements would cause phis to be given
incorrect incoming blocks, causing issues when compiling the LLVMIR
with clang.

To fix this, all case branches are given a second "exit" block
that they jump to before jumping to the phi block. This way, we
always know the block that was just left to get to the phi.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add String support</title>
<updated>2022-05-04T06:05:39+00:00</updated>
<author>
<name>Tom Harley</name>
</author>
<published>2022-05-04T06:05:39+00:00</published>
<link rel='alternate' type='text/html' href='https://www.magnostherobot.co.uk/git.cgi/5th-year-coursework/sinter/commit/?id=49a7f1de1231b0f598b4e46223f1bf4a61dbb2d9'/>
<id>49a7f1de1231b0f598b4e46223f1bf4a61dbb2d9</id>
<content type='text'>
escape slashes still need to be supported though!
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
escape slashes still need to be supported though!
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for "case" statements</title>
<updated>2022-02-09T12:56:15+00:00</updated>
<author>
<name>Tom Harley</name>
</author>
<published>2022-02-09T12:56:15+00:00</published>
<link rel='alternate' type='text/html' href='https://www.magnostherobot.co.uk/git.cgi/5th-year-coursework/sinter/commit/?id=e5f7d50a4df80dbc05970805733a8b4ee838af51'/>
<id>e5f7d50a4df80dbc05970805733a8b4ee838af51</id>
<content type='text'>
Both this feature and "let" statements (committed previously) require
documentation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both this feature and "let" statements (committed previously) require
documentation.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for "let" statements</title>
<updated>2022-01-27T18:47:34+00:00</updated>
<author>
<name>Tom Harley</name>
</author>
<published>2022-01-27T18:47:34+00:00</published>
<link rel='alternate' type='text/html' href='https://www.magnostherobot.co.uk/git.cgi/5th-year-coursework/sinter/commit/?id=f8fca8f7e942cce62624384c7b211a9fbe357948'/>
<id>f8fca8f7e942cce62624384c7b211a9fbe357948</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add some LLVM attributes to functions</title>
<updated>2020-01-12T01:21:29+00:00</updated>
<author>
<name>Tom Harley</name>
</author>
<published>2020-01-12T01:21:29+00:00</published>
<link rel='alternate' type='text/html' href='https://www.magnostherobot.co.uk/git.cgi/5th-year-coursework/sinter/commit/?id=18a48c4f0c62e214dc9d097017b0020418e84d10'/>
<id>18a48c4f0c62e214dc9d097017b0020418e84d10</id>
<content type='text'>
Some of the functions generated by sinc can have attributes added to
them that might be difficult for the LLVM toolchain to infer.

Attribute generation can be turned off with `-O no-llvm-attributes`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some of the functions generated by sinc can have attributes added to
them that might be difficult for the LLVM toolchain to infer.

Attribute generation can be turned off with `-O no-llvm-attributes`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make tail recursion mod cons toggleable</title>
<updated>2020-01-11T22:55:19+00:00</updated>
<author>
<name>Tom Harley</name>
</author>
<published>2020-01-11T22:55:19+00:00</published>
<link rel='alternate' type='text/html' href='https://www.magnostherobot.co.uk/git.cgi/5th-year-coursework/sinter/commit/?id=9daf92178a175e2b40722d0becb732923fe262c5'/>
<id>9daf92178a175e2b40722d0becb732923fe262c5</id>
<content type='text'>
The tail recursion mod cons optimisation must now be enabled explicitly
using `-O tail-recursion-mod-cons`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The tail recursion mod cons optimisation must now be enabled explicitly
using `-O tail-recursion-mod-cons`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename compiler to sinc</title>
<updated>2020-01-11T20:12:20+00:00</updated>
<author>
<name>Tom Harley</name>
</author>
<published>2020-01-11T20:12:20+00:00</published>
<link rel='alternate' type='text/html' href='https://www.magnostherobot.co.uk/git.cgi/5th-year-coursework/sinter/commit/?id=c52a6bedb06d83adca8e5a89ec23d77967ae4cce'/>
<id>c52a6bedb06d83adca8e5a89ec23d77967ae4cce</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Added int width specifiers</title>
<updated>2020-01-11T02:53:36+00:00</updated>
<author>
<name>Tom Harley</name>
</author>
<published>2020-01-11T02:53:36+00:00</published>
<link rel='alternate' type='text/html' href='https://www.magnostherobot.co.uk/git.cgi/5th-year-coursework/sinter/commit/?id=1a3dc02a18a9050877288a5867e44d9c47a53542'/>
<id>1a3dc02a18a9050877288a5867e44d9c47a53542</id>
<content type='text'>
The width of an int can be specified at the site of its creation. For
example, the following function returns an int of width 2 bits and value
1:

[def two_bit_int []
    (2 1)]

Ints can still be written the old way; in these cases the compiler looks
for a default int bit-width (specified with the -w flag). If a default
has not been defined, the compiler throws an error.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The width of an int can be specified at the site of its creation. For
example, the following function returns an int of width 2 bits and value
1:

[def two_bit_int []
    (2 1)]

Ints can still be written the old way; in these cases the compiler looks
for a default int bit-width (specified with the -w flag). If a default
has not been defined, the compiler throws an error.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add option to enable/disable boxing</title>
<updated>2020-01-08T23:47:14+00:00</updated>
<author>
<name>Tom Harley</name>
</author>
<published>2020-01-08T20:17:50+00:00</published>
<link rel='alternate' type='text/html' href='https://www.magnostherobot.co.uk/git.cgi/5th-year-coursework/sinter/commit/?id=505d8a2d364b3012455068d433ccec73cac38a50'/>
<id>505d8a2d364b3012455068d433ccec73cac38a50</id>
<content type='text'>
Only affects atomic types, not structs. Accepts three options:

- "-u always": always boxes
- "-u never": never boxes
- "-u smart": inserts a comparison of sizes, and boxes only if
    the item is bigger than a pointer.

"smart" is smart in name only; I expected the comparison to be optimised
away (since the sizes of the types are known at compile-time), but it
seems to run significantly slower than the other options.

Steps to improve:
- try making the comparison compile-time (or, if it already is, find out
    why it's so slow);
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only affects atomic types, not structs. Accepts three options:

- "-u always": always boxes
- "-u never": never boxes
- "-u smart": inserts a comparison of sizes, and boxes only if
    the item is bigger than a pointer.

"smart" is smart in name only; I expected the comparison to be optimised
away (since the sizes of the types are known at compile-time), but it
seems to run significantly slower than the other options.

Steps to improve:
- try making the comparison compile-time (or, if it already is, find out
    why it's so slow);
</pre>
</div>
</content>
</entry>
</feed>
