usageLogEnabled property

bool usageLogEnabled
getter/setter pair

Opt-in instrumentation toggle. When true, extractBridgedArg and the interpreter's generic-constructor path record each relaxer / interface-proxy / type-coercion / generic-constructor hit and each unresolved miss, keyed by category + base type + type-argument. The accumulated data drives the mass-generation reduction work (P&R steps 4–5): it reveals which generated cases real scripts actually exercise.

Defaults to false. Every instrumentation call site guards on this flag before composing any log key, so the log is completely silent and zero-overhead when disabled.

Web note: this flag is purely programmatic here (no dart:io). The VM D4rt facade additionally defaults it from the D4RT_LOG_RELAXER_USAGE environment variable; the web-capable tom_d4rt_ast twin cannot read environment variables, so callers enable it directly. This is the only deliberate twin divergence for this feature.

Implementation

static bool usageLogEnabled = false;