You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1eb6af3
Browse filesBrowse the repository at this point in the historyBrowse files
Lower boolean conditions directly (skip boxing) + thumb fast paths (microsoft#11336)
* Lower boolean conditions directly (skip boxing) + thumb fast paths
* Add comments to asm helpers
* Add codegen test corpus and native thumb test harness
tests/thumb-test compiles programs to native ARM Thumb in-process against a
captured micro:bit (mbcodal) CompileOptions fixture and asserts on the
generated assembly listing; runs offline via gulp testthumb.
lang-test0 gains three semantic files covering condition truthiness and
lowering and interface dispatch (including both sides of the call-site-count
thresholds that gate dispatch specialization), plus a deliberately disabled
repro of the default-parameters-on-dynamic-dispatch defect and a coverage map
(README-codegen.md) tying failure modes to tests and layers.
* Add hw-ab: hardware A/B comparison tooling for micro:bit
Cross-platform node scripts (macOS/Linux/Windows) to build candidate and
reference hexes, flash a micro:bit, capture serial, and diff the traces, with
a gcStats-based soak mode for leak detection. Driven by one wrapper:
npm run hwab -- ab truthiness.
* Harden hw-ab serial capture against stale and cross-case output
Findings from running the capture against a real micro:bit:
- DAPLink buffers serial while no host is reading, so a fresh capture can
open onto the previously flashed program's output, including its PASS
banner. Verdicts are now read only from the flashed program's own
HWAB START banner onward, and --expect <case> (passed by hwab) requires
the banner and verdict to name the flashed case. Timeout diagnostics
report ignored foreign output and point at FAIL.TXT when no banner
appears.
- Panic does not flush the serial FIFO, which truncated the assert id on
the wire. The generated device assert now drains for 250 ms between
logging the id and panicking.
* Add `noBoolLower` switch and differential codegen tests
- add `noBoolLower` compile switch disabling the boolean condition lowering optimizations; with it set, output matches the pre-lowering codegen and no unused helper text is emitted
- fix a template-literal syntax error in asm that broke the branch build
- flip the boolbaseline expectations to the lowered codegen
- add switch-variant compiles to the thumb harness; a `noBoolLower` variant pins the codegen the switch restores
- verified: testlang 57, testthumb 7, A/B hexes differ under the switch; hardware A/B on micro:bit V2 -- **all three test cases pass** on both builds with identical serial traces
---------
Co-authored-by: Eric Anderson <humanapp@users.noreply.github.com>
0 commit comments