@oseo/backend-c 0.0.0-stage → 0.1.0-canary.0

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.
@@ -0,0 +1,1309 @@
1
+ //#region src/emitted-c.ts
2
+ /*! SPDX-License-Identifier: MIT
3
+ * Copyright (c) 2026 Hong Minhee; see ../MIT-LICENSE.txt.
4
+ */
5
+ const emittedC = {
6
+ normalReturn: {
7
+ resultAssignOseoResultOseoStatusNormal: [
8
+ [""],
9
+ ["result = (OseoResult){OSEO_STATUS_NORMAL, "],
10
+ ["};"]
11
+ ],
12
+ releaseRoots: [[""], ["oseo_roots_release(context, &frame);"]],
13
+ returnResult: [[""], ["return result;"]]
14
+ },
15
+ cString: {
16
+ backslashEscape: [["\\\\"]],
17
+ quoteEscape: [["\\\""]],
18
+ questionMarkEscape: [["\\?"]],
19
+ newlineEscape: [["\\n"]],
20
+ octalEscape: [["\\"], [""]],
21
+ octalPadding: [["0"]]
22
+ },
23
+ line: { indentLine: [[" "], [""]] },
24
+ location: {
25
+ sourceLocationPrefix: [
26
+ ["oseo_context_source_location(context, \""],
27
+ ["\", "],
28
+ ["u, "]
29
+ ],
30
+ locationPrefix: [["oseo_context_location(context, "], ["u, "]]
31
+ },
32
+ common: {
33
+ sourcePositionSuffix: [
34
+ [""],
35
+ ["u, "],
36
+ ["u);"]
37
+ ],
38
+ positionSuffix: [[""], ["u);"]],
39
+ staticConstUint16TAssignStatement: [
40
+ ["static const uint16_t "],
41
+ ["[] = {"],
42
+ ["};"]
43
+ ],
44
+ staticConstSizeTArrayAssignStatement: [
45
+ ["static const size_t "],
46
+ ["[] = {"],
47
+ ["};"]
48
+ ],
49
+ commaSpace: [[", "]],
50
+ rootAssignResultValue: [["roots["], ["] = result.value;"]],
51
+ rootsAssignOseoUndefinedStatement: [["roots["], ["] = oseo_undefined();"]],
52
+ trueValue: [["true"]],
53
+ falseValue: [["false"]],
54
+ rootsAssignOseoBooleanStatement: [
55
+ ["roots["],
56
+ ["] = oseo_boolean("],
57
+ [");"]
58
+ ],
59
+ gotoAbruptUnlessNormal: [["if (result.status != OSEO_STATUS_NORMAL) goto ab", "rupt;"]],
60
+ nullPointer: [["NULL"]],
61
+ rootAssignRoot: [
62
+ ["roots["],
63
+ ["] = roots["],
64
+ ["];"]
65
+ ],
66
+ undefinedValue: [["oseo_undefined()"]],
67
+ root: [["roots["], ["]"]],
68
+ resultAssignOseoEnvironmentGetContext: [["result = oseo_environment_get(context, "]],
69
+ rootsUStatement: [
70
+ ["roots["],
71
+ ["], "],
72
+ ["u);"]
73
+ ],
74
+ statusNormalOpen: [["if (result.status == OSEO_STATUS_NORMAL) {"]],
75
+ closeBlock: [["}"]],
76
+ resultAssignOseoCellCreateContextOseo: [["result = oseo_cell_create(context, oseo_uninitia", "lized());"]],
77
+ rootsU: [
78
+ ["roots["],
79
+ ["], "],
80
+ ["u, "]
81
+ ],
82
+ rootCallSuffix: [["roots["], ["]);"]],
83
+ rootsAssign: [["roots["], ["] = "]],
84
+ unaryToNumber: [["oseo_to_number"]],
85
+ unaryToNumeric: [["oseo_to_numeric"]],
86
+ unaryNumericOne: [["oseo_numeric_one"]],
87
+ unaryNegate: [["oseo_negate"]],
88
+ unaryToString: [["oseo_to_string"]],
89
+ unaryTypeof: [["oseo_typeof"]],
90
+ unaryBitwiseNot: [["oseo_bitwise_not"]],
91
+ oseoToBooleanRoots: [["oseo_to_boolean(roots["], ["])"]],
92
+ iteratorDone: [["iterator_done_"], [""]],
93
+ empty: [[""]],
94
+ iteratorDelegateNext: [["next"]],
95
+ iteratorDelegateReturn: [["return"]],
96
+ iteratorDelegateThrow: [["throw"]],
97
+ rootWithComma: [["roots["], ["], "]],
98
+ twoRootsWithComma: [
99
+ ["roots["],
100
+ ["], "],
101
+ [", "]
102
+ ],
103
+ boolFastAssignStatement: [
104
+ ["bool fast_"],
105
+ [" = !"],
106
+ [";"]
107
+ ],
108
+ voidFastStatement: [["(void)fast_"], [";"]],
109
+ rootsRootsAddressRoots: [
110
+ ["roots["],
111
+ ["], roots["],
112
+ ["], &roots["],
113
+ ["], "]
114
+ ],
115
+ ifOpen: [["if ("], [") {"]],
116
+ resultAssignOseoResultOseoStatusNormalOseo: [[
117
+ " result = (OseoResult){OSEO_STATUS_NORMAL, os",
118
+ "eo_undef",
119
+ "ined()};"
120
+ ]],
121
+ elseOpen: [["} else {"]],
122
+ addressStatement: [["&"], [");"]],
123
+ rootsCompletionUKindEqualStatement: [
124
+ ["roots["],
125
+ ["], completion["],
126
+ ["u].kind == 2);"]
127
+ ],
128
+ callSuffix: [[""], [");"]],
129
+ resultAssignContext: [["result = "], ["(context, "]],
130
+ twoValuesCallSuffix: [
131
+ [""],
132
+ [", "],
133
+ [");"]
134
+ ],
135
+ valueWithComma: [[""], [", "]],
136
+ undefinedFinalArgumentCallSuffix: [["oseo_undefined());"]],
137
+ twoValuesWithComma: [
138
+ [""],
139
+ [", "],
140
+ [", "]
141
+ ],
142
+ indentedCloseBlock: [[" }"]],
143
+ unsignedWithComma: [[""], ["u, "]],
144
+ resultAssignOseoObjectDefineContextRoots: [["result = oseo_object_define(context, roots["], ["], "]],
145
+ rootsRoots: [
146
+ ["roots["],
147
+ ["], roots["],
148
+ ["], "]
149
+ ],
150
+ rootsRootsStatement: [
151
+ ["roots["],
152
+ ["], roots["],
153
+ ["]);"]
154
+ ],
155
+ rootsStatement: [
156
+ ["roots["],
157
+ ["], "],
158
+ [");"]
159
+ ],
160
+ resultAssignOseoFunctionPrototypeContext: [["result = oseo_function_prototype(context, roots["], ["]);"]],
161
+ rootsAssignResultValueIfStatusNormal: [["if (result.status == OSEO_STATUS_NORMAL) roots["], ["] = result.value;"]],
162
+ rootsRootsRootsStatement: [
163
+ ["roots["],
164
+ ["], roots["],
165
+ ["], roots["],
166
+ ["]);"]
167
+ ],
168
+ privateGetterKind: [["OSEO_PRIVATE_GETTER"]],
169
+ privateSetterKind: [["OSEO_PRIVATE_SETTER"]],
170
+ privateMethodKind: [["OSEO_PRIVATE_METHOD"]],
171
+ resultAssignOseoModuleNamespaceCreate: [["result = oseo_module_namespace_create(context, "]],
172
+ bracedInitializer: [["{"], ["};"]],
173
+ oseoContextClearLanguageErrorContext: [["oseo_context_clear_language_error(context);"]],
174
+ resultAssignOseoResultOseoStatusNormal: [["result = (OseoResult){OSEO_STATUS_NORMAL, "]],
175
+ rootUnsignedInitializerSuffix: [["roots["], ["u]};"]],
176
+ contextMemberSourceIdLengthStatement: [["context->source_id_length;"]],
177
+ uStatement: [[""], ["u;"]],
178
+ rootsUAssign: [[" roots["], ["u] = "]],
179
+ gotoBbStatement: [[" goto bb"], [";"]],
180
+ returnResult: [["return result;"]],
181
+ gotoBlock: [["goto bb"], [";"]],
182
+ ifCompletionKindThrowOpen: [["if (completion["], ["u].kind == 2) {"]],
183
+ rootUnsigned: [["roots["], ["u]"]],
184
+ indent: [[" "]],
185
+ caseUGotoBbStatement: [
186
+ ["case "],
187
+ ["u: goto bb"],
188
+ [";"]
189
+ ],
190
+ defaultAbortStatement: [["default: abort();"]],
191
+ resultAssignOseoEnvironmentGetContextRoots: [["result = oseo_environment_get(context, roots["], ["], "]],
192
+ ifOseoGeneratorResumeKindGeneratorEqual: [["if (oseo_generator_resume_kind(generator) == "]],
193
+ voidCompletionLine: [[" (void)completion;\n"]],
194
+ abruptLabel: [["abrupt:"]],
195
+ oseoContextPointerContextLine: [[" OseoContext *context,\n"]],
196
+ functionBodyOpenLine: [[") {\n"]],
197
+ voidCalleeLine: [[" (void)callee;\n"]],
198
+ voidReceiverLine: [[" (void)receiver;\n"]],
199
+ valueThenNewline: [[""], ["\n"]],
200
+ newline: [["\n"]],
201
+ closeBlockLine: [["}\n"]],
202
+ script: [["script"]],
203
+ oseoResultResultLine: [[" OseoResult result;\n"]],
204
+ valueThenBlankLine: [[""], ["\n\n"]]
205
+ },
206
+ operatorHelper: {
207
+ oseoNotLooseEqual: [["oseo_not_loose_equal"]],
208
+ oseoNotStrictEqual: [["oseo_not_strict_equal"]],
209
+ oseoRemainder: [["oseo_remainder"]],
210
+ oseoBitwiseAnd: [["oseo_bitwise_and"]],
211
+ oseoMultiply: [["oseo_multiply"]],
212
+ oseoExponentiate: [["oseo_exponentiate"]],
213
+ oseoAdd: [["oseo_add"]],
214
+ oseoSubtract: [["oseo_subtract"]],
215
+ oseoDivide: [["oseo_divide"]],
216
+ oseoLessThan: [["oseo_less_than"]],
217
+ oseoShiftLeft: [["oseo_shift_left"]],
218
+ oseoLessEqual: [["oseo_less_equal"]],
219
+ oseoLooseEqual: [["oseo_loose_equal"]],
220
+ oseoStrictEqual: [["oseo_strict_equal"]],
221
+ oseoGreaterThan: [["oseo_greater_than"]],
222
+ oseoGreaterEqual: [["oseo_greater_equal"]],
223
+ oseoShiftRight: [["oseo_shift_right"]],
224
+ oseoShiftRightUnsigned: [["oseo_shift_right_unsigned"]],
225
+ oseoBitwiseXor: [["oseo_bitwise_xor"]],
226
+ oseoHasProperty: [["oseo_has_property"]],
227
+ oseoInstanceof: [["oseo_instanceof"]],
228
+ oseoBitwiseOr: [["oseo_bitwise_or"]]
229
+ },
230
+ numberLiteral: {
231
+ nan: [["NAN"]],
232
+ positiveInfinity: [["INFINITY"]],
233
+ negativeInfinity: [["-INFINITY"]],
234
+ negativeZero: [["-0.0"]],
235
+ integerAsDouble: [[""], [".0"]]
236
+ },
237
+ stringConstant: {
238
+ nullU: [["NULL, 0u"]],
239
+ stringUnits: [["string_units_"], [""]],
240
+ unitsWithLength: [
241
+ [""],
242
+ [", "],
243
+ ["u"]
244
+ ],
245
+ resultAssignOseoStringFromUnitsContext: [["result = oseo_string_from_units(context, "], [");"]]
246
+ },
247
+ templateObject: {
248
+ siteDeclaration: [["static const char "], [" = 0;"]],
249
+ pointerArrayDeclaration: [
250
+ ["static const uint16_t *const "],
251
+ ["[] = {"],
252
+ ["};"]
253
+ ],
254
+ sizeArrayDeclaration: [
255
+ ["static const size_t "],
256
+ ["[] = {"],
257
+ ["};"]
258
+ ],
259
+ boolArrayDeclaration: [
260
+ ["static const bool "],
261
+ ["[] = {"],
262
+ ["};"]
263
+ ],
264
+ resultAssign: [
265
+ ["result = oseo_template_object(context, &"],
266
+ [", "],
267
+ ["u, "],
268
+ [", "],
269
+ [", "],
270
+ [", "],
271
+ [", "],
272
+ [");"]
273
+ ]
274
+ },
275
+ regexpLiteral: {
276
+ uint16ArrayDeclaration: [
277
+ ["static uint16_t "],
278
+ ["[] = {"],
279
+ ["};"]
280
+ ],
281
+ uint32ArrayDeclaration: [
282
+ ["static uint32_t "],
283
+ ["[] = {"],
284
+ ["};"]
285
+ ],
286
+ instructionArrayDeclaration: [
287
+ ["static OseoRegExpInstruction "],
288
+ ["[] = {"],
289
+ ["};"]
290
+ ],
291
+ repeatArrayDeclaration: [
292
+ ["static OseoRegExpRepeat "],
293
+ ["[] = {"],
294
+ ["};"]
295
+ ],
296
+ captureArrayDeclaration: [
297
+ ["static OseoRegExpCapture "],
298
+ ["[] = {"],
299
+ ["};"]
300
+ ],
301
+ instructionValue: [
302
+ ["{"],
303
+ ["u, "],
304
+ ["u, {"],
305
+ ["u, "],
306
+ ["u, "],
307
+ ["u, "],
308
+ ["u}}"]
309
+ ],
310
+ repeatValue: [
311
+ ["{"],
312
+ [", "],
313
+ [", "],
314
+ ["u, "],
315
+ ["u}"]
316
+ ],
317
+ captureValue: [
318
+ ["{"],
319
+ ["u, "],
320
+ ["u, "],
321
+ ["}"]
322
+ ],
323
+ unsignedValue: [[""], ["u"]],
324
+ unsignedLongValue: [["UINT64_C("], [")"]],
325
+ unboundedValue: [["UINT64_MAX"]],
326
+ programDeclaration: [
327
+ ["static OseoRegExpProgram "],
328
+ [" = {"],
329
+ ["};"]
330
+ ],
331
+ literalDeclaration: [
332
+ ["static const OseoRegExpLiteral "],
333
+ [" = {"],
334
+ ["};"]
335
+ ],
336
+ programAddress: [["&"], [""]],
337
+ resultAssign: [["result = oseo_regexp_literal(context, &"], [");"]]
338
+ },
339
+ constant: {
340
+ resultAssignBigIntLiteral: [
341
+ ["result = oseo_bigint_literal(context, \""],
342
+ ["\", "],
343
+ ["u);"]
344
+ ],
345
+ rootsAssignOseoNullStatement: [["roots["], ["] = oseo_null();"]],
346
+ rootsAssignOseoNumberStatement: [
347
+ ["roots["],
348
+ ["] = oseo_number("],
349
+ [");"]
350
+ ]
351
+ },
352
+ arguments: {
353
+ incomingCount: [["argument_count"]],
354
+ incomingValues: [["arguments"]],
355
+ argumentCount: [["argument_count_"], [""]],
356
+ argumentValues: [["argument_values_"], [""]],
357
+ sizeTAssignUStatement: [["size_t "], [" = 0u;"]],
358
+ constOseoValuePointerAssignNullStatement: [["const OseoValue *"], [" = NULL;"]],
359
+ resultAssignOseoArgumentListViewContext: [["result = oseo_argument_list_view(context, "]],
360
+ rootsAddressAddressStatement: [
361
+ ["roots["],
362
+ ["], &"],
363
+ [", &"],
364
+ [");"]
365
+ ],
366
+ zeroUnsigned: [["0u"]],
367
+ unsignedCount: [[""], ["u"]],
368
+ addressOfRoot: [["&roots["], ["]"]]
369
+ },
370
+ argument: {
371
+ boundedArgumentCount: [
372
+ ["("],
373
+ [" > "],
374
+ ["u ? "]
375
+ ],
376
+ oseoUndefined: [
377
+ [""],
378
+ ["["],
379
+ ["] : oseo_undefined())"]
380
+ ]
381
+ },
382
+ read: { resultAssignOseoCellGetContextResultValue: [["result = oseo_cell_get(context, result.value);"]] },
383
+ write: {
384
+ resultAssignOseoResultOseoStatusNormal: [["result = (OseoResult){OSEO_STATUS_NORMAL, roots["], ["]};"]],
385
+ resultAssignOseoWriteImmutableBinding: [["result = oseo_write_immutable_binding(context);"]],
386
+ resultAssignOseoCellGetContextResultValue: [[" result = oseo_cell_get(context, result.value", ");"]],
387
+ indentedWriteImmutableBinding: [[" result = oseo_write_immutable_binding(contex", "t);"]],
388
+ resultAssignOseoCellSetContextResultValue: [["result = oseo_cell_set(context, result.value, ro", "ots["], ["]);"]],
389
+ resultAssignOseoGlobalBindingSet: [
390
+ [
391
+ "result = oseo_global_binding_set(context, result.",
392
+ "value, ro",
393
+ "ots["
394
+ ],
395
+ ["], "],
396
+ [");"]
397
+ ]
398
+ },
399
+ initialize: { resultAssignOseoCellInitializeContext: [[
400
+ "result = oseo_cell_initialize(context, result.va",
401
+ "lue, roo",
402
+ "ts["
403
+ ], ["]);"]] },
404
+ bindingReset: { resultAssignOseoEnvironmentSetContext: [[" result = oseo_environment_set(context, "]] },
405
+ unary: {
406
+ oseoBooleanOseoToBooleanRootsStatement: [["oseo_boolean(!oseo_to_boolean(roots["], ["]));"]],
407
+ resultAssignContextRootsStatement: [
408
+ ["result = "],
409
+ ["(context, roots["],
410
+ ["]);"]
411
+ ]
412
+ },
413
+ binary: {
414
+ resultAssign: [["result = "], [""]],
415
+ contextRootsRootsStatement: [
416
+ ["(context, roots["],
417
+ ["], roots["],
418
+ ["]);"]
419
+ ]
420
+ },
421
+ guardSmi: { boolFastAssignOseoValueIsSmiRootsStatement: [
422
+ ["bool fast_"],
423
+ [" = oseo_value_is_smi(roots["],
424
+ ["]);"]
425
+ ] },
426
+ unboxSmi: {
427
+ int64TFastAssign: [["int64_t fast_"], [" = "]],
428
+ oseoValueUnboxSmiRootsStatement: [["oseo_value_unbox_smi(roots["], ["]);"]]
429
+ },
430
+ checkedAdd: {
431
+ int64TFastStatement: [["int64_t fast_"], [";"]],
432
+ boolFastAssignOseoSmiTryAdd: [["bool fast_"], [" = oseo_smi_try_add("]],
433
+ fastFastAddressFastStatement: [
434
+ ["fast_"],
435
+ [", fast_"],
436
+ [", &fast_"],
437
+ [");"]
438
+ ]
439
+ },
440
+ boxSmi: { rootsAssignOseoValueBoxSmiFastStatement: [
441
+ ["roots["],
442
+ ["] = oseo_value_box_smi(fast_"],
443
+ [");"]
444
+ ] },
445
+ enumerateOperation: {
446
+ boolEnumerateDoneAssignTrueStatement: [["bool enumerate_done_"], [" = true;"]],
447
+ resultAssignOseoEnumerateGetContext: [
448
+ ["result = oseo_enumerate_get(context, roots["],
449
+ ["], &roots["],
450
+ ["], &enumerate_done_"],
451
+ [");"]
452
+ ],
453
+ resultAssignOseoEnumerateNextContext: [
454
+ ["result = oseo_enumerate_next(context, roots["],
455
+ ["], &roots["],
456
+ ["], &enumerate_done_"],
457
+ [");"]
458
+ ],
459
+ boolFastAssignEnumerateDoneStatement: [
460
+ ["bool fast_"],
461
+ [" = !enumerate_done_"],
462
+ [";"]
463
+ ]
464
+ },
465
+ disposalOperation: {
466
+ resultAssignScopeCreate: [["result = oseo_dispose_scope_create(context, "], [");"]],
467
+ resultAssignScopeAdd: [
468
+ ["result = oseo_dispose_scope_add(context, roots["],
469
+ ["], roots["],
470
+ ["], "],
471
+ [");"]
472
+ ],
473
+ resultAssignScopeCompletion: [
474
+ ["result = oseo_dispose_scope_"],
475
+ ["(context, roots["],
476
+ ["], completion["],
477
+ ["u].kind == 2, roots["],
478
+ ["]);"]
479
+ ],
480
+ resultAssignScopeQuery: [
481
+ ["result = oseo_dispose_scope_"],
482
+ ["(context, roots["],
483
+ ["]);"]
484
+ ],
485
+ resultAssignScopeContinue: [
486
+ ["result = oseo_dispose_scope_continue(context, roots["],
487
+ ["], "],
488
+ [", roots["],
489
+ ["]);"]
490
+ ]
491
+ },
492
+ iteratorOperation: {
493
+ asyncPrefix: [["async_"]],
494
+ resultAssignOseoIteratorGetContext: [["result = oseo_"], ["iterator_get(context, "]],
495
+ rootsAddressRootsStatement: [
496
+ ["roots["],
497
+ ["], &roots["],
498
+ ["]);"]
499
+ ],
500
+ rootsAssignOseoBooleanFalseStatement: [["roots["], ["] = oseo_boolean(false);"]],
501
+ rootsAssignCompletionKindThrowStatement: [
502
+ ["roots["],
503
+ ["] = oseo_boolean(completion["],
504
+ ["u].kind == 2);"]
505
+ ],
506
+ boolIteratorCloseAwaitAssignFalseStatement: [["bool iterator_close_await_"], [" = false;"]],
507
+ boolFastAssignIteratorCloseAwaitStatement: [
508
+ ["bool fast_"],
509
+ [" = iterator_close_await_"],
510
+ [";"]
511
+ ],
512
+ resultAssignOseoAsyncIteratorCloseStartContext: [
513
+ ["result = oseo_async_iterator_close_start(context, roots["],
514
+ ["], completion["],
515
+ ["u].kind == 2, &roots["],
516
+ ["], &iterator_close_await_"],
517
+ [");"]
518
+ ],
519
+ resultAssignOseoAsyncIteratorCloseResultContext: [
520
+ ["result = oseo_async_iterator_close_result(context, roots["],
521
+ ["], oseo_to_boolean(roots["],
522
+ ["]), oseo_to_boolean(roots["],
523
+ ["]));"]
524
+ ],
525
+ resultAssignOseoAsyncIteratorNextStartContext: [
526
+ ["result = oseo_async_iterator_next_start(context, roots["],
527
+ ["], roots["],
528
+ ["]);"]
529
+ ],
530
+ resultAssignOseoAsyncIteratorDelegateStartContext: [
531
+ ["result = oseo_async_iterator_delegate_"],
532
+ ["_start(context, roots["],
533
+ ["], "]
534
+ ],
535
+ rootsRootsAddressRootsStatementSuffix: [
536
+ ["roots["],
537
+ ["], roots["],
538
+ ["], &roots["],
539
+ ["]);"]
540
+ ],
541
+ rootsAddressRootsStatementSuffix: [
542
+ ["roots["],
543
+ ["], &roots["],
544
+ ["]);"]
545
+ ],
546
+ resultAssignOseoAsyncIteratorResultContext: [
547
+ ["result = oseo_async_iterator_result(context, roots["],
548
+ ["], oseo_to_boolean(roots["],
549
+ ["]), "],
550
+ [", roots["],
551
+ ["], "],
552
+ [", &roots["],
553
+ ["], &iterator_done_"],
554
+ [");"]
555
+ ],
556
+ boolIteratorDoneAssignFalseStatement: [["bool iterator_done_"], [" = false;"]],
557
+ boolAssignTrueStatement: [["bool "], [" = true;"]],
558
+ resultAssignOseoIteratorDelegateContext: [
559
+ ["result = oseo_"],
560
+ ["iterator_delegate_"],
561
+ ["(context, "]
562
+ ],
563
+ addressRootsAddressStatement: [
564
+ ["&roots["],
565
+ ["], &"],
566
+ [");"]
567
+ ],
568
+ boolIteratorDoneAssignTrueStatement: [["bool iterator_done_"], [" = true;"]],
569
+ resultAssignOseoIteratorNextContext: [["result = oseo_"], ["iterator_next(context, "]],
570
+ addressIteratorDoneStatement: [["&iterator_done_"], [");"]],
571
+ boolFastAssignIteratorDoneStatement: [
572
+ ["bool fast_"],
573
+ [" = !iterator_done_"],
574
+ [";"]
575
+ ],
576
+ iteratorStepDone: [["iterator_step_done_"], [""]],
577
+ boolAssignStatement: [
578
+ ["bool "],
579
+ [" = "],
580
+ [";"]
581
+ ],
582
+ rootsAssignOseoUndefinedStatement: [[" roots["], ["] = oseo_undefined();"]],
583
+ indentedIteratorNext: [[" result = oseo_"], ["iterator_next(context, "]],
584
+ resultAssignOseoIteratorCloseContext: [["result = oseo_"], ["iterator_close(context, "]],
585
+ indentedIteratorClose: [[" result = oseo_"], ["iterator_close(context, "]]
586
+ },
587
+ call: {
588
+ resultAssignOseoConsoleLogContext: [["result = oseo_console_log(context, "], [", "]],
589
+ resultAssignOseoModuleGraphEvaluateContext: [["result = oseo_module_graph_evaluate(context, "], [", "]],
590
+ resultAssignOseoModuleImportContext: [["result = oseo_module_import(context, "], [", "]],
591
+ resultAssignOseoPromiseAsyncCallContext: [["result = oseo_promise_async_call(context, "], [");"]],
592
+ resultAssignOseoPromiseAwaitThenContext: [["result = oseo_promise_await_then(context, "]],
593
+ resultAssignOseoPromiseThenContext: [["result = oseo_promise_then(context, "]],
594
+ threeValuesCallSuffix: [
595
+ [""],
596
+ [", "],
597
+ [", "],
598
+ [");"]
599
+ ],
600
+ oseoPromiseAll: [["oseo_promise_all"]],
601
+ oseoPromiseResolve: [["oseo_promise_resolve"]],
602
+ resultAssignContextStatement: [
603
+ ["result = "],
604
+ ["(context, "],
605
+ [");"]
606
+ ],
607
+ resultAssignOseoSetTimeoutContext: [["result = oseo_set_timeout(context, "], [", "]],
608
+ resultAssignOseoClearTimeoutContext: [["result = oseo_clear_timeout(context, "], [");"]],
609
+ callFunctionWithDynamicReceiverPrefix: [["result = oseo_call_function(context, roots["], ["], "]],
610
+ resultAssignOseoConstructorResult: [[" result = oseo_constructor_result("]],
611
+ contextResultValueRootsStatement: [["context, result.value, roots["], ["]);"]],
612
+ callFunctionWithReceiverPrefix: [["result = oseo_call_function(context, roots["], ["], receiver, "]],
613
+ callFunctionWithRootReceiverPrefix: [
614
+ ["result = oseo_call_function(context, roots["],
615
+ ["], roots["],
616
+ ["], "]
617
+ ],
618
+ newTargetStatement: [
619
+ [""],
620
+ [", "],
621
+ [", new_target);"]
622
+ ],
623
+ resultAssignOseoConstructorResultContext: [[" result = oseo_constructor_result(context, re", "sult.value, receiver);"]],
624
+ resultAssignOseoConstructorResultContextValueRoot: [[" result = oseo_constructor_result(context, result.value, roots["], ["]);"]],
625
+ oseoFunction: [["oseo_function_"], [""]],
626
+ recursiveTarget: [["recursive_target_"], [""]],
627
+ oseoFunctionEntryVolatileAssign: [["OseoFunctionEntry volatile "], [" = "]],
628
+ oseoFunctionStatement: [["oseo_function_"], [";"]],
629
+ resultAssignOseoCallEnterContextStatement: [["result = oseo_call_enter(context);"]],
630
+ resultAssignOseoFrameEnterContextU: [[" result = oseo_frame_enter(context, OSEO_CALLABLE_FRAME_COST("], ["u));"]],
631
+ ifResultStatusEqualOseoStatusNormalOpen: [[" if (result.status == OSEO_STATUS_NORMAL) {"]],
632
+ resultAssign: [[" result = "], [""]],
633
+ contextOseoUndefinedOseoUndefined: [["(context, oseo_undefined(), oseo_undefined(), "]],
634
+ oseoFrameLeaveContextUStatement: [[" oseo_frame_leave(context, OSEO_CALLABLE_FRAME_COST("], ["u));"]],
635
+ oseoCallLeaveContextStatement: [[" oseo_call_leave(context);"]],
636
+ callCompleteStatement: [[" result = oseo_call_complete(context, result);"]],
637
+ tailCallPrefix: [["result = oseo_tail_call(context, roots["], ["], "]],
638
+ tailCallDerivedPrefix: [["result = oseo_tail_call_derived(context, roots["], ["], "]],
639
+ tailHostCallPrefix: [
640
+ ["result = oseo_tail_host_call(context, "],
641
+ [", "],
642
+ [", "]
643
+ ],
644
+ tailHostCallDerivedPrefix: [
645
+ ["result = oseo_tail_host_call_derived(context, "],
646
+ [", "],
647
+ [", "]
648
+ ],
649
+ tailHostConsoleLog: [["OSEO_TAIL_HOST_CONSOLE_LOG"]],
650
+ tailHostSetTimeout: [["OSEO_TAIL_HOST_SET_TIMEOUT"]],
651
+ tailHostClearTimeout: [["OSEO_TAIL_HOST_CLEAR_TIMEOUT"]]
652
+ },
653
+ objectOperation: {
654
+ resultAssignOseoArrayCreateContextU: [["result = oseo_array_create(context, "], ["u);"]],
655
+ resultAssignOseoArrayAppendContextRoots: [["result = oseo_array_append(context, roots["], ["], "]],
656
+ resultAssignOseoArrayAppendHoleContext: [["result = oseo_array_append_hole(context, roots["], ["]);"]],
657
+ resultAssignOseoObjectLiteralCreateContext: [["result = oseo_object_literal_create(context);"]],
658
+ resultAssignOseoToObject: [["result = oseo_to_object(context, ", "roots["], ["]);"]],
659
+ resultAssignOseoRequireObjectCoercible: [["result = oseo_require_object_coercible(context, ", "roots["], ["]);"]],
660
+ resultAssignOseoRequireDeleteObjectCoercible: [["result = oseo_require_delete_object_coercible(context, ", "roots["], ["]);"]],
661
+ objectRestExcluded: [["object_rest_excluded_"], [""]],
662
+ oseoValueUAssignOpen: [
663
+ ["OseoValue "],
664
+ ["["],
665
+ ["u] = {"]
666
+ ],
667
+ initializerSuffix: [["};"]],
668
+ resultAssignOseoObjectRestContextRoots: [["result = oseo_object_rest(context, roots["], ["], "]],
669
+ resultAssignOseoObjectLiteralSetPrototypeContextRoots: [["result = oseo_object_literal_set_prototype(con", "text, roots["], ["], "]],
670
+ nullStatement: [["NULL);"]],
671
+ resultAssignOseoObjectSpreadContextRoots: [["result = oseo_object_spread(context, roots["], ["], "]],
672
+ resultAssignOseoPropertyKeyContextRoots: [["result = oseo_property_key(context, roots["], ["]);"]],
673
+ oseoPropertyAttributesTrueTrueTrueFalse: [["(OseoPropertyAttributes){true, true, true, false", "});"]],
674
+ oseoPropertyAttributesTrueFalseTrueFalse: [["(OseoPropertyAttributes){true, false, true, fals", "e});"]],
675
+ resultAssignOseoObjectDefineAccessor: [["result = oseo_object_define_accessor(context, ro", "ots["], ["], "]],
676
+ oseoPropertyAttributesTrueFalseTrue: [["(OseoPropertyAttributes){true, "], [", false, true});"]],
677
+ resultAssignOseoSuperGetContextRoots: [["result = oseo_super_get(context, roots["], ["], "]],
678
+ resultAssignOseoObjectGetContextRoots: [["result = oseo_object_get(context, roots["], ["], "]],
679
+ resultAssignOseoObjectDeleteContextRoots: [["result = oseo_object_delete(context, roots["], ["], "]],
680
+ resultAssignOseoSuperSetContextRoots: [["result = oseo_super_set(context, roots["], ["], "]],
681
+ rootsRootsRoots: [
682
+ ["roots["],
683
+ ["], roots["],
684
+ ["], roots["],
685
+ ["], "]
686
+ ],
687
+ resultAssignOseoObjectSetContextRoots: [["result = oseo_object_set(context, roots["], ["], "]]
688
+ },
689
+ argumentListOperation: {
690
+ resultAssignOseoArgumentListCreateContext: [["result = oseo_argument_list_create(context);"]],
691
+ resultAssignOseoArgumentListAppendContext: [["result = oseo_argument_list_append(context, roots["], ["], "]]
692
+ },
693
+ propertyCacheName: { propertyCache: [["property_cache_"], [""]] },
694
+ guardObject: { boolFastAssignOseoValueIsObjectRoots: [
695
+ ["bool fast_"],
696
+ [" = oseo_value_is_object(roots["],
697
+ ["]);"]
698
+ ] },
699
+ propertyCacheGuard: {
700
+ staticOseoPropertyCacheAssignUUStatement: [["static OseoPropertyCache "], [" = {0u, 0u};"]],
701
+ boolFastAssignOseoPropertyCacheMatches: [["bool fast_"], [" = oseo_property_cache_matches("]],
702
+ rootsAddressStatement: [
703
+ ["roots["],
704
+ ["], &"],
705
+ [");"]
706
+ ]
707
+ },
708
+ loadFixedSlot: { oseoPropertyCacheLoadRootsAddressStatement: [
709
+ ["oseo_property_cache_load(roots["],
710
+ ["], &"],
711
+ [");"]
712
+ ] },
713
+ updatePropertyCache: { oseoPropertyCacheUpdateRootsRoots: [
714
+ ["oseo_property_cache_update(roots["],
715
+ ["], roots["],
716
+ ["], "]
717
+ ] },
718
+ functionCreate: {
719
+ oseoFunctionArrow: [["OSEO_FUNCTION_ARROW"]],
720
+ oseoFunctionAsync: [["OSEO_FUNCTION_ASYNC"]],
721
+ oseoFunctionAsyncArrow: [["OSEO_FUNCTION_ASYNC_ARROW"]],
722
+ oseoFunctionAsyncGenerator: [["OSEO_FUNCTION_ASYNC_GENERATOR"]],
723
+ oseoFunctionClass: [["OSEO_FUNCTION_CLASS"]],
724
+ oseoFunctionGenerator: [["OSEO_FUNCTION_GENERATOR"]],
725
+ oseoFunctionMethod: [["OSEO_FUNCTION_METHOD"]],
726
+ oseoFunctionOrdinary: [["OSEO_FUNCTION_ORDINARY"]],
727
+ functionNameUnits: [["function_name_units_"], [""]],
728
+ functionSourceUnits: [["function_source_units_"], [""]],
729
+ oseoFunctionNamePrefixGet: [["OSEO_FUNCTION_NAME_PREFIX_GET"]],
730
+ oseoFunctionNamePrefixSet: [["OSEO_FUNCTION_NAME_PREFIX_SET"]],
731
+ oseoFunctionNamePrefixNone: [["OSEO_FUNCTION_NAME_PREFIX_NONE"]],
732
+ resultAssignOseoFunctionCreateContextU: [["result = oseo_function_create(context, "], ["u, "]],
733
+ resultAssignOseoFunctionCreateNonStrictContextU: [["result = oseo_function_create_non_strict(context, "], ["u, "]],
734
+ resultAssignOseoFunctionSetSource: [
735
+ ["result = oseo_function_set_source(context, roots["],
736
+ ["], "],
737
+ [", "],
738
+ ["u);"]
739
+ ],
740
+ rootsU: [
741
+ ["roots["],
742
+ ["], "],
743
+ [", "],
744
+ ["u, "]
745
+ ],
746
+ receiver: [
747
+ [""],
748
+ [", receiver, "],
749
+ [", "]
750
+ ],
751
+ bindArrowContext: [
752
+ ["oseo_bind_arrow_context(roots["],
753
+ ["], callee, "],
754
+ [");"]
755
+ ],
756
+ newTarget: [["new_target"]]
757
+ },
758
+ errorIntrinsic: {
759
+ oseoErrorAggregate: [["OSEO_ERROR_AGGREGATE"]],
760
+ oseoErrorError: [["OSEO_ERROR_ERROR"]],
761
+ oseoErrorEval: [["OSEO_ERROR_EVAL"]],
762
+ oseoErrorRange: [["OSEO_ERROR_RANGE"]],
763
+ oseoErrorReference: [["OSEO_ERROR_REFERENCE"]],
764
+ oseoErrorSyntax: [["OSEO_ERROR_SYNTAX"]],
765
+ oseoErrorType: [["OSEO_ERROR_TYPE"]],
766
+ oseoErrorUri: [["OSEO_ERROR_URI"]],
767
+ resultAssignOseoErrorIntrinsicContext: [["result = oseo_error_intrinsic(context, "]]
768
+ },
769
+ functionIntrinsic: { resultAssign: [["result = oseo_intrinsic(context, OSEO_INTRINSIC_FUNCTION);"]] },
770
+ iteratorIntrinsic: { resultAssign: [["result = oseo_intrinsic(context, OSEO_INTRINSIC_ITERATOR);"]] },
771
+ constructReceiver: { resultAssignOseoConstructorReceiverContext: [[" result = oseo_constructor_receiver(context, ", "result.value);"]] },
772
+ classHeritage: { resultAssignOseoClassHeritageContextRoots: [["result = oseo_class_heritage(context, roots["], ["], "]] },
773
+ classFieldDefine: { resultAssignOseoClassFieldDefineContext: [["result = oseo_class_field_define(context, "]] },
774
+ classStaticFieldDefine: {
775
+ oseoClassStaticPrivateFieldDefine: [["oseo_class_static_private_field_define"]],
776
+ oseoClassStaticFieldDefine: [["oseo_class_static_field_define"]]
777
+ },
778
+ privateNameCreate: { resultAssignOseoPrivateNameCreateContext: [["result = oseo_private_name_create(context);"]] },
779
+ classPrivateFieldDefine: { resultAssignOseoClassPrivateFieldDefine: [["result = oseo_class_private_field_define(context", ", "]] },
780
+ classPrivateMethodDefine: {
781
+ resultAssignOseoClassPrivateMethodDefine: [["result = oseo_class_private_method_define(context, "]],
782
+ resultAssignOseoClassStaticPrivateMethodDefine: [["result = oseo_class_static_private_method_define(context, "]]
783
+ },
784
+ privateGet: { resultAssignOseoPrivateGetContextRoots: [["result = oseo_private_get(context, roots["], ["], "]] },
785
+ privateIn: { resultAssignOseoPrivateInContextRoots: [["result = oseo_private_in(context, roots["], ["], "]] },
786
+ privateSet: { resultAssignOseoPrivateSetContextRoots: [["result = oseo_private_set(context, roots["], ["], "]] },
787
+ instanceElementsInit: { resultAssignOseoInitializeInstanceElements: [[
788
+ "result = oseo_initialize_instance_elements(conte",
789
+ "xt, call",
790
+ "ee, "
791
+ ]] },
792
+ homeObjectBind: { oseoBindHomeObjectRootsRootsStatement: [
793
+ ["oseo_bind_home_object(roots["],
794
+ ["], roots["],
795
+ ["]);"]
796
+ ] },
797
+ superBase: { rootsAssignOseoSuperBaseCalleeStatement: [["roots["], ["] = oseo_super_base(callee);"]] },
798
+ superPropertyDelete: { resultAssignOseoSuperPropertyDeleteContext: [["result = oseo_super_property_delete(context);"]] },
799
+ superConstructor: {
800
+ resultAssignOseoSuperConstructorContext: [["result = oseo_super_constructor(context, callee)", ";"]],
801
+ resultAssignOseoSuperConstructorCheckContextRoots: [["result = oseo_super_constructor_check(context, roots["], ["]);"]],
802
+ resultAssignOseoSuperConstructorReceiverContextRoots: [
803
+ ["result = oseo_super_constructor_receiver(context", ", roots["],
804
+ ["], "],
805
+ [");"]
806
+ ]
807
+ },
808
+ thisBind: { resultAssignOseoBindThisContextResultValue: [["result = oseo_bind_this(context, result.value, r", "oots["], ["]);"]] },
809
+ derivedReturn: {
810
+ resultAssignOseoDerivedConstructorResult: [["result = oseo_derived_constructor_result(context", ", roots["], ["], "]],
811
+ resultValueStatement: [["result.value);"]]
812
+ },
813
+ moduleNamespace: {
814
+ rootsUNullNullNullStatement: [["roots["], ["], 0u, NULL, NULL, NULL);"]],
815
+ namespaceUnits: [
816
+ ["namespace_units_"],
817
+ ["_"],
818
+ [""]
819
+ ],
820
+ namespace: [["namespace_"], [""]],
821
+ staticConstUint16TPointerConstNamesAssign: [["static const uint16_t *const "], ["_names[] = "]],
822
+ staticConstSizeTLengthsAssignStatement: [
823
+ ["static const size_t "],
824
+ ["_lengths[] = {"],
825
+ ["};"]
826
+ ],
827
+ staticConstSizeTBindingsAssign: [["static const size_t "], ["_bindings[] = "]],
828
+ namesLengthsBindingsStatement: [
829
+ [""],
830
+ ["_names, "],
831
+ ["_lengths, "],
832
+ ["_bindings);"]
833
+ ]
834
+ },
835
+ globalObject: {
836
+ units: [["global_object_units_"], [""]],
837
+ prefix: [["global_object"]],
838
+ resultAssignOseoGlobalObjectCreate: [["result = oseo_global_object_create(context, "]]
839
+ },
840
+ mappedArguments: {
841
+ indicesName: [["mapped_arguments_indices_"], [""]],
842
+ bindingIdsName: [["mapped_arguments_binding_ids_"], [""]]
843
+ },
844
+ operation: {
845
+ resultAssignOseoSymbolIntrinsicContext: [["result = oseo_symbol_intrinsic(context);"]],
846
+ rootsAssignReceiverStatement: [["roots["], ["] = receiver;"]],
847
+ resultAssignOseoThisValueContextReceiver: [["result = oseo_this_value(context, receiver);"]],
848
+ undefinedExpressionStatement: [["oseo_undefined();"]],
849
+ newTargetStatement: [["new_target;"]],
850
+ rootsAssignRootsUStatement: [
851
+ ["roots["],
852
+ ["] = roots["],
853
+ ["u];"]
854
+ ],
855
+ completionUKindAssignStatement: [
856
+ ["completion["],
857
+ ["u].kind = "],
858
+ [";"]
859
+ ],
860
+ completionULineAssignContextMemberLine: [["completion["], ["u].line = context->line;"]],
861
+ completionUColumnAssignContextMemberColumn: [["completion["], ["u].column = context->column;"]],
862
+ completionUSourceIdAssignContextMember: [["completion["], ["u].source_id = context->source_id;"]],
863
+ completionUSourceIdLengthAssign: [["completion["], ["u].source_id_length = "]],
864
+ completionUErrorCodeAssignContextMember: [["completion["], ["u].error_code = context->error_code;"]],
865
+ completionUErrorMessageAssignContextMember: [["completion["], ["u].error_message = context->error_message;"]],
866
+ rootsUAssign: [["roots["], ["u] = "]],
867
+ rootsStatement: [["roots["], ["];"]],
868
+ completionUTargetAssign: [["completion["], ["u].target = "]],
869
+ completionUDepthAssign: [["completion["], ["u].depth = "]],
870
+ contextMemberGuardHitsPlusAssignUStatement: [["context->guard_hits += 1u;"]],
871
+ contextMemberGuardMissesPlusAssignU: [["context->guard_misses += 1u;"]],
872
+ contextMemberOverflowMissesPlusAssignU: [["context->overflow_misses += 1u;"]],
873
+ ifResultStatusNotEqualOseoStatusNormalOpen: [["if (result.status != OSEO_STATUS_NORMAL) {"]],
874
+ ifContextMemberHasDiagnosticGotoAbrupt: [[" if (context->has_diagnostic) goto abrupt;"]],
875
+ setThrowKind: [[" completion["], ["u].kind = 2;"]],
876
+ resultValueStatement: [["result.value;"]],
877
+ setThrowLine: [[" completion["], ["u].line = context->line;"]],
878
+ setThrowColumn: [[" completion["], ["u].column = context->column;"]],
879
+ setThrowSourceId: [[" completion["], ["u].source_id = context->source_id;"]],
880
+ setThrowSourceIdLength: [[" completion["], ["u].source_id_length = "]],
881
+ setThrowErrorCode: [[" completion["], ["u].error_code = context->error_code;"]],
882
+ completionUErrorMessageAssign: [[" completion["], ["u].error_message = "]],
883
+ contextMemberErrorMessageStatement: [["context->error_message;"]]
884
+ },
885
+ completionCopy: {
886
+ completionUAssignCompletionUStatement: [
887
+ [" completion["],
888
+ ["u] = completion["],
889
+ ["u];"]
890
+ ],
891
+ rootsUStatement: [["roots["], ["u];"]]
892
+ },
893
+ terminator: {
894
+ oseoGeneratorSuspendAwait: [["OSEO_GENERATOR_SUSPEND_AWAIT"]],
895
+ oseoGeneratorSuspendYield: [["OSEO_GENERATOR_SUSPEND_YIELD"]],
896
+ oseoGeneratorSuspendContextGeneratorU: [["oseo_generator_suspend(context, generator, "], ["u, "]],
897
+ rootsStatement: [["roots["], ["]};"]],
898
+ fast: [["fast_"], [""]],
899
+ ifGotoBbStatement: [
900
+ ["if ("],
901
+ [") goto bb"],
902
+ [";"]
903
+ ],
904
+ ifCompletionUKindNotEqualAddressAddress: [["if (completion["], ["u].kind != 0 && "]],
905
+ completionUDepthAssignUOpen: [
906
+ ["completion["],
907
+ ["u].depth <= "],
908
+ ["u) {"]
909
+ ],
910
+ ifCompletionKindReturnOpen: [["if (completion["], ["u].kind == 1) {"]],
911
+ contextMemberLineAssignCompletionULine: [[" context->line = completion["], ["u].line;"]],
912
+ contextMemberColumnAssignCompletionUColumn: [[" context->column = completion["], ["u].column;"]],
913
+ contextMemberSourceIdAssignCompletionU: [[" context->source_id = completion["], ["u].source_id;"]],
914
+ contextMemberSourceIdLengthAssign: [[" context->source_id_length = "]],
915
+ completionUSourceIdLengthStatement: [["completion["], ["u].source_id_length;"]],
916
+ contextMemberErrorCodeAssignCompletionU: [[" context->error_code = completion["], ["u].error_code;"]],
917
+ contextMemberErrorMessageAssignCompletionU: [[" context->error_message = completion["], ["u].error_message;"]],
918
+ contextMemberHasDiagnosticAssignFalse: [[" context->has_diagnostic = false;"]],
919
+ resultAssignOseoResultOseoStatusThrow: [[" result = (OseoResult){OSEO_STATUS_THROW, "]],
920
+ gotoAbruptStatement: [[" goto abrupt;"]],
921
+ switchCompletionUTargetOpen: [["switch (completion["], ["u].target) {"]],
922
+ abortStatement: [["abort();"]]
923
+ },
924
+ prologue: {
925
+ resultAssignOseoEnvironmentCreateContextU: [["result = oseo_environment_create(context, "], ["u);"]],
926
+ resultAssignOseoUnresolvableCellCreate: [["result = oseo_unresolvable_cell_create(context, ", "\""], ["\");"]],
927
+ resultAssignOseoFunctionEnvironmentContext: [["result = oseo_function_environment(context, call", "ee);"]],
928
+ resultAssignOseoEnvironmentCloneContext: [["result = oseo_environment_clone(context, result.", "value);"]],
929
+ resultAssignOseoEnvironmentSetContextRoots: [["result = oseo_environment_set(context, roots["], ["], "]],
930
+ uRootsStatement: [
931
+ [""],
932
+ ["u, roots["],
933
+ ["]);"]
934
+ ],
935
+ resultAssignOseoCellInitializeContext: [["result = oseo_cell_initialize(context, result.va", "lue, callee);"]],
936
+ resultAssignOseoArgumentsCreate: [["result = oseo_arguments_create(context, argument_count, ", "arguments);"]],
937
+ resultAssignOseoMappedArgumentsCreate: [
938
+ ["result = oseo_mapped_arguments_create(context, roo", "ts["],
939
+ ["], callee, argument_count, arguments, "],
940
+ [", "],
941
+ [", "],
942
+ ["u);"]
943
+ ],
944
+ oseoCellSet: [["oseo_cell_set"]],
945
+ oseoCellInitialize: [["oseo_cell_initialize"]],
946
+ resultAssignOseoArrayCreateContextU: [["result = oseo_array_create(context, 0u);"]],
947
+ resultAssignContextRootsResultValue: [
948
+ ["result = "],
949
+ ["(context, roots["],
950
+ ["], result.value);"]
951
+ ],
952
+ forSizeTRestIndexAssignU: [
953
+ ["for (size_t rest_index_"],
954
+ [" = "],
955
+ ["u; "]
956
+ ],
957
+ restIndexArgumentCountRestIndexPlusAssignU: [
958
+ ["rest_index_"],
959
+ [" < argument_count; rest_index_"],
960
+ [" += 1u) {"]
961
+ ],
962
+ resultAssignOseoArrayAppendContextResult: [[" result = oseo_array_append(context, result.v", "alue, "]],
963
+ argumentsRestIndexStatement: [["arguments[rest_index_"], ["]);"]],
964
+ ifResultStatusNotEqualOseoStatusNormalGoto: [[" if (result.status != OSEO_STATUS_NORMAL) got", "o abrupt;"]],
965
+ resultAssignContextResultValue: [["result = "], ["(context, result.value, "]],
966
+ argumentCountUArguments: [
967
+ ["(argument_count > "],
968
+ ["u ? arguments["],
969
+ ["] : "]
970
+ ],
971
+ undefinedDefaultArgumentCallSuffix: [["oseo_undefined()));"]]
972
+ },
973
+ blocks: {
974
+ bbStatement: [["bb"], [":;"]],
975
+ rootsAssignOseoGeneratorSentGenerator: [["roots["], ["] = oseo_generator_sent(generator);"]],
976
+ oseoGeneratorResumeReturnGotoBbStatement: [["OSEO_GENERATOR_RESUME_RETURN) goto bb"], [";"]],
977
+ oseoGeneratorResumeThrowGotoBbStatement: [["OSEO_GENERATOR_RESUME_THROW) goto bb"], [";"]]
978
+ },
979
+ completionDeclaration: {
980
+ oseoCompletionRecordPointerCompletion: [[" OseoCompletionRecord *completion =\n"]],
981
+ oseoGeneratorCompletionsGeneratorLine: [[" oseo_generator_completions(generator);\n"]],
982
+ oseoCompletionRecordCompletionUAssign: [[" OseoCompletionRecord completion["], ["u] = "]],
983
+ uUUUNullUNullNullLine: [["{{0, 0u, 0u, 0u, 0u, NULL, 0u, NULL, NULL}};\n"]]
984
+ },
985
+ generatorBodyName: { oseoGeneratorBody: [["oseo_generator_body_"], [""]] },
986
+ generatorBody: {
987
+ switchOseoGeneratorResumePointGenerator: [["switch (oseo_generator_resume_point(generator)) ", "{"]],
988
+ staticOseoResultLine: [["static OseoResult "], ["(\n"]],
989
+ oseoValueGeneratorLine: [[" OseoValue generator\n"]],
990
+ oseoValuePointerRootsAssignOseoGenerator: [[" OseoValue *roots = oseo_generator_slots(gene", "rator);\n"]],
991
+ oseoValueCalleeAssignOseoGeneratorCallee: [[" OseoValue callee = oseo_generator_callee(gen", "erator);\n"]],
992
+ oseoValueReceiverAssignOseoGenerator: [[" OseoValue receiver = oseo_generator_receiver", "(generator);\n"]],
993
+ oseoResultResultAssignOseoStatusNormalOseo: [[" OseoResult result = {OSEO_STATUS_NORMAL, ose", "o_undefined()};\n"]],
994
+ voidContextLine: [[" (void)context;\n"]]
995
+ },
996
+ function: {
997
+ resultAssignOseoGeneratorCreateContext: [[
998
+ "result = oseo_generator_create(context, callee, ",
999
+ "receiver",
1000
+ ", "
1001
+ ]],
1002
+ frameSlotsAssignResultValueStatement: [["frame.slots[0] = result.value;"]],
1003
+ frameSlotsZero: [["frame.slots[0]"]],
1004
+ rootsAssignOseoGeneratorSlotsFrameSlots: [["roots = oseo_generator_slots(frame.slots[0]);"]],
1005
+ resultAssignOseoResultOseoStatusNormal: [["result = (OseoResult){OSEO_STATUS_NORMAL, frame.", "slots[0]};"]],
1006
+ oseoRootsReleaseContextAddressFrame: [["oseo_roots_release(context, &frame);"]],
1007
+ staticOseoResultOseoFunctionLine: [["static OseoResult oseo_function_"], ["(\n"]],
1008
+ oseoValueCalleeLine: [[" OseoValue callee,\n"]],
1009
+ oseoValueReceiverLine: [[" OseoValue receiver,\n"]],
1010
+ sizeTArgumentCountLine: [[" size_t argument_count,\n"]],
1011
+ constOseoValuePointerArgumentsLine: [[" const OseoValue *arguments,\n"]],
1012
+ oseoValueNewTargetLine: [[" OseoValue new_target\n"]],
1013
+ oseoRootFrameFrameAssignNullNullULine: [[" OseoRootFrame frame = {NULL, NULL, 0u};\n"]],
1014
+ oseoValuePointerRootsLine: [[" OseoValue *roots;\n"]],
1015
+ voidArgumentCountLine: [[" (void)argument_count;\n"]],
1016
+ voidArgumentsLine: [[" (void)arguments;\n"]],
1017
+ voidNewTargetLine: [[" (void)new_target;\n"]],
1018
+ resultAssignOseoRootsAllocate: [[" result = oseo_roots_allocate("]],
1019
+ contextAddressFrameULine: [["context, &frame, "], ["u);\n"]],
1020
+ ifResultStatusNotEqualOseoStatusNormal: [[" if (result.status != OSEO_STATUS_NORMAL) ret", "urn result;\n"]],
1021
+ rootsAssignFrameSlotsLine: [[" roots = frame.slots;\n"]],
1022
+ newline: [
1023
+ [""],
1024
+ ["\n"],
1025
+ [""]
1026
+ ]
1027
+ },
1028
+ prototype: {
1029
+ staticOseoResultOseoFunction: [["static OseoResult oseo_function_"], ["("]],
1030
+ oseoContextPointerOseoValueOseoValueSizeT: [["OseoContext *, OseoValue, OseoValue, size_t, "]],
1031
+ constOseoValuePointerOseoValueStatement: [["const OseoValue *, OseoValue);"]],
1032
+ staticOseoResult: [
1033
+ [""],
1034
+ ["\nstatic OseoResult "],
1035
+ ["("]
1036
+ ],
1037
+ oseoContextPointerOseoValueStatement: [["OseoContext *, OseoValue);"]]
1038
+ },
1039
+ generatorDispatcher: {
1040
+ source: [[
1041
+ "static OseoResult oseo_dispatch_generator(\n O",
1042
+ "seoContext *context,\n OseoValue generator\n) {",
1043
+ "\n size_t code_id = 0u;\n OseoResult result ",
1044
+ "= oseo_function_code_id(\n context, oseo_g",
1045
+ "enerator_callee(generator), &code_id);\n if (r",
1046
+ "esult.status != OSEO_STATUS_NORMAL) return resul",
1047
+ "t;\n switch (code_id) {\n"
1048
+ ], ["\n default:\n return oseo_unknown_functi", "on(context, code_id);\n }\n}"]],
1049
+ caseClause: [
1050
+ [" case "],
1051
+ ["u:\n result = oseo_frame_enter(context, ", "OSEO_CALLABLE_FRAME_COST("],
1052
+ ["u));\n if (result.status == OSEO_STATUS_NORMAL) {\n", " result = "],
1053
+ ["(context, generator);\n", " oseo_frame_leave(context, OSEO_CALLABLE_FRAME_COST("],
1054
+ ["u));\n }\n return result;"]
1055
+ ]
1056
+ },
1057
+ functionDispatcher: {
1058
+ source: [[
1059
+ "static OseoResult oseo_dispatch_function(\n Os",
1060
+ "eoContext *context,\n OseoValue callee,\n Os",
1061
+ "eoValue receiver,\n size_t argument_count,\n ",
1062
+ " const OseoValue *arguments,\n OseoValue new_t",
1063
+ "arget\n) {\n size_t code_id = 0u;\n OseoResul",
1064
+ "t result = oseo_function_code_id(\n contex",
1065
+ "t, callee, &code_id);\n if (result.status != O",
1066
+ "SEO_STATUS_NORMAL) return result;\n (void)rece",
1067
+ "iver;\n (void)argument_count;\n (void)argume",
1068
+ "nts;\n (void)new_target;\n switch (code_id) ",
1069
+ "{\n"
1070
+ ], [" default:\n return oseo_unknown_functio", "n(context, code_id);\n }\n}"]],
1071
+ caseClause: [
1072
+ [" case "],
1073
+ ["u:\n result = oseo_frame_enter(context, ", "OSEO_CALLABLE_FRAME_COST("],
1074
+ ["u));\n if (result.status == OSEO_STATUS_NOR", "MAL) {\n result = oseo_function_"],
1075
+ [
1076
+ "(\n context, callee, receiver, arg",
1077
+ "ument_count,\n arguments, new_targ",
1078
+ "et);\n oseo_frame_leave(context, ",
1079
+ "OSEO_CALLABLE_FRAME_COST("
1080
+ ],
1081
+ ["u));\n }\n return result;"]
1082
+ ]
1083
+ },
1084
+ agent: {
1085
+ holeStatement: [["result = oseo_agent_hole(context, "], ["u);"]],
1086
+ entryPrototype: [["OseoResult oseo_agent_program_"], ["(OseoContext *);\n"]],
1087
+ segmentUnits: [
1088
+ ["static const uint16_t oseo_agent_segment_"],
1089
+ ["_"],
1090
+ ["[] = {"],
1091
+ ["};\n"]
1092
+ ],
1093
+ segmentEntry: [
1094
+ ["{oseo_agent_segment_"],
1095
+ ["_"],
1096
+ [", "],
1097
+ ["u}"]
1098
+ ],
1099
+ segmentTable: [
1100
+ ["static const OseoAgentSegment oseo_agent_segments_"],
1101
+ ["[] = {"],
1102
+ ["};\n"]
1103
+ ],
1104
+ programEntry: [
1105
+ ["{oseo_agent_segments_"],
1106
+ [", "],
1107
+ ["u, oseo_agent_program_"],
1108
+ [", \""],
1109
+ ["\", "],
1110
+ ["u}"]
1111
+ ],
1112
+ programTable: [["static const OseoAgentProgram oseo_agent_programs[] = {"], ["};\n"]],
1113
+ installLine: [
1114
+ [" result = oseo_test262_host_install(\n &context, "],
1115
+ [", "],
1116
+ [
1117
+ "u);\n if (result.status != OSEO_STATUS_NORMAL) {\n ",
1118
+ " oseo_context_print_thrown(&context, result.value);\n",
1119
+ " oseo_context_destroy(&context);\n return 1;\n",
1120
+ " }\n"
1121
+ ]
1122
+ ],
1123
+ sourceRunUnits: [
1124
+ ["static const uint16_t function_source_run_"],
1125
+ ["_"],
1126
+ ["[] = {"],
1127
+ ["};"]
1128
+ ],
1129
+ sourceRunEntry: [
1130
+ ["{function_source_run_"],
1131
+ ["_"],
1132
+ [", "],
1133
+ ["u}"]
1134
+ ],
1135
+ sourceRuns: [
1136
+ ["static const OseoAgentSegment function_source_runs_"],
1137
+ ["[] = {"],
1138
+ ["};"]
1139
+ ],
1140
+ holeIndex: [[""], ["u"]],
1141
+ sourceHoles: [
1142
+ ["static const size_t function_source_holes_"],
1143
+ ["[] = {"],
1144
+ ["};"]
1145
+ ],
1146
+ setSource: [
1147
+ ["result = oseo_agent_function_set_source(context, roots["],
1148
+ ["], function_source_runs_"],
1149
+ [", "],
1150
+ ["u, function_source_holes_"],
1151
+ [");"]
1152
+ ],
1153
+ programsValue: [["oseo_agent_programs"]],
1154
+ noProgramsValue: [["NULL"]],
1155
+ generatorRegistrationLine: [[" oseo_context_set_generator_dispatcher(\n", " context, oseo_dispatch_generator);\n"]],
1156
+ source: [
1157
+ [
1158
+ "#include \"oseo_runtime.h\"\n\n#include <math.h>\n#in",
1159
+ "clude <stddef.h>\n#include <stdint.h>\n#include <s",
1160
+ "tdlib.h>\n\n"
1161
+ ],
1162
+ [""],
1163
+ ["\n\n"],
1164
+ ["\n\n"],
1165
+ [""],
1166
+ ["\nOseoResult oseo_agent_program_"],
1167
+ ["(OseoContext *context) {\n OseoResult result;\n"],
1168
+ [""],
1169
+ [" oseo_context_set_function_dispatcher(\n", " context, oseo_dispatch_function);\n"],
1170
+ [" result = oseo_frame_enter(\n context, "],
1171
+ [
1172
+ "u);\n if (result.status == OSEO_STATUS_NORMAL)",
1173
+ " {\n result = oseo_function_script(\n ",
1174
+ " context, oseo_undefined(), oseo_undefined",
1175
+ "(), 0u,\n NULL, oseo_undefined());\n ",
1176
+ " oseo_frame_leave(\n context, "
1177
+ ],
1178
+ [
1179
+ "u);\n }\n if (result.status == OSEO_STATUS_N",
1180
+ "ORMAL) {\n result = oseo_event_loop_run(\n ",
1181
+ " context, result.value);\n } else {\n",
1182
+ " result = oseo_entr",
1183
+ "y_task_checkpoint(context, result);\n }\n",
1184
+ " return result;\n}\n"
1185
+ ]
1186
+ ]
1187
+ },
1188
+ program: {
1189
+ voidOseoFunctionStatement: [[" (void)oseo_function_"], [";"]],
1190
+ typedefOseoResultPointerOseoFunctionEntry: [["typedef OseoResult (*OseoFunctionEntry)(\n"]],
1191
+ oseoContextPointerOseoValueOseoValueSizeT: [[" OseoContext *, OseoValue, OseoValue, size_t,", "\n"]],
1192
+ constOseoValuePointerOseoValueLine: [[" const OseoValue *, OseoValue);\n\n"]],
1193
+ oseoContextSetGeneratorDispatcherLine: [[" oseo_context_set_generator_dispatcher(\n"]],
1194
+ addressContextOseoDispatchGeneratorLine: [[" &context, oseo_dispatch_generator);\n"]],
1195
+ contextObserveSpecializationAssignTrueLine: [[" context.observe_specialization = true;\n"]],
1196
+ oseoContextPrintObservationsAddressContext: [[" oseo_context_print_observations(&context);\n"]],
1197
+ source: [
1198
+ [
1199
+ "#include \"oseo_runtime.h\"\n\n#include <math.h>\n#in",
1200
+ "clude <stddef.h>\n#include <stdint.h>\n#include <s",
1201
+ "tdlib.h>\n\n"
1202
+ ],
1203
+ [""],
1204
+ ["\n\n"],
1205
+ ["\n\n"],
1206
+ [""],
1207
+ ["\nint main(int argc, char **argv) {\n OseoContext context;\n O", "seoResult result;\n"],
1208
+ [""],
1209
+ [" oseo_context_init(\n &context, \""],
1210
+ ["\", "],
1211
+ [
1212
+ "u);\n oseo_process_start(&context, argc, argv);\n",
1213
+ " oseo_context_set_function_dispatcher(\n ",
1214
+ " &context, oseo_dispatch_function);\n"
1215
+ ],
1216
+ [""],
1217
+ [" result = oseo_frame_enter(\n &context,", " "],
1218
+ [
1219
+ "u);\n if (result.status == OSEO_STATUS_NORMAL)",
1220
+ " {\n result = oseo_function_script(\n ",
1221
+ " &context, oseo_undefined(), oseo_undefined",
1222
+ "(), 0u,\n NULL, oseo_undefined());\n ",
1223
+ " oseo_frame_leave(\n &context, "
1224
+ ],
1225
+ [
1226
+ "u);\n }\n if (result.status == OSEO_STATUS_N",
1227
+ "ORMAL) {\n result = oseo_event_loop_run(\n ",
1228
+ " &context, result.value);\n } else {\n",
1229
+ " result = oseo_entr",
1230
+ "y_task_checkpoint(&context, result);\n }\n i",
1231
+ "f (result.status != OSEO_STATUS_NORMAL) {\n ",
1232
+ " oseo_context_print_thrown(&context, result.val",
1233
+ "ue);\n oseo_context_destroy(&context);\n ",
1234
+ " return 1;\n }\n"
1235
+ ],
1236
+ [" int status = oseo_process_finish(&context);\n", " oseo_context_destroy(&context);\n return status;\n}\n"]
1237
+ ]
1238
+ }
1239
+ };
1240
+ const emittedCNotice = `/*
1241
+ Oseo-authored output support only (SPDX-License-Identifier: MIT).
1242
+ MIT License
1243
+
1244
+ Copyright (c) 2026 Hong Minhee
1245
+
1246
+ Permission is hereby granted, free of charge, to any person obtaining a copy
1247
+ of this software and associated documentation files (the "Software"), to deal
1248
+ in the Software without restriction, including without limitation the rights
1249
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1250
+ copies of the Software, and to permit persons to whom the Software is
1251
+ furnished to do so, subject to the following conditions:
1252
+
1253
+ The above copyright notice and this permission notice shall be included in all
1254
+ copies or substantial portions of the Software.
1255
+
1256
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1257
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1258
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1259
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1260
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1261
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1262
+ SOFTWARE.
1263
+
1264
+ Unicode-derived tables, where present (SPDX-License-Identifier: Unicode-3.0).
1265
+ UNICODE LICENSE V3
1266
+
1267
+ COPYRIGHT AND PERMISSION NOTICE
1268
+
1269
+ Copyright © 1991-2026 Unicode, Inc.
1270
+
1271
+ NOTICE TO USER: Carefully read the following legal agreement. BY
1272
+ DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
1273
+ SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
1274
+ TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
1275
+ DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
1276
+
1277
+ Permission is hereby granted, free of charge, to any person obtaining a
1278
+ copy of data files and any associated documentation (the "Data Files") or
1279
+ software and any associated documentation (the "Software") to deal in the
1280
+ Data Files or Software without restriction, including without limitation
1281
+ the rights to use, copy, modify, merge, publish, distribute, and/or sell
1282
+ copies of the Data Files or Software, and to permit persons to whom the
1283
+ Data Files or Software are furnished to do so, provided that either (a)
1284
+ this copyright and permission notice appear with all copies of the Data
1285
+ Files or Software, or (b) this copyright and permission notice appear in
1286
+ associated Documentation.
1287
+
1288
+ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
1289
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1290
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
1291
+ THIRD PARTY RIGHTS.
1292
+
1293
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
1294
+ BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
1295
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
1296
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
1297
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
1298
+ FILES OR SOFTWARE.
1299
+
1300
+ Except as contained in this notice, the name of a copyright holder shall
1301
+ not be used in advertising or otherwise to promote the sale, use or other
1302
+ dealings in these Data Files or Software without prior written
1303
+ authorization of the copyright holder.
1304
+ */
1305
+ `;
1306
+
1307
+ //#endregion
1308
+ export { emittedC, emittedCNotice };
1309
+ //# sourceMappingURL=emitted-c.js.map