mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-09-01 10:19:01 +00:00
fc0673430d
LLVM 22 can replace string-scanning loops with calls to strlen during optimization. Add the implementation to wasmbuiltins and invalidate cached archives. Add an optimized wasm-unknown smoke test that exercises the reflect name-decoding path which exposed the missing symbol.
16 lines
201 B
Go
16 lines
201 B
Go
package main
|
|
|
|
import "reflect"
|
|
|
|
type value struct {
|
|
Field int
|
|
}
|
|
|
|
//go:wasmexport typeNameLength
|
|
func typeNameLength() uint32 {
|
|
return uint32(len(reflect.TypeOf(value{}).String()))
|
|
}
|
|
|
|
func main() {
|
|
}
|