Commit Graph

23999 Commits

Author SHA1 Message Date
Timothy Flynn
cfddcad7cf LibJS: Implement the RegExpStringIterator object
This implementation closely follows the StringIterator object in that
the abstract closure meant to be created in CreateRegExpStringIterator
is instead unrolled into RegExpStringIterator.prototype.next.
2021-07-16 13:53:11 +01:00
Timothy Flynn
6cf64d0f09 LibJS: Make the RegExpExec abstraction publically available
For RegExpStringIterator, this will be needed outside of the RegExp
prototype.
2021-07-16 13:53:11 +01:00
Gunnar Beutner
c7265ee6bd Assistant: Keep the Terminal window open after the command has run 2021-07-16 13:05:55 +02:00
ry-sev
2634cab7a8 HackStudio: Add statusbar with file and selected text information 2021-07-16 12:58:20 +02:00
Max Wipfli
e22a34badb LibWeb: Fix assertion failures in HTMLTokenizer
The *TagName states are all very similar, so it seems to be correct to
apply the fix from #8761 to all of those states.

This fixes #8788.
2021-07-16 11:55:55 +02:00
Peter Bindels
ca9c53c1a8
LibELF/DynamicLinker: Evaluate symbols in library insertion order (#8802)
When loading libraries, it is required that each library uses the same
instance of each symbol, and that they use the one from the executable
if any. This is barely noticeable if done incorrectly; except that it
completely breaks RTTI on Clang. This switches the hash map to be
ordered; tested to work for Clang by @Bertaland
2021-07-16 11:55:01 +02:00
Timothy
5f3e6085a2 AK/Tests: Add test for EnumBits has_any_flag()
This test will pass when any flag in the mask is present in the value.
2021-07-16 11:49:50 +02:00
Timothy
9715311837 AK+Kernel: Implement and use EnumBits has_any_flag()
This duplicates the old functionality of has_flag and will return true
when any flags present in the mask are also in the value.
2021-07-16 11:49:50 +02:00
Timothy
371911b1b5 AK/Tests: Add test for EnumBits has_flag()
This test requires that all values in the mask are present in the value
as well.
2021-07-16 11:49:50 +02:00
Timothy
03b76e4ba0 AK: Change EnumBits has_flag() to check all flags in mask are present
Co-authored-by: Brian Gianforcaro <b.gianfo@gmail.com>
2021-07-16 11:49:50 +02:00
Luke
2df4d977e2 Kernel: Return ENOMEM on allocation failures in FramebufferDevice::mmap 2021-07-16 11:15:30 +02:00
Andreas Kling
41c0009f6d Kernel/Ext2FS: Don't hog inode lock in traverse_as_directory()
Reimplement directory traversal in terms of read_bytes() instead of
doing direct block access. This lets us avoid taking the inode lock
while iterating over the directory contents.
2021-07-16 02:40:53 +02:00
Andreas Kling
abbd237ec1 Kernel/Ext2FS: Don't hog FS lock when calling base class flush_writes()
Once we've finalized all the file system metadata in flush_writes(),
we no longer need to hold the file system lock during the call to
BlockBasedFileSystem::flush_writes().
2021-07-16 02:40:53 +02:00
Andreas Kling
98c230b370 Kernel/Ext2FS: Uncache unknown inode indices when flushing writes
Ext2FS::get_inode() will remember unknown inode indices that it has
been asked about and put them into the inode cache as null inodes.

flush_writes() was not null-checking these while iterating, which
was a bug I finally managed to hit.

Flushing also seemed like a good time to drop unknown inodes from
the cache, since there's no good reason to hold to them indefinitely.
2021-07-16 02:40:53 +02:00
Andreas Kling
a7d193951f Kernel: Don't hog file system lock when doing BlockBasedFileSystem I/O
The file system lock is meant to protect the file system metadata
(super blocks, bitmaps, etc.) Not protect processes from reading
independent parts of the disk at once.

This patch introduces a new lock to protect the *block cache* instead,
which is the real thing that needs synchronization.
2021-07-16 02:40:53 +02:00
Andreas Kling
abf0249f35 Kernel: Don't explicitly seek before I/O in BlockBasedFileSystem
Use the new FileDescription APIs to avoid doing seek+read or seek+write
as two separate operations.
2021-07-16 02:40:53 +02:00
Andreas Kling
d1395f2eb9 Kernel: Add FileDescription read/write API that bypasses current offset
Forcing users of a FileDescription to seek before they can read/write
makes it inherently racy. This patch adds variants of read/write that
simply ignore the "current offset" of the description in favor of a
caller-supplied offset.
2021-07-16 02:40:53 +02:00
Andreas Kling
ace8b9a0ee Kernel/Ext2FS: Don't hog both locks in Ext2FSInode::lookup()
This function was acquiring both the inode and file system locks (in
that order) which could lead to deadlocks.
2021-07-16 02:40:53 +02:00
Linus Groh
9d7e391f94 LibJS/Tests: Add test for Temporal.Instant.prototype.valueOf() 2021-07-16 01:07:01 +01:00
Linus Groh
173630c5ef js: Implement pretty-printing of Temporal.Duration objects 2021-07-16 01:07:01 +01:00
Linus Groh
8daf35e1b1 LibJS: Implement Temporal.Duration.prototype.valueOf() 2021-07-16 01:07:01 +01:00
Linus Groh
a06b034a9a LibJS: Implement Temporal.Duration.prototype.blank 2021-07-16 01:07:01 +01:00
Linus Groh
3713164fa3 LibJS: Implement Temporal.Duration.prototype.sign 2021-07-16 01:07:01 +01:00
Linus Groh
be5254dcac LibJS: Implement Temporal.Duration.prototype.nanoseconds 2021-07-16 01:07:01 +01:00
Linus Groh
04e2d215a1 LibJS: Implement Temporal.Duration.prototype.microseconds 2021-07-16 01:07:01 +01:00
Linus Groh
db22f86055 LibJS: Implement Temporal.Duration.prototype.milliseconds 2021-07-16 01:07:01 +01:00
Linus Groh
b81331a110 LibJS: Implement Temporal.Duration.prototype.seconds 2021-07-16 01:07:01 +01:00
Linus Groh
dbdbfbeebc LibJS: Implement Temporal.Duration.prototype.minutes 2021-07-16 01:07:01 +01:00
Linus Groh
067c2346ed LibJS: Implement Temporal.Duration.prototype.hours 2021-07-16 01:07:01 +01:00
Linus Groh
2015640168 LibJS: Implement Temporal.Duration.prototype.days 2021-07-16 01:07:01 +01:00
Linus Groh
23d0c3494f LibJS: Implement Temporal.Duration.prototype.weeks 2021-07-16 01:07:01 +01:00
Linus Groh
8011409428 LibJS: Implement Temporal.Duration.prototype.months 2021-07-16 01:07:01 +01:00
Linus Groh
300a22f9b9 LibJS: Implement Temporal.Duration.prototype.years 2021-07-16 01:07:01 +01:00
Linus Groh
23766f28db LibJS: Implement Temporal.Duration.prototype[@@toStringTag] 2021-07-16 01:07:01 +01:00
Linus Groh
7921d8ba91 LibJS: Start implementing Temporal.Duration
This patch adds the Duration object itself, its constructor and
prototype (currently empty), and three required abstract operations.
2021-07-16 01:07:01 +01:00
Ali Mohammad Pur
71234b3716 Utilities: Make the js REPL autocomplete correctly handle new Ident
Previously, `new` was being recognised as an identifier, which was
preventing this from working.
2021-07-16 02:36:53 +04:30
Gunnar Beutner
d83c672926 LibC: Don't include AK headers in system headers
AK/Platform.h might not be available when building the toolchain.
2021-07-15 23:51:59 +02:00
Tom
82e9fe8d67 Kernel: Optionally dump scheduler state with stack traces
This will dump stack traces of all threads when pressing
Ctrl+Shift+Alt+F12
2021-07-15 23:46:37 +02:00
Jamie Mansfield
0150ae4bbd Solitaire: Reduce overdraw when drawing initial cards 2021-07-15 21:47:36 +02:00
Jamie Mansfield
882b4dc848 Spider: Reduce overdraw when playing 2021-07-15 20:11:22 +02:00
Jamie Mansfield
0f9873475b Spider: Reduce overdraw when drawing initial cards 2021-07-15 20:11:22 +02:00
Jamie Mansfield
c0bc884295 Spider: Automatically reveal top cards
This matches basically all other Spider implementations I've played,
and makes playing much easier :)

