@scriptc/compiler 0.0.22 → 0.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/ambient/scriptc-node-fallback.d.ts +39 -3
  2. package/dist/backend/emission/emit-async.js +3 -1
  3. package/dist/backend/emission/emit-async.js.map +1 -1
  4. package/dist/backend/emission/emit-exprs.d.ts +10 -0
  5. package/dist/backend/emission/emit-exprs.js +127 -10
  6. package/dist/backend/emission/emit-exprs.js.map +1 -1
  7. package/dist/backend/emission/emit-stmts.js +13 -5
  8. package/dist/backend/emission/emit-stmts.js.map +1 -1
  9. package/dist/backend/emission/emit-types.js +4 -1
  10. package/dist/backend/emission/emit-types.js.map +1 -1
  11. package/dist/backend/emission/emitter.d.ts +11 -1
  12. package/dist/backend/emission/emitter.js +61 -1
  13. package/dist/backend/emission/emitter.js.map +1 -1
  14. package/dist/backend/llvm/emitter.js +304 -21
  15. package/dist/backend/llvm/emitter.js.map +1 -1
  16. package/dist/backend/llvm/shapes.js +3 -2
  17. package/dist/backend/llvm/shapes.js.map +1 -1
  18. package/dist/compat/fetch-profile.d.ts +10 -0
  19. package/dist/compat/fetch-profile.js +55 -6
  20. package/dist/compat/fetch-profile.js.map +1 -1
  21. package/dist/coverage/surface-manifest.js +16 -1
  22. package/dist/coverage/surface-manifest.js.map +1 -1
  23. package/dist/diagnostics/diagnostic.d.ts +10 -0
  24. package/dist/diagnostics/diagnostic.js +27 -1
  25. package/dist/diagnostics/diagnostic.js.map +1 -1
  26. package/dist/frontend/lowering/lower-builtins.d.ts +3 -7
  27. package/dist/frontend/lowering/lower-builtins.js +80 -55
  28. package/dist/frontend/lowering/lower-builtins.js.map +1 -1
  29. package/dist/frontend/lowering/lower-calls.js +1 -0
  30. package/dist/frontend/lowering/lower-calls.js.map +1 -1
  31. package/dist/frontend/lowering/lower-classes.js +28 -8
  32. package/dist/frontend/lowering/lower-classes.js.map +1 -1
  33. package/dist/frontend/lowering/lower-exprs.d.ts +1 -1
  34. package/dist/frontend/lowering/lower-exprs.js +25 -4
  35. package/dist/frontend/lowering/lower-exprs.js.map +1 -1
  36. package/dist/frontend/lowering/lower-generators.js +7 -1
  37. package/dist/frontend/lowering/lower-generators.js.map +1 -1
  38. package/dist/frontend/lowering/lower-island.d.ts +21 -0
  39. package/dist/frontend/lowering/lower-island.js +284 -10
  40. package/dist/frontend/lowering/lower-island.js.map +1 -1
  41. package/dist/frontend/lowering/lower-stmts.js +8 -4
  42. package/dist/frontend/lowering/lower-stmts.js.map +1 -1
  43. package/dist/frontend/lowering/lowerer.d.ts +1 -0
  44. package/dist/frontend/lowering/lowerer.js +6 -2
  45. package/dist/frontend/lowering/lowerer.js.map +1 -1
  46. package/dist/frontend/lowering/surfaces.js +43 -12
  47. package/dist/frontend/lowering/surfaces.js.map +1 -1
  48. package/dist/frontend/program.d.ts +4 -4
  49. package/dist/frontend/program.js +264 -46
  50. package/dist/frontend/program.js.map +1 -1
  51. package/dist/frontend/resolve.d.ts +10 -0
  52. package/dist/frontend/resolve.js +37 -0
  53. package/dist/frontend/resolve.js.map +1 -1
  54. package/dist/frontend/ts7/enums.d.ts +9 -0
  55. package/dist/frontend/ts7/enums.js +8 -6
  56. package/dist/frontend/ts7/enums.js.map +1 -1
  57. package/dist/frontend/ts7/program.js +4 -1
  58. package/dist/frontend/ts7/program.js.map +1 -1
  59. package/dist/frontend/types.d.ts +4 -4
  60. package/dist/frontend/types.js +25 -8
  61. package/dist/frontend/types.js.map +1 -1
  62. package/dist/ir/nodes.d.ts +24 -11
  63. package/dist/ir/nodes.js +6 -1
  64. package/dist/ir/nodes.js.map +1 -1
  65. package/dist/ir/validate.js +45 -8
  66. package/dist/ir/validate.js.map +1 -1
  67. package/package.json +2 -2
  68. package/surface-manifest.json +137 -28
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scriptc/compiler",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "description": "The scriptc compiler — TypeScript/JavaScript frontend, typed IR, LLVM and C backends",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://scriptc.dev",
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "typescript": "7.0.2",
32
32
  "typescript5": "npm:typescript@5.9.3",
