Prepare short portable helpers and scalar record reads, improve JSON SIMD scanning, expose one-line execution, and publish qualified Alpha benchmark artifacts. Add the experimental verified lowered execution, serialization and Linux x86-64 backend with source maps. Physically remove 263 redundant test entry points and unused helpers, migrate retained helpers to Ziran, and execute the full retained suite without sharding. Allow ignored backup state for the managed physical Alpha workflow. Local validation: all 268 retained tests passed across the full run and corrected targeted reruns; bootstrap matches. Current assembly verifier, x86-64, executor and serializer tests passed. Website examples and all 4661 local links passed. Six Alpha JSON/text workloads retain verified artifacts, raw samples and explicit unsupported Wasm diagnostics. The mobile sub-500 ns target remains pending.
14 lines
639 B
Ziran
14 lines
639 B
Ziran
// Quote Unicode: write 256 repetitions of ASCII, a BMP scalar and an astral scalar with
|
|
// ensure-ASCII semantics: 256 * (3 + 6 + 12) + two quotation marks.
|
|
using V :: #import "vec"
|
|
using J :: #import "json_quote"
|
|
input: Vec(u8);
|
|
|
|
Answer :: () -> s64 {
|
|
if input.count==0 { for index: 0..255 { if !BuilderAppend(input,"abcλ😀") { return -1 } } }
|
|
output: Vec(u8)
|
|
if !JsonQuoteInto(*output,TextView(input[:]),true)||output.count!=5378||output[0]!=34||output[5377]!=34 { return -2 }
|
|
if output[4]!=92||output[5]!=117||output[10]!=92 { return -3 }
|
|
return output.count+cast(s64)output[0]+cast(s64)output[output.count-1]
|
|
}
|