xbintsc 0.3.81 → 0.5.6
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.
- package/AGENTS.md +8 -4
- package/README.md +16 -5
- package/README.zh-CN.md +14 -6
- package/dist/src/ast/common.d.ts +23 -0
- package/dist/src/cli/main.js +68 -24
- package/dist/src/cli/main.js.map +1 -1
- package/dist/src/codegen/generator/calls/access.js +6 -2
- package/dist/src/codegen/generator/calls/access.js.map +1 -1
- package/dist/src/codegen/generator/calls/closures.js +4 -0
- package/dist/src/codegen/generator/calls/closures.js.map +1 -1
- package/dist/src/codegen/generator/calls/invocation.js +9 -4
- package/dist/src/codegen/generator/calls/invocation.js.map +1 -1
- package/dist/src/codegen/generator/context.d.ts +50 -0
- package/dist/src/codegen/generator/context.js +124 -13
- package/dist/src/codegen/generator/context.js.map +1 -1
- package/dist/src/codegen/generator/debug.d.ts +33 -0
- package/dist/src/codegen/generator/debug.js +97 -0
- package/dist/src/codegen/generator/debug.js.map +1 -0
- package/dist/src/codegen/generator/expressions/assignment.js +9 -5
- package/dist/src/codegen/generator/expressions/assignment.js.map +1 -1
- package/dist/src/codegen/generator/expressions/operators.js +35 -9
- package/dist/src/codegen/generator/expressions/operators.js.map +1 -1
- package/dist/src/codegen/generator/expressions/primary.js +11 -3
- package/dist/src/codegen/generator/expressions/primary.js.map +1 -1
- package/dist/src/codegen/generator/generator.d.ts +3 -1
- package/dist/src/codegen/generator/generator.js +3 -1
- package/dist/src/codegen/generator/generator.js.map +1 -1
- package/dist/src/codegen/generator/module.d.ts +1 -1
- package/dist/src/codegen/generator/module.js +82 -12
- package/dist/src/codegen/generator/module.js.map +1 -1
- package/dist/src/codegen/generator/numeric.d.ts +26 -0
- package/dist/src/codegen/generator/numeric.js +127 -0
- package/dist/src/codegen/generator/numeric.js.map +1 -0
- package/dist/src/codegen/generator/state.d.ts +17 -0
- package/dist/src/codegen/generator/state.js +9 -0
- package/dist/src/codegen/generator/state.js.map +1 -1
- package/dist/src/codegen/generator/statements/control-flow.js +2 -4
- package/dist/src/codegen/generator/statements/control-flow.js.map +1 -1
- package/dist/src/codegen/generator/statements/dispatch.js +3 -0
- package/dist/src/codegen/generator/statements/dispatch.js.map +1 -1
- package/dist/src/codegen/generator/statements/variables.js +8 -2
- package/dist/src/codegen/generator/statements/variables.js.map +1 -1
- package/dist/src/codegen/generator/tables.d.ts +16 -0
- package/dist/src/codegen/generator/tables.js +99 -2
- package/dist/src/codegen/generator/tables.js.map +1 -1
- package/dist/src/driver/bundler/merge.js +41 -5
- package/dist/src/driver/bundler/merge.js.map +1 -1
- package/dist/src/driver/compiler.d.ts +23 -4
- package/dist/src/driver/compiler.js +46 -57
- package/dist/src/driver/compiler.js.map +1 -1
- package/dist/src/driver/fingerprint.d.ts +27 -0
- package/dist/src/driver/fingerprint.js +88 -0
- package/dist/src/driver/fingerprint.js.map +1 -0
- package/dist/src/driver/toolchain-provider.d.ts +9 -2
- package/dist/src/driver/toolchain-provider.js +15 -15
- package/dist/src/driver/toolchain-provider.js.map +1 -1
- package/dist/src/driver/toolchain.d.ts +58 -1
- package/dist/src/driver/toolchain.js +169 -22
- package/dist/src/driver/toolchain.js.map +1 -1
- package/dist/src/parser/expressions.js +20 -1
- package/dist/src/parser/expressions.js.map +1 -1
- package/dist/tests/cli/main.test.js +41 -1
- package/dist/tests/cli/main.test.js.map +1 -1
- package/dist/tests/codegen/closures.test.js +8 -0
- package/dist/tests/codegen/closures.test.js.map +1 -1
- package/dist/tests/codegen/expressions.test.js +14 -3
- package/dist/tests/codegen/expressions.test.js.map +1 -1
- package/dist/tests/codegen/llvm.test.js +23 -0
- package/dist/tests/codegen/llvm.test.js.map +1 -1
- package/dist/tests/driver/toolchain-provider.test.js +49 -2
- package/dist/tests/driver/toolchain-provider.test.js.map +1 -1
- package/dist/tests/driver/toolchain.test.js +62 -3
- package/dist/tests/driver/toolchain.test.js.map +1 -1
- package/dist/tests/e2e/async-await.test.d.ts +10 -0
- package/dist/tests/e2e/async-await.test.js +247 -0
- package/dist/tests/e2e/async-await.test.js.map +1 -0
- package/dist/tests/e2e/child-process.test.d.ts +10 -0
- package/dist/tests/e2e/child-process.test.js +59 -0
- package/dist/tests/e2e/child-process.test.js.map +1 -0
- package/dist/tests/e2e/compile-objects-classes.test.js +47 -0
- package/dist/tests/e2e/compile-objects-classes.test.js.map +1 -1
- package/dist/tests/e2e/error-stack.test.d.ts +9 -0
- package/dist/tests/e2e/error-stack.test.js +94 -0
- package/dist/tests/e2e/error-stack.test.js.map +1 -0
- package/dist/tests/e2e/runtime-coverage-globals.test.js +46 -0
- package/dist/tests/e2e/runtime-coverage-globals.test.js.map +1 -1
- package/dist/tests/e2e/string-concat.test.d.ts +9 -0
- package/dist/tests/e2e/string-concat.test.js +102 -0
- package/dist/tests/e2e/string-concat.test.js.map +1 -0
- package/dist/tests/e2e/string-utf16.test.d.ts +6 -0
- package/dist/tests/e2e/string-utf16.test.js +133 -0
- package/dist/tests/e2e/string-utf16.test.js.map +1 -0
- package/dist/tests/helpers.d.ts +9 -0
- package/dist/tests/helpers.js +26 -3
- package/dist/tests/helpers.js.map +1 -1
- package/dist/tests/parser/expressions.test.js +7 -0
- package/dist/tests/parser/expressions.test.js.map +1 -1
- package/dist/tests/version.test.d.ts +1 -0
- package/dist/tests/version.test.js +24 -0
- package/dist/tests/version.test.js.map +1 -0
- package/doc/DESIGN.md +20 -12
- package/doc/ai/cli.md +2 -0
- package/doc/ai/contributing.md +16 -8
- package/doc/ai/extensions.md +3 -2
- package/doc/ai/language-support.md +15 -12
- package/doc/ai/troubleshooting.md +43 -5
- package/doc/ai/zh-CN/cli.md +2 -0
- package/doc/ai/zh-CN/contributing.md +11 -7
- package/doc/ai/zh-CN/extensions.md +2 -1
- package/doc/ai/zh-CN/language-support.md +15 -12
- package/doc/ai/zh-CN/troubleshooting.md +38 -4
- package/doc/implemented.md +16 -13
- package/doc/requirements.md +13 -4
- package/doc/unimplemented.md +20 -18
- package/doc/zh-CN/DESIGN.md +15 -9
- package/doc/zh-CN/implemented.md +15 -12
- package/doc/zh-CN/requirements.md +12 -3
- package/doc/zh-CN/unimplemented.md +19 -17
- package/package.json +3 -1
- package/runtime/ext_node/buffer/parts/construction.inc +2 -2
- package/runtime/ext_node/buffer/parts/methods.inc +1 -1
- package/runtime/ext_node/buffer/parts/search.inc +1 -1
- package/runtime/ext_node/child_process/child_process.c +25 -0
- package/runtime/ext_node/fs/fd_ops.c +1 -1
- package/runtime/rt.h +49 -1
- package/runtime/rt_internal.h +136 -4
- package/runtime/xt_alloc.c +20 -2
- package/runtime/xt_async.c +197 -0
- package/runtime/xt_bigint/conversions.inc +1 -1
- package/runtime/xt_builtins.c +169 -43
- package/runtime/xt_constructors.c +389 -0
- package/runtime/xt_containers/access.inc +61 -24
- package/runtime/xt_containers/arrays.inc +26 -2
- package/runtime/xt_containers/objects.inc +206 -8
- package/runtime/xt_coroutine.c +212 -0
- package/runtime/xt_generator.c +31 -162
- package/runtime/xt_io/exception.inc +171 -2
- package/runtime/xt_io/inspect.inc +48 -13
- package/runtime/xt_io.c +5 -0
- package/runtime/xt_promise.c +62 -17
- package/runtime/xt_stdlib/arrays.inc +2 -2
- package/runtime/xt_stdlib/dispatch.inc +20 -4
- package/runtime/xt_stdlib/strings.inc +98 -29
- package/runtime/xt_stdlib2/array-statics.inc +3 -2
- package/runtime/xt_stdlib2/arrays.inc +1 -1
- package/runtime/xt_stdlib2/error.inc +33 -6
- package/runtime/xt_stdlib2/json.inc +46 -16
- package/runtime/xt_stdlib2/number-string-statics.inc +24 -13
- package/runtime/xt_stdlib2/objects.inc +1 -1
- package/runtime/xt_stdlib2/regexp-match.inc +50 -35
- package/runtime/xt_stdlib2/set.inc +6 -0
- package/runtime/xt_stdlib2/strings.inc +81 -42
- package/runtime/xt_symbol.c +1 -1
- package/runtime/xt_typed_array/construction.inc +43 -2
- package/runtime/xt_typed_array.c +4 -0
- package/runtime/xt_values/comparison.inc +2 -2
- package/runtime/xt_values/constructors.inc +18 -5
- package/runtime/xt_values/conversions.inc +4 -3
- package/runtime/xt_values/strings.inc +94 -4
- package/runtime/xt_values/utf16.inc +340 -0
- package/runtime/xt_values.c +1 -0
- package/scripts/bench.ts +172 -0
- package/scripts/build-runtime.ts +2 -1
- package/scripts/check-version.ts +53 -0
- package/src/ast/common.ts +23 -0
- package/src/cli/main.ts +68 -26
- package/src/codegen/generator/calls/access.ts +7 -2
- package/src/codegen/generator/calls/closures.ts +3 -0
- package/src/codegen/generator/calls/invocation.ts +9 -3
- package/src/codegen/generator/context.ts +129 -18
- package/src/codegen/generator/debug.ts +132 -0
- package/src/codegen/generator/expressions/assignment.ts +9 -5
- package/src/codegen/generator/expressions/operators.ts +47 -8
- package/src/codegen/generator/expressions/primary.ts +11 -3
- package/src/codegen/generator/generator.ts +18 -2
- package/src/codegen/generator/module.ts +83 -13
- package/src/codegen/generator/numeric.ts +158 -0
- package/src/codegen/generator/state.ts +26 -0
- package/src/codegen/generator/statements/control-flow.ts +2 -3
- package/src/codegen/generator/statements/dispatch.ts +3 -0
- package/src/codegen/generator/statements/variables.ts +8 -2
- package/src/codegen/generator/tables.ts +110 -2
- package/src/driver/bundler/merge.ts +39 -5
- package/src/driver/compiler.ts +65 -55
- package/src/driver/fingerprint.ts +85 -0
- package/src/driver/toolchain-provider.ts +17 -16
- package/src/driver/toolchain.ts +210 -21
- package/src/parser/expressions.ts +20 -1
|
@@ -50,11 +50,36 @@ export declare class GeneratorContext {
|
|
|
50
50
|
readonly strings: Map<string, {
|
|
51
51
|
label: string;
|
|
52
52
|
length: number;
|
|
53
|
+
slot: string;
|
|
53
54
|
}>;
|
|
54
55
|
readonly classGlobals: Map<number, string>;
|
|
55
56
|
readonly moduleGlobals: Map<number, string>;
|
|
56
57
|
readonly extraDeclarations: Set<string>;
|
|
58
|
+
/** Static C strings used only as metadata (stack frame names/files). */
|
|
59
|
+
readonly staticStrings: Map<string, string>;
|
|
60
|
+
/** Lazily built line-start indexes per source file, for stack frames. */
|
|
61
|
+
readonly lineStartsByFile: Map<string, number[]>;
|
|
57
62
|
stringCounter: number;
|
|
63
|
+
staticCounter: number;
|
|
64
|
+
/**
|
|
65
|
+
* How many `UnsupportedFeature` diagnostics the function currently being
|
|
66
|
+
* emitted produced. Unsupported constructs can leave the generator with a
|
|
67
|
+
* partially-bound tree; reporting the resulting invariant failures as
|
|
68
|
+
* "Internal: …" only buries the actionable error, so they are suppressed
|
|
69
|
+
* while this is non-zero.
|
|
70
|
+
*/
|
|
71
|
+
unsupportedCount: number;
|
|
72
|
+
/** Emit DWARF debug metadata (`--debug`). */
|
|
73
|
+
readonly debug: boolean;
|
|
74
|
+
/** Numbered metadata definitions, emitted after the functions. */
|
|
75
|
+
metadataCounter: number;
|
|
76
|
+
readonly metadata: string[];
|
|
77
|
+
readonly debugFiles: Map<string, string>;
|
|
78
|
+
readonly debugSubprograms: Map<number, string>;
|
|
79
|
+
readonly debugLocations: Map<string, string>;
|
|
80
|
+
debugUnit?: string;
|
|
81
|
+
debugFlags: string[];
|
|
82
|
+
debugSubroutineType?: string;
|
|
58
83
|
current: FunctionState;
|
|
59
84
|
constructor(sourceFile: SourceFileNode, diagnostics: DiagnosticBag, options?: CodegenOptions);
|
|
60
85
|
/**
|
|
@@ -104,6 +129,11 @@ export declare class GeneratorContext {
|
|
|
104
129
|
label(prefix: string): string;
|
|
105
130
|
startBlock(label: string): void;
|
|
106
131
|
alloca(): string;
|
|
132
|
+
/** Lay already-computed values out as a contiguous `i64*` argument buffer. */
|
|
133
|
+
emitValueArguments(values: readonly string[]): {
|
|
134
|
+
argc: string;
|
|
135
|
+
ptr: string;
|
|
136
|
+
};
|
|
107
137
|
const(value: bigint): string;
|
|
108
138
|
declareSlot(symbol: SymbolInfo, initial: string): void;
|
|
109
139
|
defineCaptureSlot(symbol: SymbolInfo, box: string): void;
|
|
@@ -118,7 +148,27 @@ export declare class GeneratorContext {
|
|
|
118
148
|
internString(text: string): {
|
|
119
149
|
label: string;
|
|
120
150
|
length: number;
|
|
151
|
+
slot: string;
|
|
121
152
|
};
|
|
153
|
+
/**
|
|
154
|
+
* Intern a string purely as static module data (no `xt_string` value), for
|
|
155
|
+
* metadata such as shadow-stack frame names and file paths.
|
|
156
|
+
*/
|
|
157
|
+
internStatic(text: string): string;
|
|
158
|
+
/** Strip a bundler-generated module prefix (`m1_`) from a display name. */
|
|
159
|
+
displayNameOf(name: string): string;
|
|
160
|
+
/** 1-based line and column of `node` in the module it came from. */
|
|
161
|
+
positionOf(node: Node): {
|
|
162
|
+
line: number;
|
|
163
|
+
column: number;
|
|
164
|
+
};
|
|
165
|
+
/** 1-based line of `node` in the module it came from (for stack frames). */
|
|
166
|
+
lineOf(node: Node): number;
|
|
167
|
+
/** The source file a node belongs to. Bundling merges every module into one
|
|
168
|
+
* `SourceFile` while keeping module-local offsets, so the origin map is what
|
|
169
|
+
* keeps diagnostics pointing at the file the user actually wrote.
|
|
170
|
+
*/
|
|
171
|
+
fileNameOf(node: Node): string;
|
|
122
172
|
unsupported(node: Node, what: string): void;
|
|
123
173
|
/**
|
|
124
174
|
* Report a CommonJS `require(...)` use. xbintsc has no CommonJS module
|
|
@@ -48,7 +48,31 @@ export class GeneratorContext {
|
|
|
48
48
|
classGlobals = new Map();
|
|
49
49
|
moduleGlobals = new Map();
|
|
50
50
|
extraDeclarations = new Set();
|
|
51
|
+
/** Static C strings used only as metadata (stack frame names/files). */
|
|
52
|
+
staticStrings = new Map();
|
|
53
|
+
/** Lazily built line-start indexes per source file, for stack frames. */
|
|
54
|
+
lineStartsByFile = new Map();
|
|
51
55
|
stringCounter = 0;
|
|
56
|
+
staticCounter = 0;
|
|
57
|
+
/**
|
|
58
|
+
* How many `UnsupportedFeature` diagnostics the function currently being
|
|
59
|
+
* emitted produced. Unsupported constructs can leave the generator with a
|
|
60
|
+
* partially-bound tree; reporting the resulting invariant failures as
|
|
61
|
+
* "Internal: …" only buries the actionable error, so they are suppressed
|
|
62
|
+
* while this is non-zero.
|
|
63
|
+
*/
|
|
64
|
+
unsupportedCount = 0;
|
|
65
|
+
/** Emit DWARF debug metadata (`--debug`). */
|
|
66
|
+
debug;
|
|
67
|
+
/** Numbered metadata definitions, emitted after the functions. */
|
|
68
|
+
metadataCounter = 0;
|
|
69
|
+
metadata = [];
|
|
70
|
+
debugFiles = new Map();
|
|
71
|
+
debugSubprograms = new Map();
|
|
72
|
+
debugLocations = new Map();
|
|
73
|
+
debugUnit;
|
|
74
|
+
debugFlags = [];
|
|
75
|
+
debugSubroutineType;
|
|
52
76
|
current;
|
|
53
77
|
constructor(sourceFile, diagnostics, options = {}) {
|
|
54
78
|
this.sourceFile = sourceFile;
|
|
@@ -58,6 +82,7 @@ export class GeneratorContext {
|
|
|
58
82
|
this.modules = options.modules ?? {};
|
|
59
83
|
this.moduleHints = options.moduleHints ?? {};
|
|
60
84
|
this.target = options.target ?? { platform: process.platform, arch: process.arch };
|
|
85
|
+
this.debug = options.debug === true;
|
|
61
86
|
this.resolveImports();
|
|
62
87
|
}
|
|
63
88
|
/**
|
|
@@ -110,7 +135,7 @@ export class GeneratorContext {
|
|
|
110
135
|
}
|
|
111
136
|
}
|
|
112
137
|
else if (this.usedAsValue(symbol)) {
|
|
113
|
-
this.diagnostics.error(DiagnosticCode.ModuleNotFound, `Module '"${specifier}"' has no exported member '${importedName}'`, specifierNode.name, this.
|
|
138
|
+
this.diagnostics.error(DiagnosticCode.ModuleNotFound, `Module '"${specifier}"' has no exported member '${importedName}'`, specifierNode.name, this.fileNameOf(specifierNode.name));
|
|
114
139
|
this.missingModuleSymbols.add(symbol.id);
|
|
115
140
|
}
|
|
116
141
|
}
|
|
@@ -134,7 +159,7 @@ export class GeneratorContext {
|
|
|
134
159
|
reportMissingModule(declaration, specifier) {
|
|
135
160
|
const provider = this.moduleHints[specifier];
|
|
136
161
|
if (provider) {
|
|
137
|
-
this.diagnostics.error(DiagnosticCode.ModuleNotFound, `module '${specifier}' is provided by the '${provider}' extension; pass --ext ${provider}`, declaration.moduleSpecifier, this.
|
|
162
|
+
this.diagnostics.error(DiagnosticCode.ModuleNotFound, `module '${specifier}' is provided by the '${provider}' extension; pass --ext ${provider}`, declaration.moduleSpecifier, this.fileNameOf(declaration.moduleSpecifier));
|
|
138
163
|
this.markMissingModuleSymbols(declaration);
|
|
139
164
|
return;
|
|
140
165
|
}
|
|
@@ -148,7 +173,7 @@ export class GeneratorContext {
|
|
|
148
173
|
if (!symbols.some((symbol) => this.usedAsValue(symbol)))
|
|
149
174
|
return;
|
|
150
175
|
this.diagnostics.error(DiagnosticCode.ModuleNotFound, `module '${specifier}' is not supported: xbintsc can import built-in platform modules, ` +
|
|
151
|
-
"relative '.ts' files and ESM packages under node_modules; CommonJS packages are not supported", declaration.moduleSpecifier, this.
|
|
176
|
+
"relative '.ts' files and ESM packages under node_modules; CommonJS packages are not supported", declaration.moduleSpecifier, this.fileNameOf(declaration.moduleSpecifier));
|
|
152
177
|
for (const symbol of symbols)
|
|
153
178
|
this.missingModuleSymbols.add(symbol.id);
|
|
154
179
|
}
|
|
@@ -214,10 +239,11 @@ export class GeneratorContext {
|
|
|
214
239
|
}
|
|
215
240
|
// -- emission primitives -------------------------------------------------
|
|
216
241
|
emit(line) {
|
|
217
|
-
this.current.
|
|
242
|
+
const location = this.debug ? this.current.debugLocation : undefined;
|
|
243
|
+
this.current.buffer.push(location === undefined ? line : `${line}, !dbg ${location}`);
|
|
218
244
|
}
|
|
219
245
|
terminate(line) {
|
|
220
|
-
this.
|
|
246
|
+
this.emit(` ${line}`);
|
|
221
247
|
this.current.terminated = true;
|
|
222
248
|
}
|
|
223
249
|
reg() {
|
|
@@ -260,6 +286,19 @@ export class GeneratorContext {
|
|
|
260
286
|
this.current.escapePointers.push(ptr);
|
|
261
287
|
return ptr;
|
|
262
288
|
}
|
|
289
|
+
/** Lay already-computed values out as a contiguous `i64*` argument buffer. */
|
|
290
|
+
emitValueArguments(values) {
|
|
291
|
+
if (values.length === 0)
|
|
292
|
+
return { argc: "0", ptr: "null" };
|
|
293
|
+
const ptr = `%args${this.current.allocas.length}`;
|
|
294
|
+
this.current.allocas.push(`${ptr} = alloca i64, i32 ${values.length}`);
|
|
295
|
+
for (let index = 0; index < values.length; index++) {
|
|
296
|
+
const slot = this.reg();
|
|
297
|
+
this.emit(` ${slot} = getelementptr i64, i64* ${ptr}, i32 ${index}`);
|
|
298
|
+
this.emit(` store i64 ${values[index]}, i64* ${slot}`);
|
|
299
|
+
}
|
|
300
|
+
return { argc: String(values.length), ptr };
|
|
301
|
+
}
|
|
263
302
|
const(value) {
|
|
264
303
|
return i64(value);
|
|
265
304
|
}
|
|
@@ -309,8 +348,12 @@ export class GeneratorContext {
|
|
|
309
348
|
const slot = this.current.slots.get(symbol.id);
|
|
310
349
|
if (!slot) {
|
|
311
350
|
// Referenced from an inner function without a capture slot: this should
|
|
312
|
-
// be impossible once the binder has run, but stay defensive.
|
|
313
|
-
|
|
351
|
+
// be impossible once the binder has run, but stay defensive. After an
|
|
352
|
+
// unsupported construct the tree can be partially bound, so do not add
|
|
353
|
+
// an "Internal" error on top of the actionable one.
|
|
354
|
+
if (this.unsupportedCount === 0) {
|
|
355
|
+
this.diagnostics.error(DiagnosticCode.CodegenError, `Internal: no slot for '${symbol.name}' in ${this.current.fn.name}`);
|
|
356
|
+
}
|
|
314
357
|
return i64(XT_UNDEFINED);
|
|
315
358
|
}
|
|
316
359
|
const value = this.reg();
|
|
@@ -335,7 +378,9 @@ export class GeneratorContext {
|
|
|
335
378
|
}
|
|
336
379
|
const slot = this.current.slots.get(symbol.id);
|
|
337
380
|
if (!slot) {
|
|
338
|
-
this.
|
|
381
|
+
if (this.unsupportedCount === 0) {
|
|
382
|
+
this.diagnostics.error(DiagnosticCode.CodegenError, `Internal: no slot for '${symbol.name}'`);
|
|
383
|
+
}
|
|
339
384
|
return;
|
|
340
385
|
}
|
|
341
386
|
if (!slot.boxed) {
|
|
@@ -362,23 +407,89 @@ export class GeneratorContext {
|
|
|
362
407
|
stringValue(text) {
|
|
363
408
|
const entry = this.internString(text);
|
|
364
409
|
const result = this.reg();
|
|
365
|
-
|
|
410
|
+
// The value is created once in `main` and shared by every use, so a string
|
|
411
|
+
// literal (especially a property name in a hot loop) no longer allocates on
|
|
412
|
+
// each evaluation.
|
|
413
|
+
this.emit(` ${result} = load i64, i64* ${entry.slot}`);
|
|
366
414
|
return result;
|
|
367
415
|
}
|
|
368
416
|
internString(text) {
|
|
369
417
|
const existing = this.strings.get(text);
|
|
370
418
|
if (existing)
|
|
371
419
|
return existing;
|
|
372
|
-
const
|
|
420
|
+
const index = this.stringCounter++;
|
|
421
|
+
const label = `@.str.${index}`;
|
|
422
|
+
const slot = `@.strv.${index}`;
|
|
373
423
|
const bytes = utf8Bytes(text);
|
|
374
|
-
const entry = { label, length: bytes.length };
|
|
424
|
+
const entry = { label, length: bytes.length, slot };
|
|
375
425
|
this.strings.set(text, entry);
|
|
376
426
|
this.globals.push(`${label} = private unnamed_addr constant [${bytes.length + 1} x i8] c"${escapeBytes(bytes)}\\00"`);
|
|
427
|
+
// A GC-rooted global holding the runtime string value, initialised in main.
|
|
428
|
+
this.globals.push(`${slot} = internal global i64 0`);
|
|
377
429
|
return entry;
|
|
378
430
|
}
|
|
431
|
+
/**
|
|
432
|
+
* Intern a string purely as static module data (no `xt_string` value), for
|
|
433
|
+
* metadata such as shadow-stack frame names and file paths.
|
|
434
|
+
*/
|
|
435
|
+
internStatic(text) {
|
|
436
|
+
const existing = this.staticStrings.get(text);
|
|
437
|
+
if (existing)
|
|
438
|
+
return existing;
|
|
439
|
+
const label = `@.meta.${this.staticCounter++}`;
|
|
440
|
+
const bytes = utf8Bytes(text);
|
|
441
|
+
this.staticStrings.set(text, label);
|
|
442
|
+
this.globals.push(`${label} = private unnamed_addr constant [${bytes.length + 1} x i8] c"${escapeBytes(bytes)}\\00"`);
|
|
443
|
+
return label;
|
|
444
|
+
}
|
|
445
|
+
/** Strip a bundler-generated module prefix (`m1_`) from a display name. */
|
|
446
|
+
displayNameOf(name) {
|
|
447
|
+
for (const prefix of this.sourceFile.modulePrefixes ?? []) {
|
|
448
|
+
if (name.startsWith(prefix) && name.length > prefix.length)
|
|
449
|
+
return name.slice(prefix.length);
|
|
450
|
+
}
|
|
451
|
+
return name;
|
|
452
|
+
}
|
|
453
|
+
/** 1-based line and column of `node` in the module it came from. */
|
|
454
|
+
positionOf(node) {
|
|
455
|
+
const file = this.fileNameOf(node);
|
|
456
|
+
const text = this.sourceFile.moduleTexts?.get(file) ?? this.sourceFile.text;
|
|
457
|
+
let starts = this.lineStartsByFile.get(file);
|
|
458
|
+
if (!starts) {
|
|
459
|
+
starts = [0];
|
|
460
|
+
for (let index = 0; index < text.length; index++) {
|
|
461
|
+
if (text.charCodeAt(index) === 10)
|
|
462
|
+
starts.push(index + 1);
|
|
463
|
+
}
|
|
464
|
+
this.lineStartsByFile.set(file, starts);
|
|
465
|
+
}
|
|
466
|
+
const offset = Math.max(0, Math.min(node.start, text.length));
|
|
467
|
+
let low = 0;
|
|
468
|
+
let high = starts.length - 1;
|
|
469
|
+
while (low < high) {
|
|
470
|
+
const middle = (low + high + 1) >> 1;
|
|
471
|
+
if (starts[middle] <= offset)
|
|
472
|
+
low = middle;
|
|
473
|
+
else
|
|
474
|
+
high = middle - 1;
|
|
475
|
+
}
|
|
476
|
+
return { line: low + 1, column: offset - starts[low] + 1 };
|
|
477
|
+
}
|
|
478
|
+
/** 1-based line of `node` in the module it came from (for stack frames). */
|
|
479
|
+
lineOf(node) {
|
|
480
|
+
return this.positionOf(node).line;
|
|
481
|
+
}
|
|
482
|
+
/** The source file a node belongs to. Bundling merges every module into one
|
|
483
|
+
* `SourceFile` while keeping module-local offsets, so the origin map is what
|
|
484
|
+
* keeps diagnostics pointing at the file the user actually wrote.
|
|
485
|
+
*/
|
|
486
|
+
fileNameOf(node) {
|
|
487
|
+
return this.sourceFile.origins?.get(node) ?? this.sourceFile.fileName;
|
|
488
|
+
}
|
|
379
489
|
unsupported(node, what) {
|
|
380
490
|
const label = kindName(node.kind);
|
|
381
|
-
this.
|
|
491
|
+
this.unsupportedCount++;
|
|
492
|
+
this.diagnostics.error(DiagnosticCode.UnsupportedFeature, `xbintsc does not yet support this ${what} (${label})`, node, this.fileNameOf(node));
|
|
382
493
|
}
|
|
383
494
|
/**
|
|
384
495
|
* Report a CommonJS `require(...)` use. xbintsc has no CommonJS module
|
|
@@ -390,7 +501,7 @@ export class GeneratorContext {
|
|
|
390
501
|
const replacement = specifier
|
|
391
502
|
? `use an ESM import instead, e.g. \`import value from ${JSON.stringify(specifier)}\``
|
|
392
503
|
: "use an ESM `import` statement instead";
|
|
393
|
-
this.diagnostics.error(DiagnosticCode.UnsupportedFeature, `CommonJS \`require()\` is not supported; ${replacement}`, node, this.
|
|
504
|
+
this.diagnostics.error(DiagnosticCode.UnsupportedFeature, `CommonJS \`require()\` is not supported; ${replacement}`, node, this.fileNameOf(node));
|
|
394
505
|
}
|
|
395
506
|
}
|
|
396
507
|
/** The string literal passed to `require("...")`, when there is one. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../src/codegen/generator/context.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAoC,MAAM,wBAAwB,CAAC;AAE5F,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,UAAU,EAA2E,MAAM,oBAAoB,CAAC;AACzH,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAQjD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEhG,MAAM,OAAO,gBAAgB;IAClB,OAAO,CAAa;IACpB,UAAU,CAAiB;IAC3B,WAAW,CAAgB;IAC3B,QAAQ,CAA4C;IACpD,OAAO,CAA4C;IAC5D,gFAAgF;IACvE,WAAW,CAAmC;IACvD;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E,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC,aAAa,EAAE,CAAC;QACrD,OAAQ,KAAsC,CAAC,KAAK,CAAC;IACvD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,gFAAgF;AAChF,SAAS,eAAe,CAAC,SAAiB;IACxC,OAAO,CACL,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC;QAC1B,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC;QAC1B,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC;QAC3B,CAAC,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,CACnC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DWARF/CodeView metadata for `xbintsc build --debug`.
|
|
3
|
+
*
|
|
4
|
+
* The generated IR declares a compile unit, one `!DISubprogram` per compiled
|
|
5
|
+
* function and one cached `!DILocation` per statement position. With `-g`,
|
|
6
|
+
* clang turns these into DWARF (Linux/macOS) or CodeView (Windows), so a native
|
|
7
|
+
* debugger maps instructions back to the TypeScript source.
|
|
8
|
+
*
|
|
9
|
+
* Metadata is only emitted when debug is enabled: the nodes are large, and the
|
|
10
|
+
* default IR must stay byte-identical for the self-hosting fixpoint.
|
|
11
|
+
*/
|
|
12
|
+
import type { Node } from "../../ast/nodes.js";
|
|
13
|
+
import type { FunctionInfo } from "../../binder/binder.js";
|
|
14
|
+
import type { Generator } from "./generator.js";
|
|
15
|
+
export interface DebugMethods {
|
|
16
|
+
/** Allocate a numbered metadata node (`!0`, `!1`, …). */
|
|
17
|
+
metadataId(this: Generator): string;
|
|
18
|
+
/** Allocate a metadata node and register its definition. */
|
|
19
|
+
addMetadata(this: Generator, definition: string): string;
|
|
20
|
+
/** `!DIFile` for a source path, normalising separators like `source_filename`. */
|
|
21
|
+
debugFileFor(this: Generator, fileName: string): string;
|
|
22
|
+
/** `!DISubprogram` for a compiled function (created on first use). */
|
|
23
|
+
debugSubprogramFor(this: Generator, fn: FunctionInfo): string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Point subsequent instructions at `node`'s source position. Locations are
|
|
26
|
+
* cached per function/line/column so a statement emits one metadata node
|
|
27
|
+
* instead of one per instruction.
|
|
28
|
+
*/
|
|
29
|
+
setDebugLocation(this: Generator, node: Node): void;
|
|
30
|
+
/** Module-level metadata declarations and definitions (`--debug`). */
|
|
31
|
+
debugMetadataLines(this: Generator): string[];
|
|
32
|
+
}
|
|
33
|
+
export declare const debugMethods: DebugMethods;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DWARF/CodeView metadata for `xbintsc build --debug`.
|
|
3
|
+
*
|
|
4
|
+
* The generated IR declares a compile unit, one `!DISubprogram` per compiled
|
|
5
|
+
* function and one cached `!DILocation` per statement position. With `-g`,
|
|
6
|
+
* clang turns these into DWARF (Linux/macOS) or CodeView (Windows), so a native
|
|
7
|
+
* debugger maps instructions back to the TypeScript source.
|
|
8
|
+
*
|
|
9
|
+
* Metadata is only emitted when debug is enabled: the nodes are large, and the
|
|
10
|
+
* default IR must stay byte-identical for the self-hosting fixpoint.
|
|
11
|
+
*/
|
|
12
|
+
import { escapeBytes, utf8Bytes } from "./tables.js";
|
|
13
|
+
function escapeMetadata(text) {
|
|
14
|
+
return escapeBytes(utf8Bytes(text));
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Create the compile unit and module flags once. LLVM requires the `Debug Info
|
|
18
|
+
* Version` flag for any `!dbg` attachment, and clang only emits DWARF/CodeView
|
|
19
|
+
* for a module that declares a compile unit.
|
|
20
|
+
*/
|
|
21
|
+
function ensureDebugUnit(self) {
|
|
22
|
+
if (self.debugUnit !== undefined)
|
|
23
|
+
return;
|
|
24
|
+
const entryFile = self.debugFileFor(self.sourceFile.fileName);
|
|
25
|
+
const unit = self.addMetadata('distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: ' +
|
|
26
|
+
`${entryFile}, producer: "xbintsc", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)`);
|
|
27
|
+
self.debugUnit = unit;
|
|
28
|
+
self.debugFlags.push(self.addMetadata('!{i32 7, !"Dwarf Version", i32 4}'), self.addMetadata('!{i32 2, !"Debug Info Version", i32 3}'));
|
|
29
|
+
const types = self.addMetadata("!{null}");
|
|
30
|
+
self.debugSubroutineType = self.addMetadata(`!DISubroutineType(types: ${types})`);
|
|
31
|
+
}
|
|
32
|
+
export const debugMethods = {
|
|
33
|
+
metadataId() {
|
|
34
|
+
return `!${this.metadataCounter++}`;
|
|
35
|
+
},
|
|
36
|
+
addMetadata(definition) {
|
|
37
|
+
const id = this.metadataId();
|
|
38
|
+
this.metadata.push(`${id} = ${definition}`);
|
|
39
|
+
return id;
|
|
40
|
+
},
|
|
41
|
+
debugFileFor(fileName) {
|
|
42
|
+
const normalized = fileName.split("\\").join("/");
|
|
43
|
+
const existing = this.debugFiles.get(normalized);
|
|
44
|
+
if (existing)
|
|
45
|
+
return existing;
|
|
46
|
+
const slash = normalized.lastIndexOf("/");
|
|
47
|
+
const directory = slash >= 0 ? normalized.slice(0, slash) : ".";
|
|
48
|
+
const name = slash >= 0 ? normalized.slice(slash + 1) : normalized;
|
|
49
|
+
const id = this.addMetadata(`!DIFile(filename: "${escapeMetadata(name)}", directory: "${escapeMetadata(directory)}")`);
|
|
50
|
+
this.debugFiles.set(normalized, id);
|
|
51
|
+
return id;
|
|
52
|
+
},
|
|
53
|
+
debugSubprogramFor(fn) {
|
|
54
|
+
if (!this.debug)
|
|
55
|
+
return undefined;
|
|
56
|
+
const existing = this.debugSubprograms.get(fn.id);
|
|
57
|
+
if (existing)
|
|
58
|
+
return existing;
|
|
59
|
+
ensureDebugUnit(this);
|
|
60
|
+
const file = this.debugFileFor(this.fileNameOf(fn.node));
|
|
61
|
+
const position = this.positionOf(fn.node);
|
|
62
|
+
const displayName = fn.isModule
|
|
63
|
+
? "module"
|
|
64
|
+
: fn.isConstructor && fn.classInfo
|
|
65
|
+
? `new ${this.displayNameOf(fn.classInfo.name)}`
|
|
66
|
+
: this.displayNameOf(fn.name.length > 0 ? fn.name : "anonymous");
|
|
67
|
+
const subprogram = this.addMetadata('distinct !DISubprogram(name: ' +
|
|
68
|
+
`"${escapeMetadata(displayName)}", scope: ${this.debugUnit}, file: ${file}, ` +
|
|
69
|
+
`line: ${position.line}, type: ${this.debugSubroutineType}, scopeLine: ${position.line}, ` +
|
|
70
|
+
`spFlags: DISPFlagDefinition, unit: ${this.debugUnit})`);
|
|
71
|
+
this.debugSubprograms.set(fn.id, subprogram);
|
|
72
|
+
return subprogram;
|
|
73
|
+
},
|
|
74
|
+
setDebugLocation(node) {
|
|
75
|
+
if (!this.debug || this.current.debugSubprogram === undefined)
|
|
76
|
+
return;
|
|
77
|
+
const position = this.positionOf(node);
|
|
78
|
+
const key = `${this.current.debugSubprogram}:${position.line}:${position.column}`;
|
|
79
|
+
let location = this.debugLocations.get(key);
|
|
80
|
+
if (!location) {
|
|
81
|
+
location = this.addMetadata(`!DILocation(line: ${position.line}, column: ${position.column}, scope: ${this.current.debugSubprogram})`);
|
|
82
|
+
this.debugLocations.set(key, location);
|
|
83
|
+
}
|
|
84
|
+
this.current.debugLocation = location;
|
|
85
|
+
},
|
|
86
|
+
debugMetadataLines() {
|
|
87
|
+
if (!this.debug || this.debugUnit === undefined)
|
|
88
|
+
return [];
|
|
89
|
+
return [
|
|
90
|
+
`!llvm.dbg.cu = !{${this.debugUnit}}`,
|
|
91
|
+
`!llvm.module.flags = !{${this.debugFlags.join(", ")}}`,
|
|
92
|
+
...this.metadata,
|
|
93
|
+
"",
|
|
94
|
+
];
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=debug.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../../../src/codegen/generator/debug.ts"],"names":[],"mappings":"AAAA;;;;;;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,CAAC,MAAM,YAAY,IAAI,CAAC,OAAO,CAAC,eAAe,GAAG,CAC1G,CAAC;YACF,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACzC,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,aAAa,GAAG,QAAQ,CAAC;IACxC,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS;YAAE,OAAO,EAAE,CAAC;QAC3D,OAAO;YACL,oBAAoB,IAAI,CAAC,SAAS,GAAG;YACrC,0BAA0B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;YACvD,GAAG,IAAI,CAAC,QAAQ;YAChB,EAAE;SACH,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -34,9 +34,7 @@ export const assignmentExpressionMethods = {
|
|
|
34
34
|
this.unsupported(node, `assignment operator '${operator}'`);
|
|
35
35
|
return i64(XT_UNDEFINED);
|
|
36
36
|
}
|
|
37
|
-
|
|
38
|
-
this.emit(` ${result} = call i64 @${runtime}(i64 ${current}, i64 ${right})`);
|
|
39
|
-
value = result;
|
|
37
|
+
value = this.emitBinaryOperation(current, right, binaryOperator, runtime);
|
|
40
38
|
}
|
|
41
39
|
this.emitAssignmentTarget(target, value);
|
|
42
40
|
return value;
|
|
@@ -93,7 +91,7 @@ export const assignmentExpressionMethods = {
|
|
|
93
91
|
if (symbol.kind === SymbolKind.Const || symbol.kind === SymbolKind.Import) {
|
|
94
92
|
this.diagnostics.error(DiagnosticCode.CannotAssignToConst, symbol.kind === SymbolKind.Import
|
|
95
93
|
? `Cannot assign to '${symbol.name}' because it is an import.`
|
|
96
|
-
: `Cannot assign to '${symbol.name}' because it is a constant.`, identifier, this.
|
|
94
|
+
: `Cannot assign to '${symbol.name}' because it is a constant.`, identifier, this.fileNameOf(identifier));
|
|
97
95
|
return;
|
|
98
96
|
}
|
|
99
97
|
this.writeSlot(symbol, value);
|
|
@@ -160,9 +158,13 @@ export const assignmentExpressionMethods = {
|
|
|
160
158
|
},
|
|
161
159
|
/** `{ a, b } = value` / `for ({ a } of xs)`: assign each property of `value`. */
|
|
162
160
|
emitObjectAssignmentTarget(pattern, value) {
|
|
161
|
+
const excludedKeys = [];
|
|
163
162
|
for (const property of pattern.properties) {
|
|
164
163
|
if (property.kind === SyntaxKind.SpreadElement) {
|
|
165
|
-
this.
|
|
164
|
+
const rest = this.reg();
|
|
165
|
+
const keys = this.emitValueArguments(excludedKeys);
|
|
166
|
+
this.emit(` ${rest} = call i64 @xt_object_rest(i64 ${value}, i32 ${keys.argc}, i64* ${keys.ptr})`);
|
|
167
|
+
this.emitAssignmentTarget(property.expression, rest);
|
|
166
168
|
continue;
|
|
167
169
|
}
|
|
168
170
|
if (property.kind === SyntaxKind.PropertyAssignment) {
|
|
@@ -174,6 +176,7 @@ export const assignmentExpressionMethods = {
|
|
|
174
176
|
else {
|
|
175
177
|
key = this.stringValue(propertyNameText(assignment.name));
|
|
176
178
|
}
|
|
179
|
+
excludedKeys.push(key);
|
|
177
180
|
let target = assignment.initializer;
|
|
178
181
|
let fallback;
|
|
179
182
|
if (isPlainAssignment(target)) {
|
|
@@ -190,6 +193,7 @@ export const assignmentExpressionMethods = {
|
|
|
190
193
|
}
|
|
191
194
|
const shorthand = property;
|
|
192
195
|
const key = this.stringValue(shorthand.name.text);
|
|
196
|
+
excludedKeys.push(key);
|
|
193
197
|
let elementValue = this.reg();
|
|
194
198
|
this.emit(` ${elementValue} = call i64 @xt_get(i64 ${value}, i64 ${key})`);
|
|
195
199
|
if (shorthand.initializer)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assignment.js","sourceRoot":"","sources":["../../../../../src/codegen/generator/expressions/assignment.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,UAAU,EACV,kBAAkB,GAWnB,MAAM,uBAAuB,CAAC;AAC/B,OAA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