Commit graph

31484 commits

Author SHA1 Message Date
davidot
733a70671b LibRegex: Disallow duplicate named capture groups in ECMA262 parser 2021-12-21 14:04:23 +01:00
davidot
be3b806487 LibJS: Parse assert clauses of in- and export statements
Based on proposal: https://tc39.es/proposal-import-assertions
Since imports are not supported yet this is not functional.
2021-12-21 14:04:23 +01:00
davidot
81312986fe LibJS: Disallow async generator functions called 'await' or 'yield' 2021-12-21 14:04:23 +01:00
davidot
c8e80690a7 LibJS: Don't treat yield after void as identifier in generator functions 2021-12-21 14:04:23 +01:00
davidot
a1308bfc60 LibJS: Make new lines in block comments reset line has token
Before this a closing html comment would not be treated as a comment if
directly following a block comment which was not the first token of its
first line.
2021-12-21 14:04:23 +01:00
davidot
45578f58dc LibJS: Allow super property lookup and new.target in static init blocks 2021-12-21 14:04:23 +01:00
Linus Groh
92672b1520 Meta: Add a fuzzer for the QOILoader 2021-12-21 13:27:27 +01:00
Linus Groh
67788641d3 LibWeb: Add a workaround to assign a proper mime type to QOI images 2021-12-21 13:27:27 +01:00
Linus Groh
0717e484f6 file: Add description & image details for image/x-qoi 2021-12-21 13:27:27 +01:00
Linus Groh
82dde0ad0d Base: Set ImageViewer as the launcher for .qoi files 2021-12-21 13:27:27 +01:00
Linus Groh
ae0d6ba72c LibCore: Add support for the image/x-qoi mime type
We can guess it both from the magic bytes 'qoif' or the file extension
'.qoi'. The mime type is made up, I don't think it has an official one
yet - using the 'x-' prefix should be fine though.
2021-12-21 13:27:27 +01:00
Linus Groh
0356ee95bc LibGfx: Add support for "The Quite OK Image Format" (QOI)
The spec had its first stable release today, so I figured we should
support it as well!
As usual, by using the regular LibGfx image decoder plugin architecture,
we immediately get support for it everywhere: ImageViewer, FileManager
thumbnails, PixelPaint, and (with a small change in the subsequent
commit) even the Browser :^)
2021-12-21 13:27:27 +01:00
kleines Filmröllchen
102e0af867 Base: Add documentation for abench
See #11311 :^)
2021-12-20 23:15:22 -08:00
Ali Mohammad Pur
ed9e7f1ad0 LibWasm: Tolerate modules with invalid sections and mark them as invalid
We should not crash, but rather just fail to verify them.
2021-12-21 05:03:44 +03:30
Ali Mohammad Pur
2db27be2df LibWasm: Make shown instruction names match the names in the spec 2021-12-21 05:03:44 +03:30
Ali Mohammad Pur
afa3d06ea6 LibWasm: Add a instruction_from_name getter 2021-12-21 05:03:44 +03:30
Ali Mohammad Pur
d471405caf LibWasm: Print the block type for structured arguments 2021-12-21 05:03:44 +03:30
Ali Mohammad Pur
76ed7f2b20 LibWasm: Fix silly typo in f32 reinterpret validation 2021-12-21 05:03:44 +03:30
Ali Mohammad Pur
fecbf0e03a LibWasm: Make blocks that take arguments actually work
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 05:03:44 +03:30
Ali Mohammad Pur
b5ca290605 LibWasm: Implement memory.init and passive mode data 2021-12-21 05:03:44 +03:30
Ali Mohammad Pur
aff2c59f37 Meta: Update my .mailmap entry to contain all the emails I use
For some reason, I've used 'Ali.mpfard' as opposed to 'ali.mpfard'.
This maps that email to my serenityos email :P
2021-12-21 05:03:44 +03:30
Andreas Kling
5911d1c880 LibCore: Fix Lagom build of Core::System::utime() 2021-12-21 01:28:59 +01:00
Andreas Kling
7f5d060450 LibCore: Add missing <utime.h> include to System.h 2021-12-21 01:27:51 +01:00
Andreas Kling
bcd49ad834 touch: Port to LibMain :^) 2021-12-20 22:16:05 +01:00
Andreas Kling
db766d0972 LibMain: Print serenity_main() errors to the debug log
And let's make them red too, to help us notice them. :^)
2021-12-20 22:16:05 +01:00
Andreas Kling
bd8f10db80 LibCore: Add syscall wrapper for utime() 2021-12-20 22:16:05 +01:00
Andreas Kling
186de9fe4d LibGUI: Make GUI::try_create_default_icon() tolerate single-size icons
Some icons only exist in 16x16 and we should still allow them to be
loaded via the LibGUI default icon system.

