@scriptc/compiler 0.0.3 → 0.0.4

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 (70) hide show
  1. package/ambient/scriptc-node-fallback.d.ts +145 -9
  2. package/dist/backend/cc.d.ts +7 -0
  3. package/dist/backend/cc.js +1 -0
  4. package/dist/backend/cc.js.map +1 -1
  5. package/dist/backend/emission/emit-exprs.js +35 -0
  6. package/dist/backend/emission/emit-exprs.js.map +1 -1
  7. package/dist/backend/emission/emit-shapes.js +1 -0
  8. package/dist/backend/emission/emit-shapes.js.map +1 -1
  9. package/dist/backend/emission/emitter.js +15 -3
  10. package/dist/backend/emission/emitter.js.map +1 -1
  11. package/dist/backend/llvm/emitter.js +65 -11
  12. package/dist/backend/llvm/emitter.js.map +1 -1
  13. package/dist/backend/llvm/shapes.js +1 -0
  14. package/dist/backend/llvm/shapes.js.map +1 -1
  15. package/dist/diagnostics/diagnostic.js +2 -2
  16. package/dist/diagnostics/diagnostic.js.map +1 -1
  17. package/dist/frontend/lowering/lib-boundary.js +76 -6
  18. package/dist/frontend/lowering/lib-boundary.js.map +1 -1
  19. package/dist/frontend/lowering/lower-builtins.d.ts +37 -4
  20. package/dist/frontend/lowering/lower-builtins.js +240 -6
  21. package/dist/frontend/lowering/lower-builtins.js.map +1 -1
  22. package/dist/frontend/lowering/lower-calls.js +122 -32
  23. package/dist/frontend/lowering/lower-calls.js.map +1 -1
  24. package/dist/frontend/lowering/lower-classes.d.ts +34 -2
  25. package/dist/frontend/lowering/lower-classes.js +256 -33
  26. package/dist/frontend/lowering/lower-classes.js.map +1 -1
  27. package/dist/frontend/lowering/lower-containers.js +25 -3
  28. package/dist/frontend/lowering/lower-containers.js.map +1 -1
  29. package/dist/frontend/lowering/lower-exprs.d.ts +10 -0
  30. package/dist/frontend/lowering/lower-exprs.js +410 -9
  31. package/dist/frontend/lowering/lower-exprs.js.map +1 -1
  32. package/dist/frontend/lowering/lower-inspect.d.ts +16 -1
  33. package/dist/frontend/lowering/lower-inspect.js +132 -5
  34. package/dist/frontend/lowering/lower-inspect.js.map +1 -1
  35. package/dist/frontend/lowering/lower-island.js +24 -3
  36. package/dist/frontend/lowering/lower-island.js.map +1 -1
  37. package/dist/frontend/lowering/lower-modules.d.ts +6 -5
  38. package/dist/frontend/lowering/lower-modules.js +56 -18
  39. package/dist/frontend/lowering/lower-modules.js.map +1 -1
  40. package/dist/frontend/lowering/lower-stmts.js +56 -0
  41. package/dist/frontend/lowering/lower-stmts.js.map +1 -1
  42. package/dist/frontend/lowering/lowerer.d.ts +57 -1
  43. package/dist/frontend/lowering/lowerer.js +291 -10
  44. package/dist/frontend/lowering/lowerer.js.map +1 -1
  45. package/dist/frontend/lowering/surfaces.d.ts +9 -2
  46. package/dist/frontend/lowering/surfaces.js +44 -7
  47. package/dist/frontend/lowering/surfaces.js.map +1 -1
  48. package/dist/frontend/npm.js +2 -2
  49. package/dist/frontend/npm.js.map +1 -1
  50. package/dist/frontend/program.js +59 -8
  51. package/dist/frontend/program.js.map +1 -1
  52. package/dist/frontend/resolve.js +120 -5
  53. package/dist/frontend/resolve.js.map +1 -1
  54. package/dist/frontend/shared.d.ts +8 -2
  55. package/dist/frontend/shared.js +22 -6
  56. package/dist/frontend/shared.js.map +1 -1
  57. package/dist/frontend/ts7/checker.js +1 -1
  58. package/dist/frontend/ts7/checker.js.map +1 -1
  59. package/dist/frontend/types.d.ts +25 -1
  60. package/dist/frontend/types.js +121 -7
  61. package/dist/frontend/types.js.map +1 -1
  62. package/dist/index.js +4 -1
  63. package/dist/index.js.map +1 -1
  64. package/dist/ir/nodes.d.ts +43 -1
  65. package/dist/ir/nodes.js +41 -0
  66. package/dist/ir/nodes.js.map +1 -1
  67. package/dist/ir/validate.js +38 -6
  68. package/dist/ir/validate.js.map +1 -1
  69. package/package.json +2 -2
  70. package/surface-manifest.json +67 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scriptc/compiler",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
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.3"
33
+ "@scriptc/runtime": "0.0.4"
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.3",
3
+ "compilerVersion": "0.0.4",
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, process, 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, and global functions (parseInt, parseFloat, isNaN, isFinite).",
@@ -17,7 +17,7 @@
17
17
  "name": "package imports",
