Commit graph

62494 commits

Author SHA1 Message Date
Diego Frias 3fe206d44f AK/SIMDExtras: Fix masking logic in shuffle_or_0
(cherry picked from commit a168bec7efcb26ef7e27cd5294fdefa1ff9e4ca9)
2024-07-29 14:34:01 +02:00
Diego Frias 2b708f791b AK/LEB128: Speed up reading unsigned LEB128 values
Unroll the first byte as a fast path, and remove a branch. This speeds
up the instantiation of spidermonkey by 10ms.

(cherry picked from commit a6ebd100ecd9ed633e290153f61466362e63b73a)
2024-07-29 14:34:01 +02:00
Diego Frias ffe3f02e2b LibWasm: Remove needless and costly copies
Speeds up spidermonkey.wasm instantiation by around 60ms (240ms -> 180ms)

(cherry picked from commit fc57f5111dfbed55208f13b17edb3c77d9cfdb8b)
2024-07-29 14:34:01 +02:00
Diego Frias ff6d9cc6b6 LibWasm: Stop using ConstrainedStream for function parsing
Speeds up spidermonkey.wasm instantiation by around 20ms (260ms -> 240ms)

(cherry picked from commit 2192c149e298a2a4fc135bb1a36bafee4a462398)
2024-07-29 14:34:01 +02:00
Diego Frias 63e45c1752 LibWasm: Provide size hint when parsing instructions into a vector
Speeds up spidermonkey.wasm instantiation by around 20ms (280ms -> 260ms)

(cherry picked from commit 5cde327d463edc39093385a0b7155d97b7f5d16b)
2024-07-29 14:34:01 +02:00
Diego Frias 71f2582a71 LibWasm: Flatten instructions in one continuous loop during parsing
Instead of multiple loops and multiple vectors, parse Wasm expressions
in a simple loop. This gets us from ~450ms to instantiate spidermonkey
to ~280ms.

(cherry picked from commit 2cfc1873c0436f598f897dd84172b753e2c2b03c)
2024-07-29 14:34:01 +02:00
Diego Frias c0b69a3466 LibWasm: Remove unused vector methods of the interpreter
(cherry picked from commit 4e8376d07e6b928572f7b4a9bb3b6a4468a8b6e7)
2024-07-29 14:34:01 +02:00
Diego Frias 519d3674fa LibWasm: Fix SIMD shuffle and swizzle
`swizzle` had the wrong operands, and the vector masking boolean logic
was incorrect in the internal `shuffle_or_0` implementation. `shuffle`
was previously implemented as a dynamic swizzle, when it uses an
immediate operand for lane indices in the spec.

(cherry picked from commit 9cc3e7d32d150dd30d683c1a8cf0bd59676f14ab)
2024-07-29 14:34:01 +02:00
Diego Frias f92916b4ce LibWasm: Fix SIMD bit shift right
Set the sign in the vector's element type (even though it's a bit
redundant).

(cherry picked from commit d841742c3582e086613bda41a9679dfa6f7f2393)
2024-07-29 14:34:01 +02:00
Diego Frias 73ed02a3d4 LibWasm: Implement the rest of the SIMD conversions
(cherry picked from commit 4b9649282ebfef46e645e404e09f3b50b578d56f)
2024-07-29 14:34:01 +02:00
Diego Frias 91fe4b8a30 LibWasm: Fix v128.any_true instruction
(cherry picked from commit 21c5084d233a0e04bc1235c0f53852d0cd2d3a08)
2024-07-29 14:34:01 +02:00
Diego Frias b47c9dfe45 LibWasm: Implement integer conversion and narrowing SIMD instructions
(cherry picked from commit 616048c67e47c88d8426b46f83ecf13e6f9826e8)
2024-07-29 14:34:01 +02:00
Diego Frias c510c5375f LibWasm: Implement bitmask and float conversion instructions
(cherry picked from commit 146646b59741c1300461056e384dae50815d1621)
2024-07-29 14:34:01 +02:00
Diego Frias d00e37fa20 LibWasm: Remove some unnecessary memory checks
Also make `store_to_memory` take a `MemoryArgument` so that we no longer
have to make "synthetic instructions" in some scenarios.

(cherry picked from commit ea67bc989f58e27a28f473819e4265a0ad0af97f)
2024-07-29 14:34:01 +02:00
Diego Frias 2f317eef75 LibWasm: Remove some dead code
(cherry picked from commit 56ae6b3968b9e688a3ea5500228c1544c8afcbc3)
2024-07-29 14:34:01 +02:00
Ali Mohammad Pur 4b32aaeb5d LibWasm: Replace a hashtable with an RBTree to make instantiation faster
...by about 40%.

(cherry picked from commit 8cf0f36f7d917ce9f0f6759f27ba0553db00e82a)
2024-07-29 14:34:01 +02:00
Ali Mohammad Pur 0369b18abf LibWasm/WASI: Make the premapped stdio files configurable
(cherry picked from commit f1abc36689fc30280a3ff441c870a8664317b46e)
2024-07-29 14:34:01 +02:00
Ali Mohammad Pur 925441bff3 LibWasm/WASI+wasm: Make WASI exit() "noreturn" instead of making it exit
This makes it so exit() traps with a known error; an embedder (wasm.cpp)
can simply match this format and handle the request accordingly.

