summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-08-23LibJS+LibWeb: Replace GlobalObject with Realm in create() functionsLinus Groh
This is a continuation of the previous two commits. As allocating a JS cell already primarily involves a realm instead of a global object, and we'll need to pass one to the allocate() function itself eventually (it's bridged via the global object right now), the create() functions need to receive a realm as well. The plan is for this to be the highest-level function that actually receives a realm and passes it around, AOs on an even higher level will use the "current realm" concept via VM::current_realm() as that's what the spec assumes; passing around realms (or global objects, for that matter) on higher AO levels is pointless and unlike for allocating individual objects, which may happen outside of regular JS execution, we don't need control over the specific realm that is being used there.
2022-08-23LibJS+LibWeb: Replace GlobalObject with Realm in initialize() functionsLinus Groh
This is a continuation of the previous commit. Calling initialize() is the first thing that's done after allocating a cell on the JS heap - and in the common case of allocating an object, that's where properties are assigned and intrinsics occasionally accessed. Since those are supposed to live on the realm eventually, this is another step into that direction.
2022-08-23LibJS+LibWeb: Replace GlobalObject with Realm in object constructorsLinus Groh
No functional changes - we can still very easily get to the global object via `Realm::global_object()`. This is in preparation of moving the intrinsics to the realm and no longer having to pass a global object when allocating any object. In a few (now, and many more in subsequent commits) places we get a realm using `GlobalObject::associated_realm()`, this is intended to be temporary. For example, create() functions will later receive the same treatment and are passed a realm instead of a global object.
2022-08-23LibJS: Fix the prototype of AsyncFunctionDriverWrapper's Promise baseLinus Groh
2022-08-23LibWeb: Fix the prototype of a couple of WebAssembly prototype objectsLinus Groh
Like any other regular, non-inheriting web platform prototype, the prototype's prototype should be Object.prototype, not the global object. Another reason to get rid of "global object (an object) + prototype object (also an object)"-style APIs for allocation :^)
2022-08-23NetworkServer: Use Core::Stream instead of Core::Filehuttongrabiel
As per the FIXME.
2022-08-23PixelPaint: Use Sqrt1_2 constant in EllipseTool instead of 1/1.41Hendiadyoin1
This also demotes the constant to floats instead of doubles, because we truncate it to int anyways and don't need the extra accuracy.
2022-08-23Ports/SDL2_ttf: Update to 2.20.1Tim Schumacher
2022-08-23Ports/SDL2_net: Update to 2.2.0Tim Schumacher
2022-08-23Ports/SDL2_mixer: Update to 2.6.2Tim Schumacher
2022-08-23Ports/SDL2_image: Update to 2.6.2Tim Schumacher
2022-08-23Ports/SDL2: Update to 2.24.0Tim Schumacher
2022-08-23Ports/SDL2: Do an out-of-tree buildTim Schumacher
SDL 2.24.0 starts having include loops if we try to do an in-tree build against its wishes, so let's not do that anymore.
2022-08-23Ports: Add aclock portSeal Sealy
2022-08-23Base: Add five new emojisdjwisdom
⚡ - U+26A1 HIGH VOLTAGE ⚪ - U+26AA WHITE CIRCLE ⚫ - U+26AB BLACK CIRCLE ⚾ - U+26BE BASEBALL ✉ - U+2709 ENVELOPE Coverage: https://emoji.serenityos.net
2022-08-23Base: Add 5 new emojisRyan Liptak
🌡 - U+1F321 THERMOMETER 🌞 - U+1F31E SUN WITH FACE ⛅ - U+26C5 SUN BEHIND CLOUD ⛈ - U+26C8 CLOUD WITH LIGHTNING AND RAIN 🌪 - U+1F32A TORNADO
2022-08-23LibWeb: Remove done TODO and fix typoMacDue
2022-08-23LibWeb: Avoid infinite loops in background paintingMacDue
Previously if `background-size` was 0px in any dimension we would go into in infinite loop whilst painting.
2022-08-23CI: Install newer Bash via homebrew on macOSLinus Groh
The recently added generate-emoji-txt.sh script uses a Bash 4 substitution feature, causing CI to fail as macOS ships an ancient Bash 3.x. We'll want to use a more recent version anyway, so let's do that instead of updading the script to older syntax.
2022-08-23LibGUI: Call on_segment_change handler from on_{click,focus_change}networkException
The on_segment_change handler introduced in a00fa793b37550a8b44122192346eeeb1d692bf9 was only getting called by programmatically setting the segment, not by clicking a button or using tab navigation.
2022-08-23LibGUI: Don't call on_segment_change handler if the index did not changenetworkException
This patch makes the handler's behavior closer to what can be expected from it's name by not handling set_selected_segment if the segment is already selected.
2022-08-23Kernel: Fix boot profilingSamuel Bowman
Boot profiling was previously broken due to init_stage2() passing the event mask to sys$profiling_enable() via kernel pointer, but a user pointer is expected. To fix this, I added Process::profiling_enable() as an alternative to Process::sys$profiling_enable which takes a u64 rather than a Userspace<u64 const*>. It's a bit of a hack, but it works.
2022-08-23Base: Add More Emojiselectrikmilk
This adds 16 emojis, and improves the emoji for Wine Glass.
2022-08-23Base: Add more emojiXexxa
🫶🏿 - U+1FAF6 U+1F3FF Heart Hands: Dark Skin Tone 🫶🏾 - U+1FAF6 U+1F3FE Heart Hands: Medium-Dark Skin Tone 🫶🏽 - U+1FAF6 U+1F3FD Heart Hands: Medium Skin Tone 🫶🏼 - U+1FAF6 U+1F3FC Heart Hands: Medium-Light Skin Tone 🫶🏻 - U+1FAF6 U+1F3FB Heart Hands: Light Skin Tone
2022-08-23LibCore: Fix deadlock in SharedSingleProducerCircularQueuekleines Filmröllchen
This deadlock would incorrectly change the queue from almost empty to full on dequeue because someone else could empty the queue after we had checked its non-emptyness. The test would deadlock on this, which doesn't happen anymore.
2022-08-23Base: Add an example `linear-gradient` with double-position color stopsMacDue
2022-08-23LibWeb: Resolve double-position `linear-gradient()` color stopsMacDue
These just resolve to an extra color stop. Something like "red 10% 40%" is just shorthand for "red 10%, red 40%".
2022-08-23LibWeb: Don't regenerate linear gradient data unless size changesMacDue
This is an easy check to add and seems like it makes things a tiny bit smoother.
2022-08-23LibWeb: Add missing checks to LinearGradientStyleValue::equals()MacDue
2022-08-23LibWeb: Parse double-position `linear-gradient()` color stopsMacDue
The only accepted syntax for these seems to be <color> <length percentage> <length percentage>, no other order. But that's just gathered from looking at other browsers as though these are supported by all major browsers, they don't appear in the W3C spec.
2022-08-23Kernel: Remove unused Process::in_group()Anthony Iacono
2022-08-23Kernel/ProcFS: Silently ignore attempts to update ProcFS timestampsAndreas Kling
We have to override Inode::update_timestamps() for ProcFS inodes, otherwise we'll get the default behavior of erroring with ENOTIMPL.
2022-08-23Kernel/SysFS: Silently ignore attempts to update SysFS timestampsAndreas Kling
We have to override Inode::update_timestamps() for SysFS inodes, otherwise we'll get the default behavior of erroring with ENOTIMPL.
2022-08-22PixelPaint: Disambiguate layer vs image actions in their namesAndreas Kling
Instead of having "Flip Horizontally" in both the Image and Layer menus, we now have "Flip Image Horizontally" and "Flip Layer Horizontally". This same concept applied to other, similar actions.
2022-08-22PixelPaint: Add actions for flipping and rotating an individual layerAndreas Kling
2022-08-22PixelPaint: Relayout ImageEditor immediately when image rect changesAndreas Kling
This avoids a jarring effect where we'd "snap" the image into place upon the next resize event.
2022-08-22PixelPaint: Create undo items for more editing actionsAndreas Kling
2022-08-22PixelPaint: Restore image size from snapshotsAndreas Kling
This will make undoing a resize or rotate operation actually restore the size of the image as well.
2022-08-22ChessEngine: Don't throw away useful branches from last treeLucas CHOLLET
Computation from last turn might have produced some nodes that are still accurate. Keeping them should make the engine a bit smarter.
2022-08-22ChessEngine: Use reduced Board objects in MCTSTreeLucas CHOLLET
Monte-Carlo methods are known to intensively create nodes and in our case each leaf of the tree stores a board. However, for this use case, we don't need a full board object that also contains game information. This patch adds a `clone_cleared()` method that return a clone without game information and uses it when constructing the tree. It allows the ChessEngine much more possibility before getting out of memory.
2022-08-22ChessEngine: Limit MCTSTree expansionLucas CHOLLET
This method temperate the habit of Monte-Carlo based algorithms to repeatedly create new nodes. It was first implemented in `Efficient Selectivity and Backup Operators in Monte-Carlo Tree Search` by Rémi Coulom.
2022-08-22Kernel/x86: Protect the CR3->PD map with a spinlockAndreas Kling
This can be accessed from multiple CPUs at the same time, so relying on the interrupt flag is clearly insufficient.
2022-08-22Kernel: Stop taking MM lock while using regular quickmapsAndreas Kling
You're still required to disable interrupts though, as the mappings are per-CPU. This exposed the fact that our CR3 lookup map is insufficiently protected (but we'll address that in a separate commit.)
2022-08-22Kernel: Stop taking MM lock while using PD/PT quickmapsAndreas Kling
This is no longer required as these quickmaps are now per-CPU. :^)
2022-08-22Kernel: Make the page table quickmaps per-CPUAndreas Kling
While the "regular" quickmap (used to temporarily map a physical page at a known address for quick access) has been per-CPU for a while, we also have the PD (page directory) and PT (page table) quickmaps used by the memory management code to edit page tables. These have been global, which meant that SMP systems had to keep fighting over them. This patch makes *all* quickmaps per-CPU. We reserve virtual addresses for up to 64 CPUs worth of quickmaps for now. Note that all quickmaps are still protected by the MM lock, and we'll have to fix that too, before seeing any real throughput improvements.
2022-08-22Kernel: Make sys$utime() and sys$utimensat() not take the big lockAndreas Kling
2022-08-22Kernel: Update atime/ctime/mtime timestamps atomicallyAndreas Kling
Instead of having three separate APIs (one for each timestamp), there's now only Inode::update_timestamps() and it takes 3x optional timestamps. The non-empty timestamps are updated while holding the inode mutex, and the outside world no longer has to look at intermediate timestamp states.
2022-08-22Kernel: Make sys$mknod() not take the big lockAndreas Kling
2022-08-22Meta: Move downloading of emoji-test.txt to unicode_data.cmakeTimothy Flynn
The current emoji_txt.cmake does not handle download errors (which were a common source of issues in the build problems channel) or Unicode versioning. These are both handled by unicode_data.cmake. Move the download to unicode_data.cmake so that we can more easily handle next month's Unicode 15 release.
2022-08-22GamesSettings: Add a preview for the current card-game settings :^)Sam Atkins