Maybe http://golang.org/pkg/types and http://golang.org/pkg/build can help
you.
On Tuesday, April 9, 2024 at 2:04:03 AM UTC+3 Carl-Philip Hänsch wrote:
> 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
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/2793dc9c-bf55-4a8a-883c-8c2b17d09924n%40googlegroups.com.