Commit graph

31460 commits

Author SHA1 Message Date
Ali Mohammad Pur
e717ca32d1 LibC: Implement ungetwc() 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
14b91a3fe9 LibC: Stub out some wscanf variants 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
f0709c7a24 LibC+AK: Implement all sorts of wprintf variants 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
db7a6d6e74 LibC: Implement f{get,put}ws() 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
bd9a22e7e7 LibC: Stub out fwide()
This is a mess, and I'd rather not perform checks on every single stdio
operation, so just make it a noop.
2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
cb90856756 LibC: Implement {f,}putwc() 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
a4e8a09188 LibC: Implement getwchar() 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
cf17677206 LibC: Implement {f,}getwc() 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
3b281baf75 LibC: Implement wcs{,c}spn() 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
4f8d095f5a LibC: Sort the SOURCES entries in CMakeLists.txt 2021-12-21 21:24:36 +03:30
Ali Mohammad Pur
cacc3ee857 LibC: Switch to using east const in wchar.cpp 2021-12-21 21:24:36 +03:30
Linus Groh
a00a3fa1ef LibGfx: Remove 'QOIImageDecoderPlugin: ' prefix from error messages
What the component which did the actual decoding is called is not
relevant for the error, and would be rather distracting once we show
decoding error messages e.g. in ImageViewer (instead of just silently
failing).
Also makes them more consistent as many already don't include it - a
mistake which is now turned into a feature :^)
2021-12-21 17:37:10 +01:00
Luke Wilde
6d5531112f LibJS: Add TypedArray.prototype.@@iterator 2021-12-21 15:40:41 +01:00
Timothy Flynn
4fe47ed86e LibJS: Update spec link for InstallErrorCause AO 2021-12-21 14:56:28 +01:00
Timothy Flynn
d69f5ca128 LibJS: Update spec numbers for Operations on Objects AOs
The error cause proposal was merged, so some spec numbers were bumped.
2021-12-21 14:56:28 +01:00
Timothy Flynn
968f6e2432 LibJS: Define RegExp.prototype methods in spec order 2021-12-21 14:56:00 +01:00
Timothy Flynn
7ea85ed10b LibJS: Add spec comments to RegExp.prototype AOs
This also replaces an instance of TRY with MUST as the spec indicates
that step 35b of RegExpBuiltinExec cannot throw. Further, this moves
some lines of code around to align with the spec as best as we can,
though the end effect is the same.
2021-12-21 14:56:00 +01:00
Timothy Flynn
179ca9d058 LibJS: Add spec comments to RegExp.prototype.[flags, source, exec, test] 2021-12-21 14:56:00 +01:00
Timothy Flynn
4a915fc9fa LibJS: Add spec comments to RegExp.prototype.compile 2021-12-21 14:56:00 +01:00
Timothy Flynn
c6e2b03073 LibJS: Add spec comments to RegExp.prototype [ @@split ]
In doing so, this caught another erroneous ToObject invocation.
2021-12-21 14:56:00 +01:00
Timothy Flynn
cb901f70af LibJS: Add spec comments to RegExp.prototype [ @@search ] 2021-12-21 14:56:00 +01:00
Timothy Flynn
25b6e79238 LibJS: Add spec comments to RegExp.prototype [ @@replace ]
In doing so, this caught an erroneous ToObject invocation. In the one
spot that requires the value to be an object (the invocation to
LengthOfArrayLike), we know by then the value is an object because all
other possibilities have been handled.
2021-12-21 14:56:00 +01:00
Timothy Flynn
9f7c3e6cad LibJS: Add spec comments to RegExp.prototype [ @@matchAll ] 2021-12-21 14:56:00 +01:00
Timothy Flynn
5eb4d2e96e LibJS: Add spec comments to RegExp.prototype [ @@match ]
In doing so, this fixes a few minor issues:

1. We were accessing the "unicode" and "lastIndex" properties out of
   order. This is somewhat frequently tested by test262, but not in
   this case.

2. We were doing a Value::to_object() followed by Object::get(), rather
   than just Value::get() as the spec dictates.

3. We were TRYing a step (CreateDataPropertyOrThrow) that should never
   fail, and should have been a MUST.
2021-12-21 14:56:00 +01:00
Timothy Flynn
26294a2d27 LibJS: Convert a RegExp throw_exception to throw_completion
RegExpExec already returns a ThrowCompletionOr so this potentional error
should be a completion. RegExp.prototype [ @@replace ] is tripped up by
this mistake when implemented closer to the spec.
2021-12-21 14:56:00 +01:00
davidot
154ed3994c LibRegex: Parse capture group names according to the ECMA262 spec 2021-12-21 14:04:23 +01:00
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