9
PNaCl/LLVM Go Compiler Jason Hickey, Herbert Czymontic, Michal Cierniak {jyh,herbertc,cierniak}@google.com

PNaCl/LLVM Go Compiler

Embed Size (px)

Citation preview

PNaCl/LLVM Go CompilerJason Hickey, Herbert Czymontic, Michal Cierniak

{jyh,herbertc,cierniak}@google.com

Vision• Apps run anywhere and

everywhere

• Your browser is a full featured development environment

• Includes code development, compilation, debugging, security

• How do we run anywhere?

• How do we develop anywhere?

• How do we debug anywhere?

Running Go in Chrome

Future Directions

Basic Strategy• Want 100% compatibility with standard gc runtime

• Full support for goroutines, stack extension, precise garbage collection, etc.

• Can’t use the LLVM stack• Can’t be extended, doesn’t support inspection, garbage collection, or stack

switching

• Solution• Custom compiler (written in Go)• Ignore the LLVM stack and use our own

Go calling convention• All arguments and return values are passed on the stack • All registers are caller-save (the callee can trash them)

LLVM: introduce an explicit stack

Phases

Status• Available in the Vanadium Internet of Things project

Complete Go-based development env, security, networking

https://vanadium.googlesource.com/release.go.pnacl Vanadium: http://v.io

• Most features are implemented, aiming for Dec.