This patch also reimplements GUI::default_icon() as a MUST() wrapper
around try_create_default_icon().
2021-12-20 21:13:42 +01:00
Andreas Kling
452a5531be AK+LibMain: Improve formatter for AK::Error in userspace
Print the full associated string metadata by default (if available.)
2021-12-20 21:13:42 +01:00
Liav A
8877dd0eea Base: Update boot_parameters(7) to describe the enable_ioapic option
The document describes the implications of enabling and disabling that
option on the ability to enable SMP mode, and describes the requirements
for enabling IOAPIC mode even without enabling SMP mode.
2021-12-20 11:00:31 -08:00
Liav A
30659040ed Kernel: Ensure SMP mode is not enabled if IOAPIC mode is disabled
We need to use the IOAPIC in SMP mode, so if the user requested to
disable it, we can't enable SMP mode either.
2021-12-20 11:00:31 -08:00
Sam Atkins
f11fbb6415 Base: Add a man page for Help
This is largely copied from the `man` man page, since the same
information applies.
2021-12-20 10:58:41 -08:00
Sam Atkins
85a54261b3 Help: Include page names in the search
This fixes the problem before, where searching "Shell" would list
"Shell-vars" in the results, but searching "Shell-vars" would make it
disappear.

Also removed some now-unnecessary includes.
2021-12-20 10:58:41 -08:00
Sam Atkins
8461f8c1cd Help: Add support for launching with a section and page, like man
I found it strange that `man` and `Help` did not accept the same command
line arguments since they are so similar. So... now they do. :^)

This means you can now open for example the `tar` man page in Help with
`Help tar`, or `Help 1 tar` if you want to disambiguate between pages in
different sections.

If the result is not found, it falls back to the previous behavior,
treating the input as a search query.

Initially I had this written as two optional positional arguments, but
when told to parse `[optional int] [optional string]`, and then given a
string input, ArgsParser forwards it to the [optional int], which then
fails to parse. Ideally it would pass it to the second, [optional
string] arg instead, but that looks like a fairly big change to make to
ArgsParser's internals, and risk breaking things. Maybe this ugly hack
will be an incentive to fix it. :^)
2021-12-20 10:58:41 -08:00
Sam Atkins
4c91f736c7 Help: Move update_actions() code into open_page()
These two lambdas are always called together, in this order, so why not
make them one instead?

Also converted a couple of west-consts to east-const.
2021-12-20 10:58:41 -08:00
Sam Atkins
4bf2ef2a4c Help: Always show the welcome page on launch if nothing else is there
Previously, launching Help with a query like `Help tar` left the page
blank, which looks like something has gone wrong. Instead, let's show
the usual welcome page.
2021-12-20 10:58:41 -08:00
RasmusNylander
3b71e7b5ee Base: Add Danish keymap
Based on what characters Windows 10 wrote when a key was pressed.

This makes it a lot nicer to use a Danish keyboard :^)
2021-12-20 10:49:27 -08:00
Junior Rantila
5238308d6f Magnifier: Add timeline for easy checking of animations
This patch adds a 512 frame timeline to Magnifier and the ability to
step through it with the arrow keys.

