Age | Commit message (Collapse) | Author | |
---|---|---|---|
2022-01-07 | Everywhere: Fix many spelling errors | mjz19910 | |
2022-01-04 | Userland: Resolve tautological-constant-out-of-range-compare warnings | Andrew Kaster | |
Stop comparing platform-specific sized integer types to max() values of other interger types. Enable the warning everywhere. | |||
2021-12-21 | AK+Everywhere: Replace __builtin bit functions | Nick Johnson | |
In order to reduce our reliance on __builtin_{ffs, clz, ctz, popcount}, this commit removes all calls to these functions and replaces them with the equivalent functions in AK/BuiltinWrappers.h. | |||
2021-12-21 | LibWasm: Tolerate modules with invalid sections and mark them as invalid | Ali Mohammad Pur | |
We should not crash, but rather just fail to verify them. | |||
2021-12-21 | LibWasm: Make shown instruction names match the names in the spec | Ali Mohammad Pur | |
2021-12-21 | LibWasm: Add a instruction_from_name getter | Ali Mohammad Pur | |
2021-12-21 | LibWasm: Print the block type for structured arguments | Ali Mohammad Pur | |
2021-12-21 | LibWasm: Fix silly typo in f32 reinterpret validation | Ali Mohammad Pur | |
2021-12-21 | LibWasm: Make blocks that take arguments actually work | Ali Mohammad Pur | |
Previously we were ignoring the actual parameters and setting the arity to an incorrect value, which could cause crashes (or unexpected traps). | |||
2021-12-21 | LibWasm: Implement memory.init and passive mode data | Ali Mohammad Pur | |
2021-11-17 | AK: Convert AK::Format formatting helpers to returning ErrorOr<void> | Andreas Kling | |
This isn't a complete conversion to ErrorOr<void>, but a good chunk. The end goal here is to propagate buffer allocation failures to the caller, and allow the use of TRY() with formatting functions. | |||
2021-11-11 | LibWasm: Fix broken build after merging un-rebased Validator changes | Andreas Kling | |
2021-11-11 | LibWasm: Remove traps caught by validation | Ali Mohammad Pur | |
2021-11-11 | LibWasm: Implement module validation | Ali Mohammad Pur | |
2021-11-11 | LibWasm: Make opcode definitions enumerable through a macro | Ali Mohammad Pur | |
2021-11-10 | AK: Make ByteBuffer::try_* functions return ErrorOr<void> | Andreas Kling | |
Same as Vector, ByteBuffer now also signals allocation failure by returning an ENOMEM Error instead of a bool, allowing us to use the TRY() and MUST() patterns. | |||
2021-11-10 | AK: Make Vector::try_* functions return ErrorOr<void> | Andreas Kling | |
Instead of signalling allocation failure with a bool return value (false), we now use ErrorOr<void> and return ENOMEM as appropriate. This allows us to use TRY() and MUST() with Vector. :^) | |||
2021-10-06 | LibWasm: Add missing forward declaration to Printer/Printer.h | Ben Wiederhake | |
2021-09-21 | Libraries: Use AK::Variant default initialization where appropriate | Ben Wiederhake | |
2021-09-11 | LibWasm: Avoid making StringView of temporary ByteBuffer | Ben Wiederhake | |
2021-09-07 | Everywhere: Behaviour => Behavior | Andreas Kling | |
2021-09-06 | Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe | Ali Mohammad Pur | |
2021-09-06 | Everywhere: Use OOM-safe ByteBuffer APIs where possible | Ali Mohammad Pur | |
If we can easily communicate failure, let's avoid asserting and report failure instead. | |||
2021-09-05 | LibWeb+LibWasm: Implement the WebAssembly.Table object | Ali Mohammad Pur | |
2021-09-05 | LibWasm: Move the vector size limit to Constants.h and increase it a bit | Ali Mohammad Pur | |
2021-08-31 | LibWasm: Limit the number of function locals | Ali Mohammad Pur | |
It's possible for the module to request too many locals, we now reject such modules instead of trying to allocate space for them. The value itself is chosen arbitrarily, so future tweaks _might_ be necessary. Found by OSS-Fuzz: https://oss-fuzz.com/testcase?key=4755809098661888 | |||
2021-08-30 | LibWasm: Make the Truncate operator trap on undefined results | Ali Mohammad Pur | |
2021-08-30 | LibWasm: Implement fx.nearest using nearbyint() instead of round() | Ali Mohammad Pur | |
This instruction wants RoundingMode::ToEven, so let's use the correct function. | |||
2021-08-26 | LibWasm: Use Operators::BitShiftRight for i64.shru | Ali Mohammad Pur | |
Using a left-shift operator for a right shift operation is not exactly the most correct action :P | |||
2021-08-12 | LibWasm: Move some Values and Vector<Value>s instead of copying them | Ali Mohammad Pur | |
2021-08-12 | LibWasm: Avoid calculating stack bounds on each wasm call | Ali Mohammad Pur | |
We only need to know the initial bounds, which we calculate by default when the interpreter is constructed. This cuts down on syscalls and makes wasm calls a lot cheaper. | |||
2021-08-12 | LibWasm: Generate Value::type() on the fly instead of storing it | Ali Mohammad Pur | |
The variant member already contains enough information to give us the type when needed, so remove the type member and synthesize it when needed, this allows lots of optimisation opportunaties when copying and moving Values around. | |||
2021-08-12 | LibWasm: Replace memory write macros with templated functions | Ali Mohammad Pur | |
2021-08-12 | LibWasm: Make memory operation address calculation match the spec | Ali Mohammad Pur | |
...or rather, match what the spec _means_ to say, not what it actually says. | |||
2021-08-12 | LibWasm: Replace memory read macros with templated functions | Ali Mohammad Pur | |
2021-08-12 | LibWasm: Replace the numeric operation macros with templated functions | Ali Mohammad Pur | |
This should make debugging and profiling much better, at little to no runtime cost. Also moves off the operator definitions to a separate header, so it should also improve the editing experience quite a bit. | |||
2021-07-22 | Everywhere: Prefer using {:#x} over 0x{:x} | Gunnar Beutner | |
We have a dedicated format specifier which adds the "0x" prefix, so let's use that instead of adding it manually. | |||
2021-07-17 | LibWasm: Remove a useless use of ScopeGuard | Ali Mohammad Pur | |
There are no multiple exit paths in that function, so we can just put the ending logic right at the end of the function instead. | |||
2021-07-17 | LibWasm+Everywhere: Make the instruction count limit configurable | Ali Mohammad Pur | |
...and enable it for LibWeb and test-wasm. Note that `wasm` will not be limited by this. | |||
2021-07-17 | LibWasm: Inline some very hot functions | Ali Mohammad Pur | |
These are mostly pretty small functions too, and they were about ~10% of runtime. | |||
2021-07-17 | Revert "LibWasm: Some more performance stuff (#8812)" | Ali Mohammad Pur | |
This reverts commit 35394dbfaa23b44a293da85b20a63a10f73572c3. I pushed the wrong button again, hopefully this will be the last of such incidents. | |||
2021-07-17 | LibWasm: Some more performance stuff (#8812) | Ali Mohammad Pur | |
* wasm: Don't try to print the function results if it traps * LibWasm: Inline some very hot functions These are mostly pretty small functions too, and they were about ~10% of runtime. * LibWasm+Everywhere: Make the instruction count limit configurable ...and enable it for LibWeb and test-wasm. Note that `wasm` will not be limited by this. * LibWasm: Remove a useless use of ScopeGuard There are no multiple exit paths in that function, so we can just put the ending logic right at the end of the function instead. | |||
2021-07-12 | LibWasm: Adjust signed integer operations to avoid UB | Andrew Kaster | |
Perform signed integer shifts, addition, subtraction, and rotations using their corresponding unsigned type. Additionally, mod the right hand side of shifts and rotations by the bit width of the integer per the spec. This seems strange, but the spec is clear on the desired wrapping behavior of arithmetic operations. | |||
2021-07-12 | LibWasm: Skip initializing active empty data sections | Ali Mohammad Pur | |
2021-07-12 | LibWasm: Use AK::StackInfo to track stack size | Ali Mohammad Pur | |
This way, we can make sure that it doesn't overflow when ASAN is enabled. | |||
2021-07-06 | LibWasm: Don't create useless temporary strings for trap reasons | Ali Mohammad Pur | |
These strings are only used when execution traps, so there's no reason to create actual strings until that happens; instead switch to using StringViews. | |||
2021-07-06 | LibWasm: Tweak the implementation-defined limits a bit | Ali Mohammad Pur | |
2021-07-06 | LibWasm: Allow overflow in normal 64-bit arithmetic instructions | Ali Mohammad Pur | |
2021-07-06 | LibWasm: Limit module memory to 65536 pages | Ali Mohammad Pur | |
The spec mentions this, and anything past that can't be correctly addressed by the 32-bit indices anyhow. | |||
2021-07-06 | LibWasm: Fix data section initialization bounds checking | Ali Mohammad Pur | |