Go JIT

236 views
Skip to first unread message

Carl-Philip Hänsch

unread,
Apr 8, 2024, 7:04:03 PMApr 8
to golang-nuts
Hi,

I saw in go's source code that all methods and data structures regarding parsers, the IR and so on are private.

Is there a way to import go's parser and compiler as a library and start compiling .go files, building IR code at runtime and finally (with some implementation effort) JITing them?

My goal is to "specialize" go code for certain data. For instance a interpreter loop with a big switch v.(type) {} shall be copied and rewritten as if v is known.

Regards

Mihai

unread,
Apr 9, 2024, 12:41:20 PMApr 9
to golang-nuts
Reply all
Reply to author
Forward
0 new messages