33
- "@scriptc/runtime": "0.0.22"
33
+ "@scriptc/runtime": "0.0.23"
34
34
  },
35
35
  "scripts": {
36
36
  "build": "node node_modules/typescript5/bin/tsc -p tsconfig.json"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "compilerVersion": "0.0.22",
3
+ "compilerVersion": "0.0.23",
4
4
  "coverage": [
5
5
  "Entries are projected mechanically from the compiler's own decision tables: the diagnostics registry, the unsupported-syntax dispatch tables, the stdlib and node-builtin lowering tables, and the supported-builtin-module list. Nothing is hand-maintained; the manifest regenerates byte-identically from the source tree at this version.",
6
6
  "Absence from this manifest means 'not projected', never 'unsupported'. Surfaces lowered through dedicated code paths rather than tables are not yet projected: console, JSON, Promise/async and the timer surface, the net/http/tls/https/dgram/dns/assert/test/stream/readline module member surfaces, template literals, the regex slice, global functions (parseInt, parseFloat, isNaN, isFinite), and the process surface outside its ambient slice.",
@@ -1870,25 +1870,22 @@
1870
1870
  "id": "stdlib.abort-controller.abort",
1871
1871
  "kind": "stdlib",
1872
1872
  "name": "AbortController.abort",
1873
- "status": "unsupported",
1874
- "code": "SC2020",
1875
- "note": "Node 24.15.0 / Undici 7.24.4; typed source has no compiler bridge for this interface in either tier"
1873
+ "status": "static",
1874
+ "note": "Node 24.15.0 / Undici 7.24.4; facets: callback-order, identity, liveness, state-machine, surplus-arguments; differential evidence: fixture:static-controller"
1876
1875
  },
1877
1876
  {
1878
1877
  "id": "stdlib.abort-controller.constructor",
1879
1878
  "kind": "stdlib",
1880
1879
  "name": "AbortController constructor",
1881
- "status": "unsupported",
1882
- "code": "SC2020",
1883
- "note": "Node 24.15.0 / Undici 7.24.4; typed source has no compiler bridge for this interface in either tier"
1880
+ "status": "static",
1881
+ "note": "Node 24.15.0 / Undici 7.24.4; facets: argument-evaluation, identity, state-machine, surplus-arguments; differential evidence: fixture:static-controller"
1884
1882
  },
1885
1883
  {
1886
1884
  "id": "stdlib.abort-controller.signal",
1887
1885
  "kind": "stdlib",
1888
1886
  "name": "AbortController.signal",
1889
- "status": "unsupported",
1890
- "code": "SC2020",
1891
- "note": "Node 24.15.0 / Undici 7.24.4; typed source has no compiler bridge for this interface in either tier"
1887
+ "status": "static",
1888
+ "note": "Node 24.15.0 / Undici 7.24.4; facets: identity, property-read, state-machine; differential evidence: fixture:static-controller"
1892
1889
  },
1893
1890
  {
1894
1891
  "id": "stdlib.abort-signal.abort",
@@ -2119,26 +2116,142 @@
2119
2116
  "status": "static",
2120
2117
  "note": "the lowered call form takes 1 to 7 number arguments"
2121
2118
  },
2119
+ {
2120
+ "id": "stdlib.date.constructor",
2121
+ "kind": "stdlib",
2122
+ "name": "Date constructor",
2123
+ "status": "static",
2124
+ "note": "zero arguments, or one milliseconds/date-string argument; values are the read-only TimeClip scalar slice"
2125
+ },
2126
+ {
2127
+ "id": "stdlib.date.getDate",
2128
+ "kind": "stdlib",
2129
+ "name": "Date.prototype.getDate",
2130
+ "status": "static"
2131
+ },
2132
+ {
2133
+ "id": "stdlib.date.getDay",
2134
+ "kind": "stdlib",
2135
+ "name": "Date.prototype.getDay",
2136
+ "status": "static"
2137
+ },
2138
+ {
2139
+ "id": "stdlib.date.getFullYear",
2140
+ "kind": "stdlib",
2141
+ "name": "Date.prototype.getFullYear",
2142
+ "status": "static"
2143
+ },
2144
+ {
2145
+ "id": "stdlib.date.getHours",
2146
+ "kind": "stdlib",
2147
+ "name": "Date.prototype.getHours",
2148
+ "status": "static"
2149
+ },
2150
+ {
2151
+ "id": "stdlib.date.getMilliseconds",
2152
+ "kind": "stdlib",
2153
+ "name": "Date.prototype.getMilliseconds",
2154
+ "status": "static"
2155
+ },
2156
+ {
2157
+ "id": "stdlib.date.getMinutes",
2158
+ "kind": "stdlib",
2159
+ "name": "Date.prototype.getMinutes",
2160
+ "status": "static"
2161
+ },
2162
+ {
2163
+ "id": "stdlib.date.getMonth",
2164
+ "kind": "stdlib",
2165
+ "name": "Date.prototype.getMonth",
2166
+ "status": "static"
2167
+ },
2168
+ {
2169
+ "id": "stdlib.date.getSeconds",
2170
+ "kind": "stdlib",
2171
+ "name": "Date.prototype.getSeconds",
2172
+ "status": "static"
2173
+ },
2122
2174
  {
2123
2175
  "id": "stdlib.date.getTime",
2124
2176
  "kind": "stdlib",
2125
2177
  "name": "Date.prototype.getTime",
2126
2178
  "status": "static",
2127
- "note": "the composed new Date(dateString).getTime() form; new Date().getTime() is stdlib.date.now's surface"
2179
+ "note": "the millisecond value of a stored Date"
2180
+ },
2181
+ {
2182
+ "id": "stdlib.date.getTimezoneOffset",
2183
+ "kind": "stdlib",
2184
+ "name": "Date.prototype.getTimezoneOffset",
2185
+ "status": "static"
2186
+ },
2187
+ {
2188
+ "id": "stdlib.date.getUTCDate",
2189
+ "kind": "stdlib",
2190
+ "name": "Date.prototype.getUTCDate",
2191
+ "status": "static"
2192
+ },
2193
+ {
2194
+ "id": "stdlib.date.getUTCDay",
2195
+ "kind": "stdlib",
2196
+ "name": "Date.prototype.getUTCDay",
2197
+ "status": "static"
2198
+ },
2199
+ {
2200
+ "id": "stdlib.date.getUTCFullYear",
2201
+ "kind": "stdlib",
2202
+ "name": "Date.prototype.getUTCFullYear",
2203
+ "status": "static"
2204
+ },
2205
+ {
2206
+ "id": "stdlib.date.getUTCHours",
2207
+ "kind": "stdlib",
2208
+ "name": "Date.prototype.getUTCHours",
2209
+ "status": "static"
2210
+ },
2211
+ {
2212
+ "id": "stdlib.date.getUTCMilliseconds",
2213
+ "kind": "stdlib",
2214
+ "name": "Date.prototype.getUTCMilliseconds",
2215
+ "status": "static"
2216
+ },
2217
+ {
2218
+ "id": "stdlib.date.getUTCMinutes",
2219
+ "kind": "stdlib",
2220
+ "name": "Date.prototype.getUTCMinutes",
2221
+ "status": "static"
2222
+ },
2223
+ {
2224
+ "id": "stdlib.date.getUTCMonth",
2225
+ "kind": "stdlib",
2226
+ "name": "Date.prototype.getUTCMonth",
2227
+ "status": "static"
2228
+ },
2229
+ {
2230
+ "id": "stdlib.date.getUTCSeconds",
2231
+ "kind": "stdlib",
2232
+ "name": "Date.prototype.getUTCSeconds",
2233
+ "status": "static"
2128
2234
  },
2129
2235
  {
2130
2236
  "id": "stdlib.date.now",
2131
2237
  "kind": "stdlib",
2132
2238
  "name": "Date.now",
2133
2239
  "status": "static",
2134
- "note": "the live clock; the zero-argument new Date() compositions read it too"
2240
+ "note": "the live clock"
2135
2241
  },
2136
2242
  {
2137
2243
  "id": "stdlib.date.toISOString",
2138
2244
  "kind": "stdlib",
2139
2245
  "name": "Date.prototype.toISOString",
2140
2246
  "status": "static",
2141
- "note": "the composed new Date(ms?).toISOString() form"
2247
+ "note": "UTC ISO formatting over constructed and stored Date values"
2248
+ },
2249
+ {
2250
+ "id": "stdlib.date.valueOf",
2251
+ "kind": "stdlib",
2252
+ "name": "Date.prototype.valueOf",
2253
+ "status": "static",
2254
+ "note": "the same millisecond read as getTime()"
2142
2255
  },
2143
2256
  {
2144
2257
  "id": "stdlib.fetch",
@@ -2964,25 +3077,22 @@
2964
3077
  "id": "stdlib.response-init.headers",
2965
3078
  "kind": "stdlib",
2966
3079
  "name": "ResponseInit.headers",
2967
- "status": "unsupported",
2968
- "code": "SC2020",
2969
- "note": "Node 24.15.0 / Undici 7.24.4; Response construction has no compiler lowering in either tier"
3080
+ "status": "static",
3081
+ "note": "Node 24.15.0 / Undici 7.24.4; conversion: Headers, record, or sequence-of-pairs snapshot; differential evidence: fixture:static"
2970
3082
  },
2971
3083
  {
2972
3084
  "id": "stdlib.response-init.status",
2973
3085
  "kind": "stdlib",
2974
3086
  "name": "ResponseInit.status",
2975
- "status": "unsupported",
2976
- "code": "SC2020",
2977
- "note": "Node 24.15.0 / Undici 7.24.4; Response construction has no compiler lowering in either tier"
3087
+ "status": "static",
3088
+ "note": "Node 24.15.0 / Undici 7.24.4; conversion: WebIDL unsigned-short conversion followed by the 200–599 range check; differential evidence: fixture:static"
2978
3089
  },
2979
3090
  {
2980
3091
  "id": "stdlib.response-init.statusText",
2981
3092
  "kind": "stdlib",
2982
3093
  "name": "ResponseInit.statusText",
2983
- "status": "unsupported",
2984
- "code": "SC2020",
2985
- "note": "Node 24.15.0 / Undici 7.24.4; Response construction has no compiler lowering in either tier"
3094
+ "status": "static",
3095
+ "note": "Node 24.15.0 / Undici 7.24.4; conversion: WebIDL ByteString with HTTP reason-phrase validation; differential evidence: fixture:static"
2986
3096
  },
2987
3097
  {
2988
3098
  "id": "stdlib.response.arrayBuffer",
@@ -3033,9 +3143,8 @@
3033
3143
  "id": "stdlib.response.constructor",
3034
3144
  "kind": "stdlib",
3035
3145
  "name": "Response constructor",
3036
- "status": "unsupported",
3037
- "code": "SC2020",
3038
- "note": "Node 24.15.0 / Undici 7.24.4; the interface constructor has no compiler bridge in either tier"
3146
+ "status": "static",
3147
+ "note": "Node 24.15.0 / Undici 7.24.4; facets: webidl-conversion, body-consumption, state-machine, error-shape; supported scope: BodyInit is string, Uint8Array/Buffer, ReadableStream<Uint8Array>, null/undefined, or a checked-dynamic value that follows the supported WebIDL string conversion; ResponseInit is headers/status/statusText; differential evidence: fixture:static"
3039
3148
  },
3040
3149
  {
3041
3150
  "id": "stdlib.response.formData",
@@ -3079,7 +3188,7 @@
3079
3188
  "name": "Response.error",
3080
3189
  "status": "unsupported",
3081
3190
  "code": "SC2020",
3082
- "note": "Node 24.15.0 / Undici 7.24.4; Response constructor-object operations have no compiler lowering in either tier"
3191
+ "note": "Node 24.15.0 / Undici 7.24.4; Response static constructor-object operations have no compiler lowering in either tier"
3083
3192
  },
3084
3193
  {
3085
3194
  "id": "stdlib.response.static.json",
@@ -3087,7 +3196,7 @@
3087
3196
  "name": "Response.json",
3088
3197
  "status": "unsupported",
3089
3198
  "code": "SC2020",
3090
- "note": "Node 24.15.0 / Undici 7.24.4; Response constructor-object operations have no compiler lowering in either tier"
3199
+ "note": "Node 24.15.0 / Undici 7.24.4; Response static constructor-object operations have no compiler lowering in either tier"
3091
3200
  },
3092
3201
  {
3093
3202
  "id": "stdlib.response.static.redirect",
@@ -3095,7 +3204,7 @@
3095
3204
  "name": "Response.redirect",
3096
3205
  "status": "unsupported",
3097
3206
  "code": "SC2020",
3098
- "note": "Node 24.15.0 / Undici 7.24.4; Response constructor-object operations have no compiler lowering in either tier"
3207
+ "note": "Node 24.15.0 / Undici 7.24.4; Response static constructor-object operations have no compiler lowering in either tier"
3099
3208
  },
3100
3209
  {
3101
3210
  "id": "stdlib.response.status",