Parents: #465, #498 Related: #491
Problem
The bytecode compiler lowers plain and named-member tagged templates but rejects computed member tags and every super tag. Generator/async bodies and required no-JIT execution therefore fall back even though the existing get_index, super_get*, template_object, and receiver-aware call/tail-call operations already express the full reference contract.
Scope
- Lower ordinary computed member tags and named/computed
supertags in expression and tail position across plain, generator, and async bytecode. - Evaluate the base, computed key/ToPropertyKey, and tag GetValue exactly once before GetTemplateObject and substitutions.
- Preserve the exact receiver: the captured base for ordinary member tags and the current
thisforsupertags. - Preserve abrupt completion and suspension order for computed keys and substitutions, direct-eval distinctions, template-object caching/freeze identity, and proper-tail-call behavior.
- Keep syntactically forbidden optional-chain template tags rejected by the parser.
No-workaround rules
- No repeated base/key/tag lookup, AST rewrite, tree-walker callback, shared/global scratch, receiver loss, eager substitution, new runtime opcode, or syntax broadening.
- No stacks, queues, jobs, Promise/microtask, Worker, or Map/Set iterator changes.
Acceptance
- Computed member and named/computed
supertags compile in ordinary and tail positions across applicable plain/generator/async admission. - Exact witnesses cover base/key/get/template/substitution/call order, receiver identity, abrupt completion, recursion, suspension, and tail-call behavior.
- Forced tree-walker and required-bytecode differentials match; unsupported optional-chain syntax remains a parser error.
- Focused compiler/frontend, full units, applicable TSan, and exact relevant Test262 before → after accounting pass with zero regressions.
- Parent issues and landing commit are cross-linked with quantified evidence.
Result
Landed in feat(compiler): lower computed and super template tags (#709).
- Computed ordinary and named/computed
supertags now use the existing receiver-aware call/tail-call path across plain, generator, and async bytecode; no runtime opcode or shared scratch was added. - Tag Reference/GetValue completes before GetTemplateObject and substitutions. The tree-walker baseline now follows the same ordering and preserves the current
thisreceiver forsupertags. - Witnesses cover exact
base -> key -> getter -> substitution -> callordering, abrupt completion at each stage, one-shot receiver capture, recursion, template-object identity/freeze, generator/async suspension, super receiver identity, and emitted proper-tail-call operations. - Test262 tagged-template expressions: 27/27 → 27/27, byte-identical transcripts, flips 0, regressions 0.
- Validation: tagged-template units 7/7; admission inventory 2/2; TSan tagged-template units 7/7; focused frontend 12/12; full units 1,812 passed, 1 skipped, 0 failed, 0 leaked.