Andreas Kling
c1bc0cdfa9
LibJS: Allocate local variable indices in source order
...
The scope collector stored identifier_groups and variables in
HashMaps and then sorted them alphabetically before assigning local
register indices. The sorts existed only because HashMap iteration
order is non-deterministic; alphabetical was a stable choice for
comparing bytecode against the now-removed C++ port.
Switch both maps to indexmap::IndexMap so iteration follows the order
of first reference (= source order), and drop the alphabetical sorts.
Local indices now reflect declaration order, which matches what shows
up in bytecode dumps and is easier to read alongside the source.
Add a focused bytecode test using zebra/yak/aardvark to pin the new
allocation order; existing tests using let/var declarations have
their local indices renumbered to match.
2026-04-27 08:04:11 +02:00
..
2026-04-21 13:59:55 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-21 13:59:55 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-22 22:34:54 +02:00
2026-04-22 22:34:54 +02:00
2026-04-13 18:29:43 +02:00
2026-03-20 00:51:23 -05:00
2026-04-13 18:29:43 +02:00
2026-04-21 13:59:55 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-21 13:59:55 +02:00
2026-04-22 22:34:54 +02:00
2026-04-21 13:59:55 +02:00
2026-04-13 18:29:43 +02:00
2026-04-21 13:59:55 +02:00
2026-03-20 00:51:23 -05:00
2026-04-21 13:59:55 +02:00
2026-04-21 13:59:55 +02:00
2026-04-13 18:29:43 +02:00
2026-04-21 13:59:55 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-21 13:59:55 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-22 22:34:54 +02:00
2026-04-13 18:29:43 +02:00
2026-04-22 22:34:54 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-27 08:04:11 +02:00
2026-04-22 22:34:54 +02:00
2026-04-21 13:59:55 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-22 22:34:54 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-21 13:59:55 +02:00
2026-04-27 08:04:11 +02:00
2026-04-13 18:29:43 +02:00
2026-04-22 22:34:54 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-21 13:59:55 +02:00
2026-04-27 08:04:11 +02:00
2026-04-21 13:59:55 +02:00
2026-04-21 13:59:55 +02:00
2026-04-13 18:29:43 +02:00
2026-04-21 13:59:55 +02:00
2026-04-13 18:29:43 +02:00
2026-04-21 13:59:55 +02:00
2026-04-22 22:34:54 +02:00
2026-04-22 22:34:54 +02:00
2026-04-22 22:34:54 +02:00
2026-04-21 13:59:55 +02:00
2026-04-27 08:04:11 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-21 13:59:55 +02:00
2026-03-20 00:51:23 -05:00
2026-03-20 00:51:23 -05:00
2026-04-22 22:34:54 +02:00
2026-04-27 08:04:11 +02:00
2026-04-13 18:29:43 +02:00
2026-04-21 13:59:55 +02:00
2026-04-21 13:59:55 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-22 22:34:54 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-21 13:59:55 +02:00
2026-04-13 18:29:43 +02:00
2026-03-20 00:51:23 -05:00
2026-04-21 13:59:55 +02:00
2026-04-21 13:59:55 +02:00
2026-04-21 13:59:55 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-21 13:59:55 +02:00
2026-04-21 13:59:55 +02:00
2026-04-13 18:29:43 +02:00
2026-04-21 13:59:55 +02:00
2026-04-21 13:59:55 +02:00
2026-04-21 13:59:55 +02:00
2026-04-21 13:59:55 +02:00
2026-04-21 13:59:55 +02:00
2026-04-21 13:59:55 +02:00
2026-04-21 13:59:55 +02:00
2026-04-21 13:59:55 +02:00
2026-04-21 13:59:55 +02:00
2026-04-21 13:59:55 +02:00
2026-04-21 13:59:55 +02:00
2026-04-21 13:59:55 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-22 22:34:54 +02:00
2026-04-22 22:34:54 +02:00
2026-03-20 00:51:23 -05:00
2026-03-20 00:51:23 -05:00
2026-04-21 13:59:55 +02:00
2026-04-13 18:29:43 +02:00
2026-04-21 13:59:55 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-03-20 00:51:23 -05:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00
2026-04-13 18:29:43 +02:00