The primary goal of this effort is to come up with a native Ballerina compiler frontend that is fast, memory-efficient and has a fast startup. Eventually it could replace the current jBallerina compiler frontend.
The implementation strategy involves a one-to-one mapping of the jBallerina compiler.
The project is built using the Go programming language. The following dependencies are required:
go build -o bal ./cli/cmdgo build -tags debug -o bal-debug ./cli/cmdProfiling is only available in debug builds (compiled with -tags debug).
# Default profiling port (:6060)
./bal-debug run --prof corpus/bal/subset1/01-boolean/equal1-v.bal
# Custom port
./bal-debug run --prof --prof-addr=:8080 corpus/bal/subset1/01-boolean/equal1-v.bal- Web UI: http://localhost:6060/debug/pprof/
- CPU Profile: http://localhost:6060/debug/pprof/profile?seconds=30
- Heap Profile: http://localhost:6060/debug/pprof/heap
- Goroutines: http://localhost:6060/debug/pprof/goroutine
# CPU profiling (30 second sample)
go tool pprof http://localhost:6060/debug/pprof/profile?seconds=30
# Heap profiling
go tool pprof http://localhost:6060/debug/pprof/heap
# Interactive web UI
go tool pprof -http=:8081 http://localhost:6060/debug/pprof/profile?seconds=30./bal --help./bal run --helpCurrently, the following are supported:
- Single .bal file
- Ballerina package with only the default module
E.g
./bal run --dump-bir corpus/bal/subset1/01-boolean/equal1-v.bal
./bal run project-api-test/testdata/myprojectTo run the tests, use the following command:
go test ./...