Repository navigation
Velt 0.4.0
Install
Linux and macOS:
curl -fsSL https://github.com/velt-lang/velt/releases/download/v0.4.0/get-velt.sh | shWindows (PowerShell):
irm https://github.com/velt-lang/velt/releases/download/v0.4.0/get-velt.ps1 | iexThen run velt doctor. The toolchain brings its own linker: no Visual Studio Build Tools,
Xcode or C compiler needed
(Platforms and installation).
What's Changed
- codegen_cl: described scalars stay in registers, written through to their slot by @andtii in #1030
- runtime: per-core workers as one-worker multi-thread runtimes, so a cross-worker wake unparks only an idle worker (#211 step 3, part 1) by @andtii in #1034
- debug info: variables in Windows debug builds by @andtii in #1031
- bench: stdport, standard-library components against the Rust crate for the same job by @andtii in #1051
- codegen: Math.umulh as one multiply instead of a runtime call by @andtii in #1052
- codegen_cl: a variable's scope is a few ranges, not one per later statement (nightly compile-stress on Linux) by @andtii in #1054
- std: a null value in a Map is a value, not a deleted entry by @andtii in #1008
- bench/stdport: executable run.sh, a limb-multiply row; umulh in the inline-helper goldens by @andtii in #1062
- vir: JSON.stringify pushes a member's separator and key together by @andtii in #1067
- std/encoding: Base64 without a table and copies per call by @andtii in #1058
- TS compat: the in operator with string keys, and generator methods in object literals by @andtii in #1026
- std/url: parse by scanning in place instead of copying each component by @andtii in #1063
- WeakMap, WeakSet and WeakRef in the language (#823 step B2) by @andtii in #969
- runtime: SQLite rows reach JSON.parse in binary form by @andtii in #1060
- bench: the feed API of the $12 server challenge on std/http + std/sqlite by @andtii in #1061
- Module constant tables: an array of number or boolean literals is read-only data by @andtii in #1065
- sema: Velt-only type names (u8, f32, bool, …) are shadowed by the program's type declarations by @andtii in #1086
- bench: chatbench and the WebSocket benchmark (#1023) by @andtii in #1059
- vir: transfer checks treat only classes something extends as reaching any subclass; regression goldens for #1057 by @andtii in #1085
- undefined as its own value: T | undefined, void, typeof, ==, printing, JSON (phase 1a of #930) by @andtii in #1013
- TS compat: function expressions, this types, assertion functions and more sigx syntax by @andtii in #1089
- simd: 128-bit vector types from velt:simd (u8x16, f32x4, …), inline in both backends by @andtii in #1068
- std: console levels, toString(radix), Error.name and the standard error classes by @andtii in #1092
- TS compat: overload signatures without semicolons, unions after as, computed keys, import.meta, declare global/module by @andtii in #1090
- Compile npm workspace packages from source: package.json exports, define, ambient declare const, scoped names by @andtii in #1091
- Conditional, mapped and template literal types (phase 1 of #934) by @andtii in #1099
- Promise then, catch, finally and queueMicrotask in Node's order by @andtii in #1097
- std: btoa, atob and DOMException as in Node (step 2 of #946) by @andtii in #1116
- any and unknown as one run-time-checked dynamic value (phase 1a of #924) by @andtii in #1103
- await resumes through the task's microtask queue, in Node's order by @andtii in #1122
- TS compat: generic object-literal methods, optional parameters in function types, variadic and optional tuple elements, generic method signatures in types, var, catch annotations by @andtii in #1113
- Function.prototype.call and apply on function values by @andtii in #1127
- Deferred conditional, mapped and template literal types in generic code (phase 2 of #934) by @andtii in #1120
- std: typed arrays, ArrayBuffer and DataView as in Node (step 1 of #946) by @andtii in #1118
- TS compat: namespaces of types and call signatures in interfaces and object types by @andtii in #1108
- std: hexEncode and hexDecode with SIMD by @andtii in #1070
- std: ReadableStream, its controller and reader, and stream bodies, as in Node (step 3 of #946) by @andtii in #1119
- Promise.reject of a field's error keeps it alive by @andtii in #1147
- Nested functions as hoisted closures, generators in local async closures, closure error types in recursion (#1081, #1084, #1111) by @andtii in #1145
- Object literals implementing interfaces with methods: contextual parameter types, getters and setters (part of #941) by @andtii in #1130
- lower: keep a function value alive while a call through its holder runs (#1146) by @andtii in #1150
- any: member reads and calls through the descriptor (phase 1b of #924, part 1) by @andtii in #1134
- Module-level let as module state, one per process; non-constant module constants evaluated once (#76, #802) by @andtii in #1123
- any: member writes through the descriptor, Array.isArray / generic instanceof narrowing (phase 1b of #924, part 2) by @andtii in #1156
- Nested functions calling themselves or each other through closures: recursive closure groups (#1142) by @andtii in #1157
- undefined phase 1b, part 1: T | void, bare return and fall-off, finished iterator results, async promise returns, destructured narrowing (#930) by @andtii in #1160
- sema: async arrows in module constants typed T | Promise (#1163); async results inferred through returned promises, adopted (#1166) by @andtii in #1170
- velt check past syntax errors (#1155); value: undefined in finished iterator results; rest parameters of any array type (part of #943) by @andtii in #1158
- Proxy (get / set / has traps) and Reflect.get / set / has as a descriptor of the any value (#823, part 1) by @andtii in #1171
- sema: write fields through interface values and bounded generics (#1112) by @andtii in #1173
- Interface method calls keep their receiver alive across arguments by @andtii in #1180
- object and Function types (part of #926) by @andtii in #1176
- sema: omitted optional any/unknown parameters are undefined; compound setter assignment evaluates the receiver once by @andtii in #1184
- vir: borrows rooted in module state survive a call that replaces it (#1161) by @andtii in #1164
- build: no bench harness for the runtime libraries (#1135 C1) by @andtii in #1194
- object: x as object of an unbounded T; object as a weak key and WeakRef target (part of #926) by @andtii in #1187
- ci: check pull request text and commit hygiene (#1135 A2) by @andtii in #1193
- sema: generic interface values convert to unknown type arguments through a checked adapter (#1153) by @andtii in #1179
- sema: a function applies its own default of a dynamic parameter (interfaces, base classes, function values) by @andtii in #1189
- this parameters on function declarations: call, apply and plain calls pass the receiver by @andtii in #1208
- Typed proxies: proxiable types, a tagged Proxy pointer, typed field get / set through the traps (#823, part 2) by @andtii in #1181
- vir: a method's receiver stays alive when the method replaces its holder by @andtii in #1191
- sema: k! keeps its variable for a borrowed parameter; generator defaults through function values; Generator ICE by @andtii in #1209
- sema: type-parameter bounds that are not interfaces, checked at calls and choosing overloads (#1198) by @andtii in #1213
- vir, sema: Record converted from any prints and serializes; spreading a Record builds a Record by @andtii in #1220
- sema, vir: T | null | undefined, undefined alone as a type, let x: T | undefined starts as undefined (#930 phase 1b part 2) by @andtii in #1216
- sema: intersections with a type parameter part, reduced at instantiation (part of #350) by @andtii in #1221
- vir: visit a typed proxy's target once in the Proxy trace glue (#1223) by @andtii in #1232
- sema: a branch passes on the facts that hold at its end; its assignments win over the condition's facts by @andtii in #1235
- Imported modules' top-level statements run at module evaluation; recursive union aliases (#1201, #1204) by @andtii in #1231
- Typed proxies: method calls through a get trap, a Signal used as T keeps its identity, s.$set(v) (#823, part 3) by @andtii in #1229
- sema: ...rest in object patterns, methods destructured out of interface values (#1200, #1207) by @andtii in #1239
- sema, vir: Generator<T, X, N> with next(value), throw(e) (#1202) by @andtii in #1238
- sema: narrowing batch for sigx: assignment narrowing of unions, closure-assigned lets, optional function members, == null on non-null (#1237, #1199, #1206, #1203) by @andtii in #1245
- Module regex constants and throwing initializers at load (#1253); RegExpMatch.index is a number by @andtii in #1260
- syntax, sema, vir: optional parameters and fields are T | undefined (#930 phase 2) by @andtii in #1233
- sema, vir: copies seen through any, unknown and object; one object is one any (#1240, #1256) by @andtii in #1248
- sema: || of typeof narrowing, null alone as a type, as const string arrays, narrowing as-assertions (#1252, #1205, #1255, #893) by @andtii in #1263
- Logical assignment on Record keys; String/template/concat of an Error in an any; module-state Record literal ICE (#1259, #1242) by @andtii in #1269
- sema: recursive unions with null and undefined, generic unions holding nothings, three-state follow-ups (#1250, #1268, #1218) by @andtii in #1272
- Nightly difftest: switch on a union local narrowed to one member; generator Sh/Lvl locals start unnarrowed by @andtii in #1277
- sema, vir: T & object as a type argument, void field errors at the field, typeof narrowing of field paths (#1262, #1264) by @andtii in #1278
- sema, vir: bigint as a type; type-parameter values to any and unknown (#1249, #1241) by @andtii in #1261
- Object built-ins for sigx: is, assign, freeze, create(null), getPrototypeOf, fromEntries, hasOwnProperty.call, Array.isArray by @andtii in #1121
- tests: sample the parser robustness sweep, full sweep nightly (#1135 C2) by @andtii in #1195
- xtask: precheck and a pre-push hook (#1135 A1) by @andtii in #1192
- Map and Set keys compare objects by identity, as in Node (#1257) by @andtii in #1279
- std: u8[] indexOf and includes in Velt with SIMD for searches up to 208 bytes by @andtii in #1069
- simd: partial loads and stores, lane indices and mask prefixes for the last elements by @andtii in #1071
- any: symbol conversions and keys, relational operators, for...of, Object.is (#924) by @andtii in #1293
- launcher tests: build the stand-in toolchain once, never replace it (Windows self-update failure) by @andtii in #1300
- sema: closures in a const's initializer use the const; recursive arrow constants are functions (#750) by @andtii in #1290
- Node-identical string escapes, uncaught non-Error values and JSON.parse syntax errors (#1265) by @andtii in #1281
- std: library lookups give undefined where lib.d.ts does (Map.get, find, pop, at, Record reads) by @andtii in #1282
- sema, vir: growing generic recursion behind a primitive type predicate (#1251) by @andtii in #1295
- any to T | null | undefined keeps null; single-literal arrays; three-state loose comparison in arguments; toString on unions, mixed array literals (#1275, #1271, #1276) by @andtii in #1285
- defineProperty symbol brands, typeof of environment globals (#922, part 1) by @andtii in #1128
- any: Object.keys / values / entries, object spread and JSON.stringify read the value held (#924) by @andtii in #1302
- sema: functions with properties (call signatures next to members, Object.assign onto functions) by @andtii in #1303
- sema: intersections with object-type parts are objects, T as T & object, generic alias intersections (#1304) by @andtii in #1305
- bench: vir_diff.sh fails when its normalizer is missing or fails instead of reporting identical by @andtii in #1320
- sema: symbol-keyed members of asserted literals,
inon optionalanyfields (#923) by @andtii in #1312 - ci: WebAssembly goldens only for WebAssembly changes, all of them nightly (#1135) by @andtii in #1322
- bench: struct value-type benchmarks (struct, class, flat, Rust, Node) by @andtii in #646
- sema: closures and interface methods keep functions they receive; moving the array a for...of loop walks shares it by @andtii in #1311
- sema: a generic function's Signal result at a T with type parameters has its fields by @andtii in #1317
- simd: constant shuffles (T.shuffle) and reverseBytes in velt:simd by @andtii in #1331
- Map and Set keys of a struct type compare and hash by content again (#1279 regression, #641) by @andtii in #1338
- ci: skip the post-merge Windows and macOS gate the queue already ran (#1135 C4) by @andtii in #1343
- docs: maintainer re-review loop, auto-queue on approval and the pre-PR self-check (#1135 B1, A3) by @andtii in #1344
- docs: gate result and self-check in the first PR comment; one verdict-line format (#1135 B1) by @andtii in #1349
- ci: run every OS after a push the queue didn't test; WebAssembly goldens nightly on Windows and macOS (#1135 C4) by @andtii in #1348
- ci: build once per OS and shard the goldens (#1135 C3) by @andtii in #1341
- link: cheaper links for goldens (#1135 D2) by @andtii in #1351
- syntax, sema, vir, opt, codegen: FxHash for compiler-internal maps (#1135) by @andtii in #1354
- velt_sema: the scaling test compares slopes between sizes, not cost above an empty program (#1339) by @andtii in #1357
- tests: behaviour samples under Node run an async main; their floor is checked in every pull request by @andtii in #1345
- nightly: bench guard compares check_all_std per code line of std and names the commits since the baseline (#1135 C7) by @andtii in #1346
- velt_sema: the scaling test measures again before it fails (#1339) by @andtii in #1365
- ci: stable rust-cache key, nightly cache pruning and flake job (#1135 C5, C6) by @andtii in #1347
- simd: the CPU's SHA instructions as u32x4 methods, with an exact emulation and gated functions by @andtii in #1333
- release: prepare 0.3.0 by @andtii in #1367
- std/crypto: SHA-256, SHA-1 and HMAC on the CPU's SHA instructions, through velt:simd by @andtii in #1336
- std/encoding: Base64 and hex read tables stored once, and write unfilled outputs by @andtii in #1098
- Shared promises, phase 1: await one promise from several holders (#212) by @andtii in #1314
- vpm: an npm package's root export falls back to src/index.ts (Vue's layout) by @andtii in #1371
- syntax: automatic semicolon insertion by @andtii in #1372
- sema: union-of-function calls and type walks scale with the program, short calls report instead of panicking by @andtii in #1373
- Three-state follow-ups: defaults on undefined, catch with void handlers, ??= values, optional chain narrowing, any to two-state options by @andtii in #1327
- runtime: timer callbacks in Node's order across tasks; unhandled rejections at the microtask checkpoint by @andtii in #1332
- Read a shared like the T it holds (#36) by @andtii in #1350
- syntax: computed member keys and number property names by @andtii in #1375
- sema: enum members as member keys (#923) by @andtii in #1387
- sema: rest parameters in function types (#943) by @andtii in #1385
- sema: writes into parts of interface fields go back through the setter; sharing goldens for #1307 and #1315 by @andtii in #1335
- sema, vir: rest-shaped arrows and calls through any (#943) by @andtii in #1390
- sema: recursive aliases through named parts, interface parts and cycles of aliases (#783) by @andtii in #1386
- sema, vir: generic-body spreads, conversions, deferred type-level forms and x[k] through keys of a type parameter (#350) by @andtii in #1342
- sema: a recursive union in a callback's parameters no longer overflows the stack (#1397) by @andtii in #1400
- import.meta: Node's keys, printing and resolve by @andtii in #1380
- sema: globalThis as a typed property bag, accessors defined after construction, #1299 follow-ups (#922) by @andtii in #1396
- sema: function types without throws throw what the closures stored into them throw by @andtii in #1326
- lower: an error leaving through a finally that catches keeps its throw location by @andtii in #1413
- std, sema, vir: Proxy traps sigx uses (#823, #1174) by @andtii in #1363
- Frozen instances: functions read a counted shared without copies (#708) by @andtii in #1353
- std, sema: typed proxies answer hasOwn and in with their traps, for...in of an any proxy reads descriptors key by key by @andtii in #1394
- sema: module constants a program takes over are module state; closure arguments share what the call borrows (#1383) by @andtii in #1388
- sema: each module's exports found once, so importing from a barrel package is linear by @andtii in #1433
- sema: props and components on the sigx harness path (void fields, nullable record spreads, index signatures of any, unrelated predicates, top-level promises) by @andtii in #1419
- sema: undefined leftovers on sigx's server path and typed arrays' buffer type argument (#930, #1152) by @andtii in #1431
- loader: parse on the pipeline thread, find each directory's package once by @andtii in #1434
- Typed arrays and array loops: alias tags, no counts per element, branch-free element access, vectorized loops by @andtii in #1393
- sema, vir: writes through x!.f check the root they write; module constants kept through !, as, ?? and parts; ?? in module initializers; self-referencing Map types (#1406, #1398, #1391) by @andtii in #1416
- sema, vir: generic interface values at other type arguments: field writes, identity, checked conversions back from any (#1185) by @andtii in #1418
- velt_rt, vir: process lifetime and uncaught reports as in Node (#1366, #1414) by @andtii in #1420
- sema: construct signatures, classes as values and ArrayBufferView (#943, #1152) by @andtii in #1443
- sema: throws inference of function types converges without a check per rethrowing closure by @andtii in #1449
- RwLock: readers run at once, sharing the value without copies or atomics (#708) by @andtii in #1355
- sema: unions of intersections and as-assertions to union members (#1410, #893) by @andtii in #1426
- lower: the root file runs its declarations and statements in source order (#1438) by @andtii in #1446
- sema: ownership on sigx's server path: extensions with optional fields share their base's layout, writes through any reach only dynamic objects by @andtii in #1452
- sema, vir: any and unknown on sigx's server path (#924, #926) by @andtii in #1455
- sema: callbacks with a wider parameter type get their arguments converted by @andtii in #1459
- sema: spread arguments, spread elements and object properties are evaluated in written order by @andtii in #1460
- sema, vir: union views: a wide object cast to a union of interfaces is read through its getters (#1410) by @andtii in #1463
- bench: Linux refresh of the Velt, Rust and Node tables; nightly marks rows slower than Node by @andtii in #1471
- sema, vir: generic unions keep one layout at every instantiation by @andtii in #1464
- sema: then(f, g) and Array.from callbacks that throw, JavaScript text of type parameters, tuples and string + by @andtii in #1469
- sema: function values with a wider result, containers of any and unknown as one type, record spreads of other values (#943, #1185) by @andtii in #1477
- ci: the queue's check job gets 90 minutes when it runs the WebAssembly goldens by @andtii in #1479
- runtime: a panic flushes stdout while another thread writes it; uncaught goldens no longer race their timeouts by @andtii in #1482
- ci: 150 minutes for the queue's check job when it runs the WebAssembly goldens by @andtii in #1483
- websocket: written in Velt on std/net streams; the runtime codec is removed by @andtii in #1056
- sema: narrowed nullable unions and union fields, any to a union with one interface member (JSX children, #379) by @andtii in #1484
- xtask: a lockfile, CI or script change leaves the WebAssembly goldens to the nightly by @andtii in #1486
- rt: Velt's own task executor, the default scheduler, behind a pluggable runtime boundary by @andtii in #1100
- sema, velt_rt: FxHash for the throws inference's span maps; promise starts skip the reader check without an RwLock by @andtii in #1498
- native: packages get std's boundary and async I/O; Postgres, SQLite and Redis on the public SDK; std for servers written in Velt by @andtii in #1461
- ci: the WebAssembly goldens run in shards of their own in the merge queue and the nightly by @andtii in #1489
- runtime: a handed-over rejection is reported once, and only the first uncaught error by @andtii in #1500
- sema: the scaling tests count work, not CPU time by @andtii in #1505
- tests: the allocator test compares what more workers add, not whole processes by @andtii in #1507
- vir: an any holding an object of another type converts to an object type as a view of it (#1485) by @andtii in #1491
- vir, sema, syntax: initializer and default temporaries live in their body; any in mixed conditionals; defaults that use earlier parameters by @andtii in #1494
- runtime: the woken-by-a-task placement test checks where the wake queues the task, not where it ran by @andtii in #1513
- sema, vir: this in object-literal methods and accessors (#941) by @andtii in #1499
- runtime: the eager-promise and refused-connection tests order by observed state, not timers or a freed port by @andtii in #1515
- runtime: the monitor no longer swallows a stalled worker's wake-up; dev handover accepts a host that already left by @andtii in #1519
- sema, syntax, fmt: virtual-call defaults, as as a name, await null, mutable statics, static blocks, accessor types by @andtii in #1520
- vir, sema: arrays of another element type convert as views of the array (#1485) by @andtii in #1511
- runtime: the wasm entry test no longer leaves the exiting panic hook installed by @andtii in #1537
- Generics batch: type parameters through their bounds, deferred forms, intersections and generic instances (#1517) by @andtii in #1521
- sema, vir: operators and built-in methods through any (#924) by @andtii in #1536
- build: C dependencies compiled as C17 on Linux, so the runtime links against the glibc 2.31 kit by @andtii in #1551
- sema: module constants read by their own closures, iterator methods among literal members, defineProperty accessors on untyped literals (#379) by @andtii in #1539
- Servers in Velt on public APIs: velt:http/server, zero-copy text APIs, row cursors, velt:db by @andtii in #1533
- vir: a value sema transferred out of a read callback is not transferred again by @andtii in #1525
- release: prepare 0.4.0 by @andtii in #1577
Full Changelog: v0.2.2...v0.4.0