Commit graph

22915 commits

Author SHA1 Message Date
Idan Horowitz 311b2c0720 CI: Increase ccache size limit for on-target builds
It turns out that ccache caches are highly compressible (total size is
reduced by about 65%), so we should be able to increase the cache limit
for some free speedups. :^)
2021-07-02 17:51:13 +02:00
Idan Horowitz f8f3ff65fe LibJS: Bring %TypedArray%.prototype.set slightly closer to spec
Specifically, instead of using the internal {get, put}_by_index methods
we now use the GetValueFromBuffer and SetValueInBuffer abstract
operations, as required by the specification.

While i was here i also replaced a couple custom detached array buffer
error messages with the existing ErrorType::DetachedArrayBuffer.
2021-07-02 15:53:51 +01:00
Spencer Dixon e6f0b2d817 Assistant: Add a new FileProvider to assist in searching the filesystem
When searching in Assistant, we now dispatch some background jobs to
query the whole filesystem. Activating a result will use the Desktop
launcher's default way of opening that file or directory.
2021-07-02 16:47:14 +02:00
Spencer Dixon 00f93b2545 LibThreading: Add ability to cancel ongoing BackgroundActions
Handlers of the BackgroundAction are responsible for checking if the
action has been cancelled and returning early.
2021-07-02 16:47:14 +02:00
Spencer Dixon 4a3958c8ae Assistant: Remove Result::Kind in favor of native typeid
I was unaware of the `typeid` construct in C++ which can be used to
achieve the same thing I was doing with this extra Kind enum.
2021-07-02 16:47:14 +02:00
Ali Mohammad Pur ccbc54358d LibJS: Allow patterns in parenthesized arrow function parameters 2021-07-02 14:59:03 +02:00
Ali Mohammad Pur 2e00731ddb LibJS: Allow 'yield' and 'await' as function expression names
The spec says so, and test262 checks for this too.
2021-07-02 14:59:03 +02:00
Ali Mohammad Pur a6fe27423a LibJS: Allow binding patterns as for in/of targets 2021-07-02 14:59:03 +02:00
Ali Mohammad Pur bd9f28bba6 LibJS: Allow 'yield' as a variable name outside of generator functions 2021-07-02 14:59:03 +02:00
Ali Mohammad Pur 0292ad33eb LibJS: Make a slash after a curly close mean not-division
There's no grammar rule that allows this.
2021-07-02 14:59:03 +02:00
Ali Mohammad Pur 46ef333e9c LibJS: Parse generator functions in class expressions too 2021-07-02 14:59:03 +02:00
Spencer Dixon 609a0aa75d Assistant: Change to home directory when spawning applications
When launching Terminal via Taskbar we change to the users home
directory. For consistency, let's also `chdir` to `/home/anon` when
launching apps via Assistant's AppProvider.
2021-07-02 14:16:56 +02:00
Liav A acd2604a31 Revert "Revert "Revert "Kernel: Fix PCI layout of i440fx QEMU machine"""
This reverts commit a808fff2ec.

I highly suspect the reason it was not working before was fixed in
017c5fc7d9, so the SB16 DMA can work even
if we initialize another E1000 network adapter.
2021-07-02 13:16:12 +02:00
Liav A 32a4a4ac19 Kernel/ProcFS: Lazily allocate all sub components of a PID folder 2021-07-02 13:16:12 +02:00
Liav A 6282df3066 Kernel/ACPI: Don't ask from TypedMapping to map 2 pages if unnecessary 2021-07-02 13:16:12 +02:00
Liav A 4499b0418c Kernel/TypedMapping: Round up length with offset_in_page
Fixes #6948.
2021-07-02 13:16:12 +02:00
Liav A 3344f91fc4 Kernel/ProcFS: Clean dead processes properly
Now we use WeakPtrs to break Ref-counting cycle. Also, we call the
prepare_for_deletion method to ensure deleted objects are ready for
deletion. This is necessary to ensure we don't keep dead processes,
which would become zombies.

