© 2021 Strange Loop
The GoLightly library is a toolkit for building flexible virtual machines. Instead of limiting you to a particular execution model it defines basic primitives which are useful in implementing stack-, register- and vector-based execution models along with simple communications models for multicore designs.
GoLightly started as a research tool to help design a high-performance virtual machine for Ruby written in Go but its scope has since expanded to be a general-purpose library with the aim of allowing any high-level language runtime to easily exploit multicore concurrency and the vector-processing features of modern consumer processors.
In this session we'll draw on the GoLightly and related codebases to explore how Go supports concurrency as well as examining its approach to object-orientation and type safety - including the dirty tricks occasionally required to override it.
Here we'll also encounter the Go testing and benchmarking framework and use code examples to illustrate the many trade-offs involved in VM design including some or all of: dispatch models; bytecode and threaded interpretation; control flow and activation records; interrupts; memory allocation; stack- and register- architectures; vector-processing (SIMD) extensions; JIT and AOT compilation; system calls, blocking and processor-inspired weirdness.
By the end of the session attendees should be comfortable reading Go source code, have a basic feel for developing with the language and the necessary background to write their own VMs in whatever language they happen to prefer.