The JIT that runs makepad apps from source: lexer, front end, type checker, lazy borrow checker (Gandalf; `--check-first` opts in), codegen, session and warm/cold caches keyed by compiler stamp, provided crates bound late, startup images, live patching. User-facing name is `makepad run` (binary `makepad`, MAKEPAD_RUN_* env, ~/.makepad-run); libs/relax stays the internal library name. `makepad check` reports rustc-style diagnostics with rustc error codes and checks a whole workspace (`--workspace`). Runs on macOS, Linux, Windows and Android. makepad-remote: one tool schema for apps and the WM (app/1): grabs, captures, traces, frame profiles and tweaks. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
9 lines
426 B
Rust
9 lines
426 B
Rust
#[inline(never)] fn mx(a: f64) -> f64 { a.max(0.0) }
|
|
#[inline(never)] fn mn(a: f64) -> f64 { a.min(1.5) }
|
|
#[inline(never)] fn mxf(a: f32) -> f32 { (-2.0f32).max(a) }
|
|
#[inline(never)] fn mnf(a: f32) -> f32 { a.min(-0.5) }
|
|
#[test] fn t() {
|
|
for x in [f64::NAN, -1.0, 0.0, -0.0, 2.0, 1.5, f64::INFINITY, f64::NEG_INFINITY] {
|
|
println!("{:?} {:?} {:?} {:?} {:?}", x, mx(x), mn(x), mxf(x as f32), mnf(x as f32));
|
|
}
|
|
}
|