Andreas Kling
f6aee2b9e8
LibJS/Bytecode: Flatten bytecode to a contiguous representation
...
Instead of keeping bytecode as a set of disjoint basic blocks on the
malloc heap, bytecode is now a contiguous sequence of bytes(!)
The transformation happens at the end of Bytecode::Generator::generate()
and the only really hairy part is rerouting jump labels.
This required solving a few problems:
- The interpreter execution loop had to change quite a bit, since we
were storing BasicBlock pointers all over the place, and control
transfer was done by redirecting the interpreter's current block.
- Exception handlers & finalizers are now stored per-bytecode-range
in a side table in Executable.
- The interpreter now has a plain program counter instead of a stream
iterator. This actually makes error stack generation a bit nicer
since we just have to deal with a number instead of reaching into
the iterator.
This yields a 25% performance improvement on this microbenchmark:
for (let i = 0; i < 1_000_000; ++i) { }
But basically everything gets faster. :^)
2024-05-07 09:15:40 +02:00
..
2024-04-24 16:50:01 -04:00
2024-05-05 19:59:26 +01:00
2024-05-07 09:15:40 +02:00
2024-04-09 09:10:44 +02:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-30 09:51:46 -05:00
2023-11-30 09:51:46 -05:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-12-17 18:25:10 +03:30
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-05-04 21:42:59 +02:00
2024-05-04 21:42:59 +02:00
2023-12-17 18:25:10 +03:30
2024-03-08 16:31:21 +01:00
2024-02-27 20:02:07 +01:00
2024-02-27 20:02:07 +01:00
2023-12-26 11:16:10 +01:00
2023-11-19 12:10:31 +01:00
2023-12-29 09:25:41 +01:00
2023-12-26 11:16:10 +01:00
2024-02-03 14:07:26 -05:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-12-09 00:20:25 +01:00
2023-12-26 11:16:10 +01:00
2023-11-19 12:10:31 +01:00
2023-12-17 18:25:10 +03:30
2023-11-19 12:10:31 +01:00
2023-12-07 14:06:34 +01:00
2023-12-07 14:06:34 +01:00
2023-12-23 23:02:10 +01:00
2023-12-07 14:06:34 +01:00
2023-11-29 09:48:18 +01:00
2023-11-19 12:10:31 +01:00
2023-12-13 11:19:13 +01:00
2023-11-29 09:48:18 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-05-07 09:15:40 +02:00
2024-05-02 07:26:13 +02:00
2023-11-29 09:48:18 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-12-26 11:16:10 +01:00
2023-11-30 09:51:46 -05:00
2023-11-19 12:10:31 +01:00
2023-12-17 18:25:10 +03:30
2024-04-19 06:31:19 -04:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-04-16 07:40:01 +02:00
2023-11-29 09:48:18 +01:00
2023-12-26 11:16:10 +01:00
2024-04-09 10:18:35 +02:00
2024-04-16 16:57:06 +02:00
2024-02-28 21:09:09 +01:00
2024-04-21 09:12:25 +02:00
2024-04-21 09:12:25 +02:00
2023-12-26 11:16:10 +01:00
2023-12-26 11:16:10 +01:00
2023-12-26 11:16:10 +01:00
2023-11-19 12:10:31 +01:00
2023-12-26 11:16:10 +01:00
2023-11-19 12:10:31 +01:00
2024-01-12 09:11:18 +01:00
2024-01-12 09:11:18 +01:00
2024-02-03 09:29:40 +01:00
2023-11-19 12:10:31 +01:00
2023-12-17 18:25:10 +03:30
2023-12-17 18:25:10 +03:30
2023-11-19 12:10:31 +01:00
2024-02-29 09:00:00 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-05-07 09:15:40 +02:00
2024-05-04 06:48:07 +02:00
2024-02-29 09:00:00 +01:00
2024-02-29 09:00:00 +01:00
2023-12-17 18:25:10 +03:30
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-04-09 09:13:06 +02:00
2024-04-09 09:13:06 +02:00
2024-04-20 19:23:46 -04:00
2024-05-07 09:15:40 +02:00
2024-05-07 09:15:40 +02:00
2024-03-16 14:27:06 +01:00
2024-03-16 14:27:06 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-03-16 14:27:06 +01:00
2023-11-19 12:10:31 +01:00
2024-05-04 21:42:59 +02:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-12-17 18:25:10 +03:30
2023-11-29 09:48:18 +01:00
2023-12-17 18:25:10 +03:30
2023-11-29 09:48:18 +01:00
2023-11-29 09:48:18 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-05-07 09:15:40 +02:00
2024-05-02 07:26:13 +02:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-02-29 09:00:00 +01:00
2023-12-17 18:25:10 +03:30
2023-11-19 12:10:31 +01:00
2024-04-19 06:31:19 -04:00
2024-02-29 09:00:00 +01:00
2024-05-04 21:42:59 +02:00
2024-05-04 21:42:59 +02:00
2024-02-03 14:07:26 -05:00
2024-02-03 14:07:26 -05:00
2023-12-07 14:06:34 +01:00
2023-11-19 12:10:31 +01:00
2023-12-07 14:06:34 +01:00
2023-12-07 14:06:34 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-12-07 14:06:34 +01:00
2023-11-19 12:10:31 +01:00
2024-04-02 15:56:05 +02:00
2024-03-16 14:27:06 +01:00
2024-01-21 15:47:53 -07:00
2023-12-17 18:25:10 +03:30
2024-04-07 18:01:50 +02:00
2023-11-19 12:10:31 +01:00
2023-12-26 12:07:50 -05:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-12-01 13:01:26 +01:00
2023-12-01 13:01:26 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-05-04 21:42:59 +02:00
2024-05-04 21:42:59 +02:00
2023-12-17 18:25:10 +03:30
2024-05-07 09:15:40 +02:00
2023-11-29 09:48:18 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-12-17 18:25:10 +03:30
2023-11-19 12:10:31 +01:00
2024-05-04 21:42:59 +02:00
2024-05-04 21:42:59 +02:00
2023-12-26 12:07:50 -05:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-02-29 09:00:00 +01:00
2023-12-17 18:25:10 +03:30
2023-11-19 12:10:31 +01:00
2024-02-24 15:06:52 -07:00
2023-12-17 18:25:10 +03:30
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-04-16 07:40:01 +02:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-04-09 10:18:35 +02:00
2024-04-09 10:18:35 +02:00
2024-04-23 12:50:40 +02:00
2024-03-26 05:47:24 +01:00
2024-04-03 18:14:33 +02:00
2023-11-19 12:10:31 +01:00
2024-03-16 14:27:06 +01:00
2024-03-16 14:27:06 +01:00
2024-04-16 07:40:01 +02:00
2024-04-09 09:13:06 +02:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-12-17 18:25:10 +03:30
2023-10-07 07:13:52 +02:00
2024-04-01 14:41:00 +02:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-05-04 21:42:59 +02:00
2024-05-04 21:42:59 +02:00
2023-11-29 09:48:18 +01:00
2024-05-04 21:42:59 +02:00
2024-01-27 13:11:18 -05:00
2023-11-29 09:48:18 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-04-06 06:59:36 +02:00
2024-04-06 06:59:36 +02:00
2023-12-17 18:25:10 +03:30
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-12-17 18:25:10 +03:30
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-02-03 14:07:26 -05:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-04-09 09:13:06 +02:00
2024-04-09 09:13:06 +02:00
2024-05-07 09:15:40 +02:00
2023-12-17 18:25:10 +03:30
2023-11-29 09:48:18 +01:00
2023-11-19 12:10:31 +01:00
2023-12-17 18:25:10 +03:30
2023-11-19 12:10:31 +01:00
2024-05-04 21:42:59 +02:00
2024-05-04 21:42:59 +02:00
2023-12-26 11:16:10 +01:00
2023-11-19 12:10:31 +01:00
2023-12-29 09:25:41 +01:00
2023-11-19 12:10:31 +01:00
2023-12-17 18:25:10 +03:30
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-02-24 15:06:52 -07:00
2024-04-20 19:23:46 -04:00
2024-01-04 12:43:10 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-12-23 23:02:10 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-04-24 16:50:01 -04:00
2024-05-04 21:42:59 +02:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-03-26 17:11:26 -04:00
2023-11-19 12:10:31 +01:00
2023-12-17 18:25:10 +03:30
2023-12-17 18:25:10 +03:30
2024-03-04 20:54:51 +01:00
2024-03-04 20:54:51 +01:00
2023-10-07 07:13:52 +02:00
2024-04-19 06:31:19 -04:00
2024-05-07 09:15:40 +02:00
2024-04-09 09:10:44 +02:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-12-17 18:25:10 +03:30
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-04-06 06:59:36 +02:00
2024-02-03 14:07:26 -05:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2023-11-19 12:10:31 +01:00
2024-04-09 09:13:06 +02:00
2024-04-09 09:13:06 +02:00
2023-11-29 09:48:18 +01:00
2023-11-29 09:48:18 +01:00