18
18
  "status": "unsupported",
19
19
  "code": "SC1010",
20
- "note": "relative imports (./file, ../dir/file), package.json-mediated project imports (#alias via the imports field, self-name references via exports), installed npm packages (their code runs under --dynamic), and the built-in fs, fs/promises, path, os, url, crypto, zlib, child_process, net, http, tls, https, http2, dgram, dns, util, util/types, string_decoder, readline, events, stream, buffer, assert, assert/strict, worker_threads, cluster, tty, async_hooks, timers, timers/promises, diagnostics_channel, and node:test modules (bare or node:-prefixed) are supported"
20
+ "note": "relative imports (./file, ../dir/file), package.json-mediated project imports (#alias via the imports field, self-name references via exports), installed npm packages (their code runs under --dynamic), and the built-in fs, fs/promises, path, os, url, crypto, zlib, child_process, net, http, tls, https, http2, dgram, dns, util, util/types, string_decoder, readline, events, stream, buffer, assert, assert/strict, worker_threads, cluster, tty, async_hooks, timers, timers/promises, diagnostics_channel, perf_hooks, and node:test and node:module modules (bare or node:-prefixed) are supported"
21
21
  },
22
22
  {
23
23
  "id": "diagnostic.sc1012",
@@ -785,6 +785,21 @@
785
785
  "status": "static",
786
786
  "note": "recognized module (bare and node:-prefixed specifiers)"
787
787
  },
788
+ {
789
+ "id": "node-builtin.module",
790
+ "kind": "node-builtin",
791
+ "name": "node:module",
792
+ "status": "static",
793
+ "note": "recognized module (node:-prefixed specifier only, matching Node)"
794
+ },
795
+ {
796
+ "id": "node-builtin.module.createRequire",
797
+ "kind": "node-builtin",
798
+ "name": "module.createRequire",
799
+ "status": "unsupported",
800
+ "code": "SC2020",
801
+ "note": "createRequire loads CommonJS from disk at RUNTIME (the config/plugin-loading pattern) — a compiled program's modules are fixed at build time, so no lowering can exist; in JS sources the call defers to a runtime error naming this pattern"
802
+ },
788
803
  {
789
804
  "id": "node-builtin.net",
790
805
  "kind": "node-builtin",
@@ -1091,6 +1106,56 @@
1091
1106
  "name": "path/win32.toNamespacedPath",
1092
1107
  "status": "static"
1093
1108
  },
1109
+ {
1110
+ "id": "node-builtin.perf_hooks",
1111
+ "kind": "node-builtin",
1112
+ "name": "perf_hooks",
1113
+ "status": "static",
1114
+ "note": "recognized module (bare and node:-prefixed specifiers)"
1115
+ },
1116
+ {
1117
+ "id": "node-builtin.querystring",
1118
+ "kind": "node-builtin",
1119
+ "name": "querystring",
1120
+ "status": "static",
1121
+ "note": "recognized module (bare and node:-prefixed specifiers)"
1122
+ },
1123
+ {
1124
+ "id": "node-builtin.querystring.decode",
1125
+ "kind": "node-builtin",
1126
+ "name": "querystring.decode",
1127
+ "status": "static"
1128
+ },
1129
+ {
1130
+ "id": "node-builtin.querystring.encode",
1131
+ "kind": "node-builtin",
1132
+ "name": "querystring.encode",
1133
+ "status": "static"
1134
+ },
1135
+ {
1136
+ "id": "node-builtin.querystring.escape",
1137
+ "kind": "node-builtin",
1138
+ "name": "querystring.escape",
1139
+ "status": "static"
1140
+ },
1141
+ {
1142
+ "id": "node-builtin.querystring.parse",
1143
+ "kind": "node-builtin",
1144
+ "name": "querystring.parse",
1145
+ "status": "static"
1146
+ },
1147
+ {
1148
+ "id": "node-builtin.querystring.stringify",
1149
+ "kind": "node-builtin",
1150
+ "name": "querystring.stringify",
1151
+ "status": "static"
1152
+ },
1153
+ {
1154
+ "id": "node-builtin.querystring.unescape",
1155
+ "kind": "node-builtin",
1156
+ "name": "querystring.unescape",
1157
+ "status": "static"
1158
+ },
1094
1159
  {
1095
1160
  "id": "node-builtin.readline",
1096
1161
  "kind": "node-builtin",