Commit graph

11 commits

Author SHA1 Message Date
Andreas Kling
359d6e7b0b Everywhere: Stop using NonnullOwnPtrVector
Same as NonnullRefPtrVector: weird semantics, questionable benefits.
2023-03-06 23:46:35 +01:00
Hendiadyoin1
5506951ffb LibJS: Don't try to merge unterminated BasicBlocks
This was causing a Segfault, trying to access the non-present terminator
2023-02-21 22:46:18 +01:00
Linus Groh
6e7459322d AK: Remove StringBuilder::build() in favor of to_deprecated_string()
Having an alias function that only wraps another one is silly, and
keeping the more obvious name should flush out more uses of deprecated
strings.
No behavior change.
2023-01-27 20:38:49 +00:00
Hendiadyoin1
186237aec8 LibJS: Don't try to merge blocks not ending in Jumps 2022-12-03 17:07:30 +03:30
Hendiadyoin1
c66284ab0b LibJS: Fix MergeBlocks emitting some blocks twice 2022-11-01 11:21:18 +01:00
Hendiadyoin1
28e2467b48 LibJS: Minor cleanups in MergeBlocks 2022-11-01 11:21:18 +01:00
Hendiadyoin1
1ac1a5bd58 LibJS: Don't memcpy NewBigInt instruction
These aren't trivially copyable, so we have to be a bit more careful
2022-11-01 11:21:18 +01:00
sin-ack
3f3f45580a Everywhere: Add sv suffix to strings relying on StringView(char const*)
Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).

No functional changes.
2022-07-12 23:11:35 +02:00
Ali Mohammad Pur
0b8d2fb62f LibJS/Bytecode: Replace merged block references before copying them 2022-03-14 22:28:53 +01:00
Ben Wiederhake
0c365fdfd3 LibJS: Avoid unnecessary copies in MergeBlocks codegen pass 2022-01-01 15:40:39 +01:00
Ali Mohammad Pur
1414c7b049 LibJS: Add a basic pass manager and add some basic passes
This commit adds a bunch of passes, the most interesting of which is a
pass that merges blocks together, and a pass that places blocks that
flow into each other next to each other, and a very simply pass that
removes duplicate basic blocks.
Note that this does not remove the jump at the end of each block in that
pass to avoid scope creep in the passes.
2021-06-15 22:06:33 +04:30