This makes it easier to check Serenity animations frame by frame for
correctness etc.
2021-12-20 10:48:03 -08:00
Ben Reeves
58ec2f688b Ports/ncurses: Check for proper tic version during install
MacOS ships with an out of date ncurses that can't properly generate
terminfo from the newer source code. This change checks for a valid
`tic` executable of the proper version, first in PATH and then in
the Homebrew cellar if brew is installed. Otherwise it aborts
installation.

See comment in the code as well as the following for details:
https://github.com/termux/termux-packages/issues/4487#issuecomment-626277493
https://lists.gnu.org/archive/html/bug-ncurses/2019-07/msg00020.html.
2021-12-20 10:45:52 -08:00
Rafał Babiarz
196bd11743 Ports: Add libssh2 port 2021-12-20 10:43:47 -08:00
PerikiyoXD
bdc028da1c cp: Print proper error message with strerror
When cp fails, now it prints an error string (strerror)
instead of an error code.
2021-12-20 10:40:02 -08:00
Junior Rantila
105f741131 Piano: Make Key_Space shortcut to toggle playback 2021-12-20 10:39:37 -08:00
Lady Gegga
bb7f32376c Base: Add some Old South Arabian characters to font Katica Regular 10
10A60-10A7F https://www.unicode.org/charts/PDF/U10A60.pdf
2021-12-20 10:39:09 -08:00
Jelle Raaijmakers
4e3ed16527 LibGL: Only pass bound texture units to rasterizer
Before, `SoftwareRasterizer` was iterating over all 32 possible texture
units for each fragment and checking each if they're bound to a texture.

After this change, an intrusive list containing only texture units with
bound textures is passed to the rasterizer. In GLQuake, this results in
a performance improvement of ~30% (from 12 to 16 FPS in the first demo)
on my machine.
2021-12-20 10:36:53 -08:00
Jelle Raaijmakers
f201567153 LibGL: Use 8x8 block size in SoftwareRasterizer
This smaller block size allows us to use an `u8` for the pixel mask
during triangle rasterization. These changes result in better FPS in
3DFileViewer, which periodically shoots up to 250-300 FPS on my
machine. Before, the peaks were somewhere in the range of 160-170 FPS.
2021-12-20 10:36:53 -08:00
Liav A
5a649d0fd5 Kernel: Return EINVAL when specifying -1 for setuid and similar syscalls
For setreuid and setresuid syscalls, -1 means to set the current
uid/euid/gid/egid value, to be more convenient for programming.
However, for other syscalls where we pass only one argument, there's no
justification to specify -1.

This behavior is identical to how Linux handles the value -1, and is
influenced by the fact that the manual pages for the group of one
argument syscalls that handle ID operations is ambiguous about this
topic.
2021-12-20 11:32:16 +01:00
Rok Povsic
a3c732b8ae Profiler: Display tooltip when hovering over flamegraph bars 2021-12-20 11:31:47 +01:00
Rok Povsic
d3a80b1a6e Profiler: Extract the bar label String into a private method 2021-12-20 11:31:47 +01:00
Stephan Unverwerth
47a4737110 LibGL: Fix texture sampling texel coordinate calculation
Previously we multiplied the interpolated texture coordinates by
width - 1 and height - 1 instead of width and height which resulted in
some wrongly mapped textures, especially visible in the glquake light
maps.

This also corrects the wrap mode being wrongly swapped for s/t
coordinates.

Since we do not have texture borders implemented yet we always use
GL_CLAMP_TO_EDGE for all clamping wrap modes for the time being.
2021-12-19 18:39:26 -08:00
Junior Rantila
3d63e688f7 watch: Port to LibMain 2021-12-19 18:26:57 -08:00
Junior Rantila
4178479ee5 LibCore: Add wrapper for signal() 2021-12-19 18:26:57 -08:00