summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-01-15Kernel: Remove infallible VMObject resource factory functionscreator1creeper1
These infallible resource factory functions were only there to ease the conversion to the new factory functions. Since all child classes of VMObject now use the fallible resource factory functions, we don't need the infallible versions anymore.
2022-01-15Kernel: Make SharedInodeVMObject construction OOM-awarecreator1creeper1
This commit moves the allocation of the resources required for SharedInodeVMObject from its constructors to its factory functions. We're making this change to expose the fallibility of the allocation.
2022-01-15Kernel: Make PrivateInodeVMObject construction OOM-awarecreator1creeper1
This commit moves the allocation of the resources required for PrivateInodeVMObject from its constructors to its factory functions. We're making this change to expose the fallibility of the allocation.
2022-01-15Kernel: Make InodeVMOBject construction OOM-awarecreator1creeper1
This commit moves the allocation of the resources required for InodeVMObject from its constructors to the constructors of its child classes. We're making this change to give the child classes the chance to expose the fallibility of the allocation.
2022-01-15Kernel: Make AnonymousVMObject construction OOM-awarecreator1creeper1
This commit moves the allocation of the resources required for AnonymousVMObject from its constructors to its factory functions. We're making this change to expose the fallibility of the allocation.
2022-01-15Kernel: Make VMOBject construction OOM-awarecreator1creeper1
This commit moves the allocation of the resources required for VMObject from its constructors to the constructors of its child classes. We're making this change to give the child classes the chance to expose the fallibility of the allocation.
2022-01-15AK: Add a constructor from Span for FixedArraycreator1creeper1
This is particularly useful in the Kernel, where the physical pages of a VMObject are stored as a FixedArray but often passed around as a Span from which a new FixedArray should be cloned.
2022-01-15AK: Add a constructor from C-style arrays for FixedArraycreator1creeper1
We really want to be able to construct FixedArray from a list of non-copyable but movable objects. This constructor is useful for such things.
2022-01-15LibJS: Implement Date.prototype.getTimezoneOffsetTimothy Flynn
2022-01-15LibJS: Implement MakeDay without using AK::years_to_days_since_epochTimothy Flynn
Implementing years_to_days_since_epoch without a loop will be tricky. The TimeFromYear AO gives a good enough approximation for MakeDay until we figure that out.
2022-01-15LibJS: Move time conversion constants to the Date headerTimothy Flynn
These are needed outside of the Date object .cpp file, so move them to the header.
2022-01-15LibJS: Remove Core::DateTime logic from the Date object :^)Timothy Flynn
2022-01-15LibJS+js: Pretty-print Date objects using the ToDateString AOTimothy Flynn
2022-01-15LibJS: Re-implement the Date constructor / prototype for spec complianceTimothy Flynn
First, this adds a constructor to the Date object to be created from a plain double. This is a first step to removing Core::DateTime as the basis for the Date object. A subsequent commit will remove the now- unused data from the object. Next, this implements the constructor in accordance to the spec. The constructor when NewTarget is undefined no longer allocates a Date on the heap. The other constructor properly uses recently created AOs to handle time zone and ensure the created [[DateValue]] is valid. Other methods on the constructor (Date.now) have not been touched yet. Last, the prototype is reimplemented. Again, we use other AOs to handle time zones and time clipping. Not all prototypes are fixed; most of them are, but a few (e.g. Date.prototype.getTimezoneOffset) were not fixed, but left in a mostly unimplemented state for another commit. In all of the above, spec comments are added. This is a rather large change; but it's tough to do any of these parts individually without breaking everything else.
2022-01-15LibJS: Make the thisTimeValue AO publicTimothy Flynn
It will be needed by the Date constructor.
2022-01-15LibJS: Implement spec-compliant ToDateString and its underlying AOsTimothy Flynn
2022-01-15LibJS: Protect LocalTZA against non-finite timesTimothy Flynn
It is undefined behavior to cast from a double to an integer if the value does not fit in the limits of the integer.
2022-01-15LibJS: Do not negate offset in LocalTZA for isUTC=falseTimothy Flynn
In commmit 7d2834344a7635ec45aba28a0351feca8e5f1c17, I think I combined the definitions of the LocalTZA and UTC AOs in my head, and thought the offset should be negated within LocalTZA. Instead, the offset should be left untouched, and the UTC AO is responsible for doing the subtraction.
2022-01-15LibJS: Implement the LocalTime, UTC, and TimeWithinDay AOsTimothy Flynn
2022-01-15LibJS: Sort Date.prototype methods by spec orderTimothy Flynn
When viewing the code side-by-side with the spec, it's much nicer when everything is in the same order. Also fixes the spec link for Date.prototype.getMilliseconds (it pointed at setMilliseconds by mistake).
2022-01-15LibTimeZone: Canonicalize the current time zone and fall back to UTCTimothy Flynn
If the tzname is unknown, fall back to UTC for now. Unknown time zones are most likely due to not parsing RULE entries yet, but at the very least, it only makes sense for current_time_zone to return a time zone that LibTimeZone actually knows about.
2022-01-15Kernel: Don't remap already non-writable regions when they become CoWAndreas Kling
The only purpose of the remap() in Region::try_clone() is to ensure non-writable page table entries for CoW regions. If a region is already non-writable, there's no need to waste time updating the page tables.
2022-01-15Kernel: Don't bother with page tables for PROT_NONE mappingsAndreas Kling
When mapping or unmapping completely inaccessible memory regions, we don't need to update the page tables at all. This saves a bunch of time in some situations, most notably during dynamic linking, where we make a large VM reservation and immediately throw it away. :^)
2022-01-15Kernel: Use move() in Region::try_clone() to avoid a VMObject::unref()Andreas Kling
2022-01-15LibELF: Use shared memory mapping when loading ELF objectsAndreas Kling
There's no reason to make a private read-only mapping just for reading (and validating) the ELF headers, and copying out the data segments.
2022-01-15Kernel: Only register kernel regions with MemoryManagerAndreas Kling
We were already only tracking kernel regions, this patch just makes it more clear by having it reflected in the name of the registration helpers. We also stop calling them for userspace regions, avoiding some spinlock action in such cases.
2022-01-15Kernel: Remove old "region lookup cache" optimizationAndreas Kling
This optimization was added when region lookup was O(n), before we had the O(log n) RedBlackTree. Let's remove it to simplify the code, as we have no evidence that it remains valuable.
2022-01-15Spreadsheet: Use FileSystemAccessClient for the reading of filesGlenford Williams
2022-01-15Spreadsheet: Implement the mode functionkleines Filmröllchen
My statistics course has gotten to me :^)
2022-01-15Meta: Make check-symbols.sh use the correct build directorycreator1creeper1
Since the build now happens in Build/$SERENITY_ARCH/ and not in Build/, this updates check-symbols.sh to use the correct directory to check the LibC symbols in. For some reason, the constant failures did not show up as errors in CI.
2022-01-15LibGL+LibSoftGPU: Add support for 8-bit luminance (+ alpha) texturesLuke Wilde
Used by Half-Life for single colour textures. The alpha variant is especially used for UI textures.
2022-01-15Kernel: Always remove PageDirectories from the cr3 map on destructionIdan Horowitz
Previously we would only remove them from the map if they were attached to an AddressSpace, even though we would always add them to the map on construction. This results in an assertion failure on destruction if the page directory was never attached to an AddressSpace. (for example, on an allocation failure of said AddressSpace)
2022-01-15Base: Add default "ShowScrollBar" value to Terminal.ini configBrian Gianforcaro
2022-01-15Terminal: Add config listeners for controlling scrollbar visibilityBrian Gianforcaro
2022-01-15TerminalSettings: Expose a CheckBox controlling scrollbar visibilityBrian Gianforcaro
2022-01-15LibVT: Enable caller to control the visibility of the scrollbar widgetBrian Gianforcaro
In preparation for another feature, expose an API so that any users of this widget can control the scrollbar visibility.
2022-01-15LibCore+LibIPC+Everywhere: Return Stream::LocalSocket from LocalServersin-ack
This change unfortunately cannot be atomically made without a single commit changing everything. Most of the important changes are in LibIPC/Connection.cpp, LibIPC/ServerConnection.cpp and LibCore/LocalServer.cpp. The notable changes are: - IPCCompiler now generates the decode and decode_message functions such that they take a Core::Stream::LocalSocket instead of the socket fd. - IPC::Decoder now uses the receive_fd method of LocalSocket instead of doing system calls directly on the fd. - IPC::ConnectionBase and related classes now use the Stream API functions. - IPC::ServerConnection no longer constructs the socket itself; instead, a convenience macro, IPC_CLIENT_CONNECTION, is used in place of C_OBJECT and will generate a static try_create factory function for the ServerConnection subclass. The subclass is now responsible for passing the socket constructed in this function to its ServerConnection base; the socket is passed as the first argument to the constructor (as a NonnullOwnPtr<Core::Stream::LocalServer>) before any other arguments. - The functionality regarding taking over sockets from SystemServer has been moved to LibIPC/SystemServerTakeover.cpp. The Core::LocalSocket implementation of this functionality hasn't been deleted due to my intention of removing this class in the near future and to reduce noise on this (already quite noisy) PR.
2022-01-15LibCore: Implement LocalSocket::peer_pidsin-ack
Mostly a copy of Core::LocalSocket::peer_pid.
2022-01-15LibCore: Implement LocalSocket::adopt_fdsin-ack
Similar to File::adopt_fd, this function creates a new LocalSocket with an existing fd. The main use of this function is to create LocalSocket objects from fds that have been passed to us by SystemServer to take over.
2022-01-15LibCore: Implement LocalSocket::read_without_waitingsin-ack
This uses recv with MSG_DONTWAIT to disable blocking operation for a single call. LibIPC uses this to read in a non-blocking manner from an otherwise blocking socket.
2022-01-15LibCore: Implement LocalSocket::receive_fd and send_fdsin-ack
These are just wrappers over the sendfd and recvfd syscalls.
2022-01-15Base: Add Kayah Li to font Katica Regular 10Lady Gegga
A900-A92F https://www.unicode.org/charts/PDF/UA900.pdf
2022-01-15Base: Add Tengwar to font Katica Regular 10Lady Gegga
E000-E07D* https://www.kreativekorp.com/ucsur/charts/PDF/UE000.pdf * PUA based on Under-ConScript Unicode Registry
2022-01-15Base: Add Elymaic to font Katica Regular 10Lady Gegga
10FE0-10FF6 https://www.unicode.org/charts/PDF/U10FE0.pdf
2022-01-15AK: Explicitly define copy and assignment operator for SinglyLinkedListLucas CHOLLET
Defined operators: - SinglyLinkedList(const SinglyLinkedList&) - deleted - SinglyLinkedList(SinglyLinkedList&&) - defaulted - SinglyLinkedList& operator=(const SinglyLinkedList&) - deleted - SinglyLinkedList& operator=(SinglyLinkedList&&) - defaulted
2022-01-14CI: Disallow test failures on macOS Lagom :^)Timothy Flynn
2022-01-14LibJS: Clip parsed IS0 8601 strings to +/- 8.64e15Timothy Flynn
2022-01-14LibJS: Implement Date.parse using AK::Time and LibTimeZoneTimothy Flynn
Fixes #4651
2022-01-14LibJS: Implement the localTZA AO for isUTC=falseTimothy Flynn
2022-01-14AK: Use appropriate types in AK::Time::from_timestamp factoryTimothy Flynn
Allow the provided year to be negative, and allow millisecond values larger than 255.