(cherry picked from commit 16dd8d4d3ba0017383df86739b1d1507593dd682)
2024-07-29 14:34:01 +02:00
Ali Mohammad Pur df07486b11 LibWasm/WASI: Add support for fd_seek()
(cherry picked from commit e08a7cb94d7da785143b014fb846871fbb7c76b5)
2024-07-29 14:34:01 +02:00
Ali Mohammad Pur a07ce3c8c6 LibWasm/WASI: Add support for fd_fdstat_get()
(cherry picked from commit 708abf6bb11c813ab6ed80df509f73e6f612965e)
2024-07-29 14:34:01 +02:00
Ali Mohammad Pur 22f9386ab6 LibWasm: Make import errors a bit more descriptive and helpful
Instead of "yeah something went wrong", show what went wrong.

(cherry picked from commit e22408b8b47c5ae25d4b043a7b6da4b5477871c9)
2024-07-29 14:34:01 +02:00
Holger Hans Peter Freyther 053853dca0 LibWeb/DOM: Avoid repeated calls to Node::navigable
Minor optimization to avoid looking up the navigable during a
layout operation.

(cherry picked from commit 02ba51f203ecab23deadc0ab62a2e9587113459d)
2024-07-29 07:59:13 -04:00
sideshowbarker ae508a61c5 LibWeb: WebIDL::OverloadResolution, minor code streamlining
(cherry picked from commit 70e053bbf4a28875e542c74d5433c04209824820)
2024-07-29 07:58:34 -04:00
sideshowbarker 6dc118fff9 LibWeb: WebIDL::OverloadResolution::resolve_overload, add dbgln FIXMEs
Relates to https://github.com/LadybirdBrowser/ladybird/issues/801

(cherry picked from commit cc7c49e23567a7a8fa96bf59c4cdf2303c76ccdd)
2024-07-29 07:58:34 -04:00
Andreas Kling ea3e9c1b3c LibJS: Fix crash in bytecode generator on https://twinings.co.uk/
If the current block has already been terminated, we should just skip
creating a per-iteration environment.

(cherry picked from commit 9a7e6158afedee8f169f10040a79db95a4e9aebc)
2024-07-29 07:57:19 -04:00
bbb651 53e57868d2 WebAudio: Stub remainder of AudioBufferSourceNode
(cherry picked from commit 014a069157d3900d4f6149849d520f9cd9dbe0bf)
2024-07-29 06:30:08 -04:00
bbb651 6c93feee99 WebAudio: Stub AudioDestinationContext
And expose it through `BaseAudioContext::destination`

(cherry picked from commit 779e3072f93369cf3adef0379bf27ea55475b38b)
2024-07-29 06:30:08 -04:00
bbb651 ca1ff40d06 WebAudio: Import AudioNode directly in GainNode
(cherry picked from commit 9c1739842995ec3e98a4e13a89d4b066ebbb4391)
2024-07-29 06:30:08 -04:00
bbb651 1e66ec24fa WebAudio: BiquadFilterNode: Implement AudioParams and stub rest
(cherry picked from commit 150cef62a05b5eb028626352b54eb092cd7f2eef)
2024-07-29 06:30:08 -04:00
bbb651 e4959ef9f3 WebAudio: Stub/implement more of AudioNode
(cherry picked from commit 6d33cc2b3a3e8b2c570c80866c5aa666927d0ad5)
2024-07-29 06:30:08 -04:00
Timothy Flynn 4ee1e3d5a1 LibWebView+UI: Raise the chrome process open file limit
The default limit (at least on Linux) causes us to run out of file
descriptors at around 15 tabs. Increase this limit to 8k. This is a
rather arbitrary number, but matches the limit set by Chrome.

(cherry picked from commit d58a8b514647a1137d76a1d601f0c325a51f29b3;
amended to also update Userland/Applications/Browser/main.cpp)
2024-07-29 01:01:11 -04:00
Timothy Flynn 9f085e6c4d LibCore: Log errors from pipe2 when creating an event loop
(cherry picked from commit 4451b4fda0da026ba61dc0816a57c23a09bb57d2)
2024-07-29 01:01:11 -04:00
Timothy Flynn f30192280f LibCore: Add system call wrappers around getrlimit and setrlimit
(cherry picked from commit 0d6115e8ae3b20371923dfdb22ad5b506582eaf1)
2024-07-29 01:01:11 -04:00
Tim Ledbetter 92ef7f08df LibWeb: Set correct prototype for WorkerLocation
(cherry picked from commit 354e5a6624a92952b1f3b86f98d9b1d0cb0ec048)
2024-07-28 20:48:58 -04:00
Sam Atkins 94674c6999 LibWeb/CSS: Parse custom-idents more consistently
These have a few rules that we didn't follow in most cases:
- CSS-wide keywords are not allowed. (inherit, initial, etc)
- `default` is not allowed.
- The above and any other disallowed identifiers must be tested
  case-insensitively.

