Andreas Kling
010deec578
LibJS: Build functions_to_initialize in source order
...
ECMAScript hoisting keeps the LAST function declaration with a given
name. The Rust scope_collector and script GDI extraction implemented
this with a single reverse scan that pushed first-seen entries, which
left the resulting list in REVERSE source order. The C++ side then
iterated `m_functions_to_initialize.in_reverse()` to undo that.
Switch the Rust side to a two-pass forward scan that records the last
position per name and emits entries in source order, and drop the
matching `.in_reverse()` calls in Script.cpp and AbstractOperations.cpp.
Same hoisting semantics; NewFunction emission and global property
iteration order now follow the source.
The HashMap that tracks last positions is keyed on `SharedUtf16String`,
so each insert is a refcount bump on the AST's existing Rc instead of
a deep `Vec<u16>` clone.
Add bytecode tests at script and nested-function scope that exercise
multiple declarations and a duplicate name to pin the new ordering.
2026-04-27 08:04:11 +02:00
..
2026-02-09 16:35:39 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-10 02:05:20 +01:00
2026-02-17 20:44:57 +01:00
2026-03-01 21:20:54 +01:00
2026-03-04 18:53:12 +01:00
2026-02-17 20:44:57 +01:00
2026-03-01 21:20:54 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-24 09:39:42 +01:00
2026-02-24 09:39:42 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-19 02:45:37 +01:00
2026-02-09 16:35:39 +01:00
2026-02-17 20:44:57 +01:00
2026-02-10 02:05:20 +01:00
2026-02-24 09:39:42 +01:00
2026-02-15 23:21:46 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-09 16:35:39 +01:00
2026-02-17 20:44:57 +01:00
2026-02-11 23:57:41 +01:00
2026-02-17 20:44:57 +01:00
2026-02-15 23:21:46 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-01-31 18:22:40 +01:00
2026-02-17 20:44:57 +01:00
2026-03-04 12:17:59 +01:00
2026-02-17 20:44:57 +01:00
2026-01-31 18:24:02 +01:00
2026-02-24 09:39:42 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-03-01 21:20:54 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-03-01 21:20:54 +01:00
2026-02-10 02:05:20 +01:00
2026-03-01 21:20:54 +01:00
2026-02-17 20:44:57 +01:00
2026-03-01 21:20:54 +01:00
2026-02-17 20:44:57 +01:00
2026-03-20 00:51:23 -05:00
2026-02-10 02:05:20 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-04-10 15:12:53 +02:00
2026-02-24 09:39:42 +01:00
2026-02-17 20:44:57 +01:00
2026-02-24 09:39:42 +01:00
2026-02-17 20:44:57 +01:00
2026-02-09 16:35:39 +01:00
2026-03-01 21:20:54 +01:00
2026-03-01 21:20:54 +01:00
2026-02-17 20:44:57 +01:00
2026-02-12 11:37:43 +01:00
2026-02-24 09:39:42 +01:00
2026-02-17 20:44:57 +01:00
2026-04-27 08:04:11 +02:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-10 02:05:20 +01:00
2026-02-17 20:44:57 +01:00
2026-03-17 22:28:35 -05:00
2026-03-01 21:20:54 +01:00
2026-03-01 21:20:54 +01:00
2026-02-24 09:39:42 +01:00
2026-02-10 02:05:20 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-03-11 17:04:32 +01:00
2026-03-04 12:17:59 +01:00
2026-01-27 10:58:39 +01:00
2026-02-17 20:44:57 +01:00
2026-04-27 08:04:11 +02:00
2026-02-17 20:44:57 +01:00
2026-03-01 21:20:54 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-03-01 21:20:54 +01:00
2026-03-01 21:20:54 +01:00
2026-02-24 09:39:42 +01:00
2026-03-04 12:17:59 +01:00
2026-02-17 20:44:57 +01:00
2026-02-24 09:39:42 +01:00
2026-02-17 20:44:57 +01:00
2026-03-20 00:51:23 -05:00
2026-02-09 16:35:39 +01:00
2026-04-12 19:15:50 +02:00
2026-04-12 19:15:50 +02:00
2026-03-04 12:17:59 +01:00
2026-02-17 20:44:57 +01:00
2026-03-04 12:17:59 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-03-04 12:17:59 +01:00
2026-03-01 21:20:54 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-19 12:02:50 +01:00
2026-02-24 09:39:42 +01:00
2026-02-09 16:35:39 +01:00
2026-03-01 21:20:54 +01:00
2026-02-17 20:44:57 +01:00
2026-02-24 09:39:42 +01:00
2026-02-15 23:21:46 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-09 16:35:39 +01:00
2026-02-17 20:44:57 +01:00
2026-02-09 16:35:39 +01:00
2026-02-09 08:51:12 +01:00
2026-02-17 20:44:57 +01:00
2026-03-04 12:17:59 +01:00
2026-02-17 20:44:57 +01:00
2026-03-01 21:20:54 +01:00
2026-02-17 20:44:57 +01:00
2026-02-17 20:44:57 +01:00
2026-02-19 02:45:37 +01:00
2026-02-17 20:44:57 +01:00
2026-02-09 16:35:39 +01:00