Skip to content

Unimplemented and incomplete features

Andrew Wilkins edited this page Sep 17, 2013 · 7 revisions

This page describes unimplemented and incomplete features. If you would like to get involved and fix something here, please head over to llgo-dev and start a discussion.

Runtime goroutine scheduler

Goroutines have been implemented one-to-one with native (p)threads. We should now begin investigating implementation of an M-N goroutine/thread scheduler. We may want to lift the scheduler from gc's runtime.

Heap allocation

Heap allocation is currently provided by malloc from libc. Assuming we want to enable the creation of statically linked executables a la gc, malloc should be reimplemented in the llgo runtime.

Garbage collection

There is currently no garbage collector at all. A precise GC would be ideal, time permitting.

Maps

Maps are implemented, but have a crude linked-list implementation. This should eventually be changed to use a more appropriate data structure, such as a hash map.

Interfaces

Interfaces are mostly implemented (TODO: enumerate missing functionality), but some short cuts have been taken.

Interface types are currently represented by llgo as (ptr, val, f1, f2, f3...) where f1 etc. are the interface method function pointers; this makes passing around interfaces with methods more expensive than necessary.

Interface conversions are currently not implemented properly (neither static, nor dynamic). Dynamic conversions in the runtime do not check function signatures properly, traverse embedded structures, etc.

cgo

There is currently no integration with cgo. It would be ideal to use clang for cgo, as it is capable of generating LLVM IR/bitcode, and is likely to be available alongside the required LLVM runtime.

Escape analysis

Currently, all variables are allocated on the heap. We must implement escape analysis in order to move variables to the stack wherever possible.