/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

thinkingeek.com
| | coredumped.dev

In this post, we are going to take a deep dive into pointer tagging, where metadata is encoded into a word-sized pointer. Doing so allows us to keep a compact representation that can be passed around in machine registers. This is very common in implementing dynamic programming languages, but can really be used anywhere that additional runtime information is needed about a pointer. We will look at a handful of different ways these pointers can be encoded and see how the compiler can optimize them for diff...
4.5 parsecs

Travel
| |
| | www.ralfj.de

This is a cross-post of an article that I wrote for the SIGPLAN blog. "Undefined Behavior" often has a bad reputation. People see it as an excuse compiler writers use to break code, or an ...
3.8 parsecs

Travel
| |
| | stefansf.de

Non-termination essentially invokes undefined behavior under certain conditions in C as well as C++ which we explore in this article.
2.8 parsecs

Travel
| |
| | tmandry.gitlab.io

In Part 1, we covered how async fns in Rust are compiled to state machines. We saw that the internal compiler implementation uses generators and the yield statement to facilitate this transformation. We also saw that the optimal way to lay out one of these state machines in memory is using an enum-like representation, similar to the following: enum SumGenerator{Unresumed{xs: Vec},Suspend0{xs: Vec,iter0: Iter<'self,i32>,sum: i32 },Suspend1{xs: Vec,iter1: Iter<'self,i32>,sum: i32 },Returned}Each variable s...
25.6 parsecs

Travel
|