Commit graph

13 commits

Author SHA1 Message Date
Ali Mohammad Pur
92c0cbc453 LibWasm+LibWeb: Stub wasm-gc's heap reference types
WPT inserts these into all modules regardless of whether they're used,
so let's just parse and ignore them.
2025-10-15 01:26:29 +02:00
Ali Mohammad Pur
d99f663b1a LibWasm: Implement parsing/validation for proposal exception-handling
Actual execution traps for now.
2025-10-15 01:26:29 +02:00
Ali Mohammad Pur
ddb35dcb5f LibWasm: Accept proposal 'memory64' (but don't actually run it)
This is a WIP implementation.
2025-10-15 01:26:29 +02:00
Ali Mohammad Pur
d6f3f5fd51 LibWasm: Implement proposal 'relaxed-simd' 2025-10-15 01:26:29 +02:00
Ali Mohammad Pur
6a6f747701 LibWasm: Add support for proposal 'tail-call' 2025-10-15 01:26:29 +02:00
Pavel Shliak
c53d9d7122 LibWasm: Use 0x40 flag for SIMD memory memidx like scalar ops
SIMD loads/stores checked bit 0x20 of the align immediate to detect a
following memory index, unlike scalar mem ops which use 0x40 per the
multi-memory encoding. This caused the memidx byte to be misparsed as
the next immediate (e.g. offset).

Update both SIMD sites (v128 load/store and lane variants) to check and
clear 0x40, then read LEB128<u32> memidx.

Repro:
  (module (memory $m0 1) (memory $m1 1)
    (func (export "go")
      i32.const 0
      v128.load (memory 1)
      drop))
Before: printed memidx 0 with offset 1.
After:  prints memidx 1 with offset 0.
2025-09-06 06:19:40 +02:00
Ali Mohammad Pur
22448b0c35 LibWasm: Move the interpreter IP out of the configuration object
This, along with moving the sources and destination out of the config
object, makes it so we don't have to double-deref to get to them on each
instruction, leading to a ~15% perf improvement on dispatch.
2025-08-26 15:20:33 +02:00
Ali Mohammad Pur
3f77aa8521 LibWasm: Try to avoid vcalls on very busy stream read functions
This was a bottleneck when parsing, in general.
2025-08-08 12:54:06 +02:00
Timothy Flynn
9fc3e72db2 AK+Everywhere: Allow lonely UTF-16 surrogates by default
By definition, the web allows lonely surrogates by default. Let's have
our string APIs reflect this, so we don't have to pass an allow option
all over the place.
2025-07-03 09:51:56 -04:00
Viktor Szépe
19f88f96dc Everywhere: Fix typos - act III 2025-06-16 14:20:48 +01:00
Timothy Flynn
7280ed6312 Meta: Enforce newlines around namespaces
This has come up several times during code review, so let's just enforce
it using a new clang-format 20 option.
2025-05-14 02:01:59 -06:00
Pavel Shliak
35764db0b7 LibWasm: Clean up #include directives
This change aims to improve the speed of incremental builds.
2024-11-21 14:08:33 +01:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Renamed from Userland/Libraries/LibWasm/Parser/Parser.cpp (Browse further)