Conversation
There was a problem hiding this comment.
Review: WASM reflect correctness + Emscripten link-level fix
Solid, well-scoped change. The signature-based bridge detection (distinguishing reflect.Value.Method from reflect.Type.Method) addresses the root cause of #2679 directly rather than masking it, and replacing the opaque O3/Os/Oz→O2 link-level downgrade with an explicit --pre-js shim restores the user-requested optimization level while keeping Asyncify correctness. Test coverage is strong across method-value vs. type-metadata, dead-code pruning, bound-method escape, and interface-held reflect.Value cases.
Findings are documentation-accuracy only; no correctness or security blockers were found. The security pass flagged no medium-or-above issues (the --pre-js shim is safe against prototype pollution, and test/wasm/optimization/test.py has no shell/subprocess injection exposure).
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
LLGo WebAssembly build benchmarks
WebAssembly output sizes
LLGo WebAssembly build measurements
Compared with |
edf8eb4 to
6dfcebe
Compare
LLGo baseline benchmarks
Program measurements
Core language and compiler benchmarks
Timer runtime benchmarks
Compared with |
5c73eaf to
f7d0191
Compare
Execute the alias-only fixture in native LLGo coverage tests. Keep signal-termination diagnostics even for covered test binaries, and verify both runner modes.
f7d0191 to
3976fa3
Compare
Calling a reflected method through
Value.Method[ByName]().Interface()can miss the typed Wasm bridge and trap. Recognize direct, bound and interface-held method-value paths, including interfaces returning an alias ofreflect.Value, while keepingreflect.Typemetadata inspection free of these bridges.Restore the requested Emscripten O3/Os/Oz link level. A preRun binding keeps Asyncify's control exports visible to MetaDCE while preserving public Module exports and user hooks. Declare native EH capabilities, preserve pthread features, and include
EMCC_CFLAGSin package fingerprints.Add independent reflected method-value executables, native result-oracle tests and optimized Node/Chrome acceptance cases. Also clean up Chrome child processes, allow creator-thread teardown in the Windows GC smoke, and retain signal-termination diagnostics for coverage-enabled tests.
Part of #2679.
Validation: compiler/cache tests; the complete macOS LLVM 22 LLGo core suite with atomic coverage; both reflected method fixtures under native Go, LLGo and Wasmer; Node Asyncify and browser-process tests; CI workflow tests. Optimized Node/Chrome O3/Os/Oz callback, C ABI/EH, filesystem and multi-worker cases were also validated during development and are enforced in CI.