OptLevel

@Serializable
enum OptLevel : Enum<OptLevel>

Optimization level of a compiled bobbin variant. Higher wins when several variants exist for the same Target. The spike's fake compiler produced a single level; the durable VariantKey address carries the level so a real optimizer (WasmOptimizer) can publish variants at distinct efforts for the same source.

The real toolchain (D4) maps each level onto a wasm-opt invocation: O2 → -O2, O3 → -O3, Oz → -Oz (size-oriented). O0 is a passthrough — no variant worth shipping — served by PassthroughWasmOptimizer. wasm-opt preserves exported functions, so the warp_alloc/warp_run ABI survives every level.

Entries

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int

Functions

Link copied to clipboard
fun valueOf(value: String): OptLevel

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.