RemoveTraces
scalus.compiler.sir.RemoveTraces
object RemoveTraces
Removes fully-applied Trace builtin calls from SIR, replacing them with their value argument.
This is used for release builds to strip log() calls and their message computations (string concatenation, show calls, etc.) from the script, reducing size and execution cost.
The transformation also cleans up dead let bindings that become trivial () after trace removal (the common pattern from log("msg") → let _ = trace(msg)(()) in body → let _ = () in body → body).
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
RemoveTraces.type
Members list
In this article