Kartikeya Hegde (@karthihegde) 's Twitter Profile
Kartikeya Hegde

@karthihegde

ID: 1096393398410309637

linkhttp://karthihegde.dev calendar_today15-02-2019 12:58:50

187 Tweet

65 Followers

96 Following

Kartikeya Hegde (@karthihegde) 's Twitter Profile Photo

Added a bunch of math functions in the standard library. Thanks to LLVM intrinsics, these map directly to native CPU instructions.

Added a bunch of  math functions in the standard library. Thanks to  LLVM intrinsics, these map directly to native CPU instructions.
Kartikeya Hegde (@karthihegde) 's Twitter Profile Photo

Fixed a very funny bug in my compiler where arrays declared inside loops were allocated on the stack every iteration, leading to stack overflow. Solution: Moved allocations to the function's entry block to ensure they occur only once.

Kartikeya Hegde (@karthihegde) 's Twitter Profile Photo

Another day, another crazy compiler bug: I realized array initialization was allocating memory and then manually iterating over every pointer to set values one by one -_- Replaced this whole thing with clean memcpy. Guess it's time to start fuzz testing to detect bugs like this

Kartikeya Hegde (@karthihegde) 's Twitter Profile Photo

Maybe it's just me but I prefer handrolled parsers to those magical parser combinators. Predictable performance and control. You don't get both with parser combinators.