Andreas Kling
a166a65eff
Kernel: Don't return -EFOO when return type is KResultOr<...>
2021-03-15 09:09:04 +01:00
Cesar Torres
2b269b27e7
LibGUI: Fix crash when text_in_range() was called on an empty document
2021-03-15 09:08:15 +01:00
Cesar Torres
4f34a78337
TextEditor: Add charcount info about selected text to the statusbar
2021-03-15 09:08:15 +01:00
Tom Needham
daf2e5d335
Ports: Do not call ./package.sh from a subshell in ./build_all.sh
...
This patch ensures that ./package.sh is run in the same shell
This solves compiling issues when building certain ports.
This fix was suggested by linusg in
https://github.com/SerenityOS/serenity/issues/5783#issuecomment-798906817
2021-03-15 09:07:17 +01:00
Tom Needham
26d72d3048
Ports: Allow verbose argument in build_all.sh
...
This patch allows for a verbose argument to be passed
so that the build output of the individual builds
is printed to stdout instead of /dev/null to help with diagnosing errors
If the verbose argument is not passed the old behaviour is preserved
and the build output is printed to /dev/null
2021-03-15 09:07:17 +01:00
Liav A
3c35ea30cc
Kernel: Return 0 to indicate EOF when reading from end-of-file of device
...
If we happen to read with offset that is after the end of file of a
device, return 0 to indicate EOF. If we return a negative value,
userspace will think that something bad happened when it's really not
the case.
2021-03-15 09:06:41 +01:00
Tom
5ccc3637e3
Kernel: Fix race conditions processing async device requests
2021-03-15 09:06:41 +01:00
Tom
8177f2474b
Kernel: Fix race condition completing IDEChannel async request
2021-03-15 09:06:41 +01:00
Liav A
a66c9fc593
Kernel: When writing to device node, use can_write for checking
...
Instead of can_read which is wrong, use can_write.
2021-03-15 09:06:41 +01:00
AnotherTest
125be2923c
Shell: Consume the username when parsing '~user'
...
Otherwise it will stay there and be parsed as a juxtaposition.
Fixes #5798 .
2021-03-15 09:06:21 +01:00
Linus Groh
f59d58cb76
LibELF+LibTest: Fix serenity_install_sources() paths
...
Currently we end up with the following:
serenity/
AK/
...
Kernel/
...
Libraries/
LibELF/
LibTest/
Userland/
Libraries/
<all other libs>
...
2021-03-15 09:06:10 +01:00
Magnus Alvestad
a3b03eef01
Keymap: Added no-latin1.json for Norwegian pc105 keyboards ( #5794 )
2021-03-15 08:48:26 +01:00
Mițca Dumitru
32b9437c13
LibM: Add remainder{f, l}
...
These just forward their arguments to fmod, but I think that should be
fine.
2021-03-14 21:43:08 +01:00
Mițca Dumitru
e4197b7854
LibM: Define HUGE_VAL{F,L} in terms of compiler builtins
2021-03-14 21:43:08 +01:00
Mițca Dumitru
e9533da0e7
LibM: Define MAXFLOAT
...
Looks like a POSIX extension
2021-03-14 21:43:08 +01:00
Mițca Dumitru
86ee9211be
LibM: Define FLT_EVAL_METHOD, float_t and double_t
2021-03-14 21:43:08 +01:00
Mițca Dumitru
1f1a4f488f
LibM: Declare ldexpl in math.h
...
It was already defined, but it wasn't declared in the header
2021-03-14 21:43:08 +01:00
Mițca Dumitru
93c554f6bd
LibM: Add the gamma family of functions
2021-03-14 21:43:08 +01:00
Mițca Dumitru
7aac174bc8
LibM: Organise math.h so it is less of a wall of functions
...
The categories are the same categories used by cppreference on its page
for numeric functions.
2021-03-14 21:43:08 +01:00
Mițca Dumitru
c9601cdee3
LibM: Implement the missing parts of the round family
2021-03-14 21:43:08 +01:00
Mițca Dumitru
03b2d30836
LibM: Add missing float and long double function variants
2021-03-14 21:43:08 +01:00
Brendan Coles
eecaa3bed6
test-compress: Initialize byte buffer with random data
2021-03-14 21:37:29 +01:00
Brendan Coles
81cbb2676e
readelf: Tweak section headers output column padding
2021-03-14 21:36:54 +01:00
Brendan Coles
1eccd78e3a
UserspaceEmulator: Add SC_rmdir syscall
2021-03-14 21:36:36 +01:00
Linus Groh
202f855055
LibJS: Change non-ScriptFunction source string to "[native code]"
...
https://tc39.es/ecma262/#sec-function.prototype.tostring - this is how
the spec wants us to do it. :^)
Also change the function name behaviour to only provide a name for
NativeFunctions, which matches other engines - presumably to not expose
Proxy objects, and to prevent "function bound foo() { [native code] }".
2021-03-14 19:22:16 +01:00
Linus Groh
f9287fca1e
LibJS: Don't try to derive function source from ProxyObject
...
There are three JS::Function types that are not ScriptFunction:
NativeFunction, BoundFunction and ProxyObject. We were only checking for
the first two when determining whether to reconstruct the function's
source code, which was leading to a bad cast to ScriptFunction.
Since only ScriptFunction has the [[SourceText]] internal slot, I simply
swapped the branches here.
Fixes #5775 .
2021-03-14 19:22:16 +01:00
Idan Horowitz
02b4cb96f8
LibCompress: Decrease CanonicalCode's size on stack
...
This commit stores the bit codes as u16s instead of u32s as the
maximum code bit length in DEFLATE is 15.
2021-03-14 14:52:21 +01:00
Brendan Coles
ab9f66a069
UserspaceEmulator: Increase stack size from 64 * KiB to 1 * MiB
2021-03-14 13:55:29 +01:00
Brendan Coles
6bc01909b7
readelf: Add support for core notes and relocations
2021-03-14 13:55:07 +01:00
Linus Groh
304e193836
LibJS: Fix some issues in RegExp.prototype[@@match]
...
- We were not passing the to_string()'d argument to the exec function
but the original argument
- We were leaking an empty value in two cases, which almost certainly
will crash something down the line
- We were not checking for exceptions after to_string() and get(), which
both may throw. If the getter is an accessor, it'll assert upon being
called with the VM already storing an exception.
2021-03-14 12:24:57 +01:00
Linus Groh
b68509569e
LibJS: Fix String.prototype.match() for non-string argument
...
This is supposed to pass the to_string()'d argument to @@match, not the
this value.
2021-03-14 12:24:57 +01:00
Linus Groh
32052b3198
LibJS: Fix flags check in regexp_create()
...
We need to check for undefined, not empty - otherwise it will literally
use "undefined" as the flags, which will fail (Invalid RegExp flag 'n').
2021-03-14 12:24:57 +01:00
Linus Groh
6d2d8d091f
LibJS: Add the same Object::invoke() overloads as VM::call()
2021-03-14 12:24:57 +01:00
Ben Wiederhake
6cf8e3c980
Ports: Make gnuplot build fail later
2021-03-14 11:30:38 +01:00
Ben Wiederhake
430e7fb181
LibC: Rename feclearexcept{s,}
...
This will also help with making ports compile again :D
https://github.com/SerenityOS/serenity/pull/5762#issuecomment-798779561
2021-03-14 11:30:38 +01:00
Ben Wiederhake
60b458f5b3
Ports: Fix 'bc' port
...
Previously, these features were apparently auto-disabled, because we do not yet
support and never did support translations or the FIONREAD ioctl.
2021-03-14 11:30:38 +01:00
Ben Wiederhake
071b31338a
Ports: Remove ever-broken 'editline' build
...
I'm sorry @The-King-of-Toasters, but it never worked and apparently noone uses/fixes it,
so let's remove it? Alternatively, see discussion in #2677 .
2021-03-14 11:30:38 +01:00
Ben Wiederhake
4100aa52d9
Ports: Fix cross-compiling git for serenity
...
No idea how this is supposed to work, because git's buildscripts execute
'uname -S' to determine which functions are available - and that's not how
cross-compilation works.
2021-03-14 11:30:38 +01:00
Ben Wiederhake
e23fc195e7
Ports: Fix package.sh executable bits
2021-03-14 11:30:38 +01:00
Luke
c983e42e8c
Lagom/Fuzzers: Add fuzzers for the new Gzip and Deflate compressors
2021-03-14 11:28:12 +01:00
Luke
d27e6f0961
Lagom/Fuzzers: Add fuzzers for Latin 1, Latin 2 and UTF16-BE
...
No fuzzer for UTF-8 as it (currently) just returns the input.
2021-03-14 11:27:52 +01:00
Luke
7427e3a8a6
LibTextCodec: Fix IBM666 => IBM866 typo
2021-03-14 11:27:52 +01:00
Idan Horowitz
7e587a615e
LibCompress: Handle literal only lz77 streams in DeflateCompressor
...
Very incompressible data could sometimes produce no backreferences
which would result in no distance huffman code being created (as it
was not needed), so VERIFY the code exists only if it is actually
needed for writing the stream.
2021-03-14 11:05:35 +01:00
Andreas Kling
1db943e146
LibJS: Implement (mostly) String.prototype.match
...
JavaScript has a couple of different ways to run a regular expression
on a string. This adds support for one more. :^)
2021-03-14 11:04:50 +01:00
Brendan Coles
2c24c0e451
UserspaceEmulator: SoftCPU: Add support for FPTAN instruction
2021-03-14 09:45:22 +01:00
Idan Horowitz
b1e3176f9f
LibCompress: Replace goto with simple recursion in DeflateCompressor
...
This is just a bit easier on the eyes :^)
2021-03-13 23:50:07 +01:00
Idan Horowitz
1b7b503bae
AK: Add fast paths for aligned bit writes in BitOutputStream
...
If the bit write is aligned (or has been aligned during the write) we can
write in multiples of 32/16/8 bits for increased performance.
2021-03-13 23:50:07 +01:00
Idan Horowitz
3c7aa56ae8
AK: Store BinaryHeap key-value pairs together for efficient swaps
...
The 2 seperate key and value arrays are replaced with a single struct pair
array that allows for a 2x reduction in loads/stores during element swaps
in the common case of same-sized keys and values.
2021-03-13 23:50:07 +01:00
Linus Groh
161b36bb09
Ports: Update c-ray patches
2021-03-13 22:44:16 +01:00
Linus Groh
caa8f3d3bf
LibM: Implement tanf() in terms of tan() with casts
...
Lazy, but it works for now. :^)
2021-03-13 22:44:16 +01:00