Skip to content

Velt 0.3.0

Choose a tag to compare

@github-actions github-actions released this 20 Oct 16:22
· 659 commits to main since this release

Install

Linux and macOS:

curl -fsSL https://github.com/velt-lang/velt/releases/download/v0.3.0/get-velt.sh | sh

Windows (PowerShell):

irm https://github.com/velt-lang/velt/releases/download/v0.3.0/get-velt.ps1 | iex

Then 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

Full Changelog: v0.2.2...v0.3.0