I have left click-to-reveal in place, but mostly incase there is a
condition I've forgotten about.
2021-07-15 19:52:14 +02:00
Tom
1021aba226 LibGUI: Dither pattern should be independent from clipping rectangle
The dither pattern needs to be determined relative to the bitmap
itself, not the clipping rectangle.

Fixes #8780
2021-07-15 19:46:42 +02:00
Dhruv Maroo
30af999431
Utilities: Allow filenames containing '=' in dd (#8766) 2021-07-15 18:36:46 +04:30
Karol Kosek
e46a4181fa Help: Add context menu 2021-07-15 14:42:48 +02:00
Gavin Downard
bd4e88ae3d PixelPaint: Fix crash when copying empty selection
Previously, trying to copy when there is no selection would crash,
trying to call mmap with a size of 0. Now it just leaves the clipboard
as it is.
2021-07-15 13:25:39 +02:00
Gunnar Beutner
56cbd00e94 SpiceAgent: Add Clipboard as a build dependency
SpiceAgent depends on header files built as part of the Clipboard
target.
2021-07-15 11:51:16 +02:00
M4x1m3
39e622c400 Utilities: Add groupdel 2021-07-15 11:16:58 +02:00
M4x1m3
21cb531be1 Utilities: Add groupadd 2021-07-15 11:16:58 +02:00
M4x1m3
927f6ea221 LibC: Add putgrent 2021-07-15 11:16:58 +02:00