In addition to that, add some debug prints to aid debug in the future.
2021-07-02 13:16:12 +02:00
Liav A 5073bf8e75 Kernel/USB: Move the USB components as a subfolder to the Bus directory 2021-07-02 13:16:12 +02:00
Liav A 6568bb47cb Kernel/PCI: Move the PCI components as a subfolder to the Bus directory 2021-07-02 13:16:12 +02:00
Tom 26e9140ea1 WindowServer: Fix redrawing menu window that already existed
This fixes redrawing a menu where the window menu is reused at a
different location or with different content.
2021-07-02 13:12:29 +02:00
Brian Gianforcaro 179d8f6815 LibELF: Use StringView literal to avoid string allocations 2021-07-02 10:51:20 +04:30
Brian Gianforcaro 1498dcd9e1 DynamicLoader: Use string view literal to remove a allocation on startup
The ""sv operator switches a const char* to String conversion into
just a StringView literal.
2021-07-02 10:51:20 +04:30
Ali Mohammad Pur b538e15548 LibWasm: Give traps a reason and display it when needed
This makes debugging wasm code a bit easier, as we now know what fails
instead of just "too bad, something went wrong".
2021-07-02 04:53:01 +04:30
Ali Mohammad Pur 62ca81fdcc LibJS: Implement the %TypedArray%.set() function 2021-07-02 04:53:01 +04:30
Ali Mohammad Pur 321db0159e LibWeb: Add the WebAssembly.Module constructor 2021-07-02 04:53:01 +04:30
Ali Mohammad Pur 8acc8339d1 LibWeb: Add the WebAssembly.Instance constructor 2021-07-02 04:53:01 +04:30
Ali Mohammad Pur de4cbc8f08 LibWeb: Use the correct name to refer to WebAssembly.Memory.prototype
Otherwise `instanceof` wouldn't return the correct result.
2021-07-02 04:53:01 +04:30
Ali Mohammad Pur bfb3d9e9d0 LibWeb: Split the WebAssemblyInstance object logic into multiple files
Now that we're adding a constructor to it, let's split it up like the
rest of LibWeb does.
2021-07-02 04:53:01 +04:30
Andreas Kling a4897ed7b2 LibJS: Throw on failed PutValue into an environment reference
This should really be handled at a different layer of the stack, but
this allows us to make progress on the Object rewrite without breaking
strict mode assignment tests.
2021-07-02 00:32:23 +02:00
Andreas Kling 80170887db LibJS: Make Environment::put_into_environment() return a success bool
This code is non-conforming and will eventually get cleaned out once
we implement proper variable bindings. However, this will aid us in
improving other parts of the code right now.
2021-07-02 00:26:31 +02:00
Andreas Kling 57db058652 LibJS: Make ResolveBinding() produce strict References in strict mode 2021-07-02 00:25:52 +02:00
Gunnar Beutner db334b50d0 Kernel: Don't byteswap the ISR number on interrupt entry
Let's just add the padding before we jump to interrupt_common_asm_entry.
2021-07-01 23:36:17 +02:00
Brian Gianforcaro 59ba316ac6 AK: Annotate more AK::Span methods as nodiscard 2021-07-01 22:44:06 +02:00
Brian Gianforcaro 60efe18a31 Kernel: Handle OOM when allocating Thread FPUState
Move FPUState allocation to Thread::try_create so that allocation
failure can be observed properly by the caller.
2021-07-01 22:43:48 +02:00
Idan Horowitz 4fb962a0b9 CI: Add x86_64 on target tests 2021-07-01 22:42:54 +02:00
Timothy Flynn 1bbf3f1d09 LibWeb: Do not encode "internal_id" in DOM JSON
This is now unused.
2021-07-01 19:19:46 +02:00
Timothy Flynn 447ecc2155 LibWeb: Maintain a map of child-to-parent nodes in OOPWV DOM Inspector
Currently, each time parent_index() is invoked, two depth-first searches
are incurred to find the node's parent and grandparent. This becomes
particularly expensive, for example, when trying to scroll through a
large <ul> list.

Instead, upon creation, traverse the DOM JSON and create a map of child
nodes to their parent. Then those two lookups become hash map lookups
rather than a DFS traversal.
2021-07-01 19:19:46 +02:00
Idan Horowitz 97ea192e3e CI: Cancel duplicate workflow runs for pull requests
These are created when a pull request is force-pushed to, which results
in the unneeded waste of action runners on the obsolete CI run.
2021-07-01 18:26:32 +02:00
Idan Horowitz 3265141286 Meta: Make serenity.sh pass the SERENITY_ARCH cmake argument for x86_64
This is required as our CMake config defaults to i686 if not overriden
manually via the SERENITY_ARCH argument.
2021-07-01 18:08:16 +02:00
Timothy efcfc8ef7f InspectorServer: Use LocalSocket method to get pid 2021-07-01 17:49:18 +02:00
Timothy 972e5d7292 LibCore: Add peer pid retrieval for LocalSocket
This will allow programs connected over unix sockets to retrieve the
pid of their peers in a nice way.
2021-07-01 17:49:18 +02:00
Andreas Kling c52ea3dad5 LibJS: Try to fix Clang build (NewClass::m_class_expression is unused) 2021-07-01 17:46:45 +02:00
Johan Dahlin f6028c2534 LibJS: NewClass bytecode instruction
This adds a the NewClass bytecode instruction, enough of it
is implemented for it to show it in the bytecode (js -d).
2021-07-01 17:34:05 +02:00
Hendiadyoin1 3694b8b690 Kernel: Only deallocate memory when alloc succeeds
Also make AllocationHeader acquisition from pointers more verbose
2021-07-01 17:32:34 +02:00
Hendiadyoin1 5f6c513610 Kernel: Add support for 64-bit unaligned Mem-ops
Also let the compiler enforce the size and type restrictions
2021-07-01 17:32:34 +02:00
Hendiadyoin1 6b9cf8376e Kernel: Remove not needed comment in Processor.h 2021-07-01 17:32:34 +02:00
Gunnar Beutner 092ee955aa DynamicLoader: Remove obsolete comment 2021-07-01 17:22:22 +02:00
Gunnar Beutner 16b9a2d2e1 Kernel+LibPthread: Add support for usermode threads on x86_64 2021-07-01 17:22:22 +02:00
Gunnar Beutner 93c741018e Kernel+LibPthread: Remove m_ prefix for public members 2021-07-01 17:22:22 +02:00
Idan Horowitz 648b4c7d74 LibJS: Bring JSON.parse slightly closer to the specification
This PR does not fix the main issue with our current implementation:
The specification requires that we first check the JSON string for
validity with an ECMA-404 compliant parser, and then evaluate it as if
it was javascript code, of which we do neither at the moment.
2021-07-01 14:14:41 +01:00