LLVM Cauldron

I’m going to be attending the LLVM Cauldron (but not the GNU Tools Cauldron) next week. This is mostly out of curiosity (I’m not giving any talks) and to enjoy Hebden Bridge while it’s just about still summer.



Loci v1.4 Released

The latest version of the Loci compiler is now available. See the release notes for detailed information about what’s included. The main feature in this release is a brand new compiler diagnostics system with a rewritten lexer and parser. Here’s an example of errors from the old compiler:

And here’s how it looks with…


Article: Templates across API boundaries

I recently wrote an article for Embedded.com about how Loci improves on C++ templates to allow them to be used across API boundaries. The article is a multi-part series: Part 1: Templates across API boundaries: Powerful but problematic Part 2: Templates across API boundaries: Implementing template generators Part 3 (not available yet)



GLR vs Recursive Descent Parsing

One of the oldest parts of the Loci compiler was replaced earlier this month: the parser. The switch was from a Bison GLR parser to a hand-written recursive descent parser. Rewriting a major compiler component is a significant time/effort investment (it took around 2-3 weeks of relatively intense development), so I’ll explain why I took…



Ubuntu 15.10 kernel bug

I recently raised (as part of my job) an Ubuntu 15.10 kernel bug (titled “Kernel bug in mm/memory.c when ptrace poking to PROT_NONE map“) that’s hit when trying to use ptrace() to poke to a map that’s marked as having no permissions. Based on comments from Linus Torvalds, it sounds like it used to be…



Loci Compiler v1.3 released

The latest version of the Loci compiler is now available. See the release notes for detailed information about what’s included. A lot of this release is clearing up the low level mechanisms of the language, including: Specify object memory states, which is important for move semantics. Adding sizeof() and alignmask() methods so that unsized types…



LLVM ARM and AArch64 nest attribute patches accepted

In the process of developing a mechanism for efficient virtual method calls in Loci I came across difficulties related to generating the appropriate assembly via LLVM IR. For more information, read the LLVM mailing list discussion. Fortunately it turns out LLVM has been adding the required features recently, one of which is the ‘nest’ attribute…



llvm-abi announced on LLVM mailing list

I announced llvm-abi, a library I created to generate ABI-compliant LLVM IR, on the LLVM mailing list. It seems like other front-end developers are very happy to see this kind of change and are furthermore interested in changes to Clang to expose its ABI code generation functionality to ensure that everyone is using a single…



WebAssembly – native code IR for the web

Right now various developers are getting excited about WebAssembly, which is a new IR (intermediate representation) designed for supporting languages like C and C++ (and Loci) with native-like performance. Most notably the intention is to remove the parsing overhead of asm.js (a subset of Javascript designed to be a target for native compilation), open up…



Locic 1.2 Released!

Version 1.2 of Locic has now been released. You can download it here. The release notes are available here: Locic – Releases As mentioned in the previous post, the main feature of this release is predicates (read the relevant documentation for more).