This introduces a `parse_custom_ident_value()` method, which takes a
list of disallowed identifier names, and handles the above rules.

(cherry picked from commit 6ae2b8c3d901d8a7255046a4517fddd8b0fa84c4)
2024-07-28 20:21:39 -04:00
Shannon Booth 2dcb7ed910 WebAudio: Avoid throwing exception for stubbed AudioNode.connect
This stubs out enough to get https://athenacrisis.com/ far enough to
actually load :^)

(cherry picked from commit 52ccd69e49a26b5fd2747730e278503625eb71e7)
2024-07-28 20:21:18 -04:00
Shannon Booth 6b43561841 WebAudio: Avoid throwing exception for stubbed setValueAtTime
Instead, just log an error and continue on gracefully, returning an
instance of ourselves as spec'd.

(cherry picked from commit 52be4925bc3094d4e253649f0bf81dc520a9f390)
2024-07-28 20:21:18 -04:00
Shannon Booth 0ce3726d49 WebAudio: Add stub for AudioDestinationNode.destination
This is called by https://athenacrisis.com/ and passed through to
AudioNode.connect, which expects an AudioNode.

Implement this function enough so that we return an AudioNode so that
AudioNode.connect does not throw a TypeError.

(cherry picked from commit a51095f705c5a6bce2c291e8b51ac90182c63419)
2024-07-28 20:21:18 -04:00
Shannon Booth ff5358d9b8 WebAudio: Add IDL interface for AudioDestinationNode
This is an AudioNode representing the final audio destination and is
what the user will ultimately hear.

This node is used as one of the connecting nodes in athenacrisis.com

Add a placeholder for the interface without anything backing it for now.

(cherry picked from commit 5eb80b8697d458ea2b70112a995e066f64b37ca6)
2024-07-28 20:21:18 -04:00
simonkrauter d314a5a887 LibWeb: Rename HTMLInputElement members related to range shadow tree
Choose a better name for private members which were added in
https://github.com/LadybirdBrowser/ladybird/pull/513

(cherry picked from commit b1d7a27468e5dca58039c79a455c9f8ac1b80680)
2024-07-28 17:35:10 -04:00
Lawrence Gimenez 200634c582 Documentation: Fixed typo at BrowsingContextsAndNavigables
(cherry picked from commit 7c0aa88e99cbc70942b07870fcb44b88e0f162dc)
2024-07-28 17:34:57 -04:00
Andreas Kling eed8a503bd LibWeb+RequestServer: Let RequestServer set HTTP Accept-Encoding header
Ultimately it's RequestServer who knows which kind of encodings it can
handle and decompress, so let's have it set the Accept-Encoding.

(cherry picked from commit 2c918b540db2efcef4751084592ae1cf3be0999f)
2024-07-28 17:34:44 -04:00
Jamie Mansfield 9bbf50b755 LibWeb: Stub BroadcastChannel interface
This is enough to get the 1Password login page to load :^)

(cherry picked from commit d4a7cfb68fddbcfaaaddbd7f159c502c869281bf)
2024-07-28 16:44:35 -04:00
Jamie Mansfield 3a508ecf27 LibWeb: Implement HTMLMarqueeElement.trueSpeed
(cherry picked from commit 1f1276ffb10e0403e8880ff229e84be8f07f0d90)
2024-07-28 16:44:22 -04:00
Jamie Mansfield 47df84b14d LibWeb: Implement HTMLMarqueeElement.scrollDelay
(cherry picked from commit a917f8124cbf1aece0a8a623d4ce47a2464115b6)
2024-07-28 16:44:22 -04:00
Jamie Mansfield 43efbdd4b3 LibWeb: Implement HTMLMarqueeElement.scrollAmount
(cherry picked from commit 2a408ecfbc4b8cbc788230aa06fa30d32721922c)
2024-07-28 16:44:22 -04:00
Jamie Mansfield 5c9e947ebc LibWeb: Implement HTMLFrameElement.noResize
(cherry picked from commit 66528a17cb60c44d8cb946785b19d92a125c923a)
2024-07-28 16:44:22 -04:00
Jamie Mansfield 4b6801c13d LibWeb: Implement HTMLFrameElement.marginWidth
(cherry picked from commit e363e8918901ac33ceecc088f30c66797c069c8c)
2024-07-28 16:44:22 -04:00
Jamie Mansfield 0fa1f703d6 LibWeb: Implement HTMLFrameElement.marginHeight
(cherry picked from commit 4edc946aed6c2bceca4f8bfe9dca799d2cfe4743)
2024-07-28 16:44:22 -04:00
Braydn 2e8c178a03 LibWeb: Add Web Worker Origin Inheritance
Fetch requests from web workers fail CORS checks because the origin is
not inherited from the outside settings. Ensure web worker origin is
correctly inherited from outside settings

(cherry picked from commit 24adb1c4526fe29bbc332780272251be1635cf05)
2024-07-28 16:44:11 -04:00