Max Wipfli
1e8006ebb8
AK: Add children() accessor to Trie
2021-06-08 12:15:04 +02:00
Max Wipfli
e8a317023d
Kernel: Allow unveiling subfolders regardless of parent's permissions
...
This fixes a bug where unveiling a subdirectory of an already unveiled
path would sometimes be allowed and sometimes not (depending on what
other unveil calls have been made).
Now, it is always allowed to unveil a subdirectory of an already
unveiled directory, even if it has higher permissions.
This removes the need for the permissions_inherited_from_root flag in
UnveilMetadata, so it has been removed.
2021-06-08 12:15:04 +02:00
Max Wipfli
9d41dd2ed0
Kernel: Use LexicalPath to avoid two consecutive slashes in unveil path
...
This patch fixes a bug in the unveil syscall where an UnveilNode's path
would start with two slashes if it's parent node was "/".
2021-06-08 12:15:04 +02:00
Linus Groh
68ce69db88
LibJS: Add for loop bytecode generation
2021-06-08 11:59:32 +02:00
Gunnar Beutner
50ece3dd1b
LibJS: Implement bytecode generation for BigInts
2021-06-08 10:57:28 +01:00
Gunnar Beutner
0975e08285
LibJS: Make if yield undefined for the else branch if it is missing
2021-06-08 11:38:48 +02:00
Gunnar Beutner
d9989fd259
LibJS: Remove redundant jump for IfStatements
2021-06-08 11:38:48 +02:00
Gunnar Beutner
ef83872f62
LibJS: Make JumpIf{True,False,Nullish} inherit from Jump
...
This saves a few lines in LogicalExpression::generate_bytecode.
2021-06-08 11:38:48 +02:00
Jelle Raaijmakers
afbbcde150
Utilities: Make xargs
stop parsing options on first non-option
2021-06-08 11:30:58 +02:00
Jelle Raaijmakers
3c7ddf383a
Utilities: Make watch
stop parsing options on first non-option
2021-06-08 11:30:58 +02:00
Jelle Raaijmakers
fb6d141601
Utilities: Make strace
stop parsing options on first non-option
2021-06-08 11:30:58 +02:00
Jelle Raaijmakers
00fc0a6cf0
Shell: Make time
stop parsing options on first non-option
2021-06-08 11:30:58 +02:00
Jelle Raaijmakers
a32fe8df33
UserspaceEmulator: Stop parsing options on first non-option
2021-06-08 11:30:58 +02:00
Jelle Raaijmakers
001c81b1be
Userland: Let env
parse options up to first non-option
2021-06-08 11:30:58 +02:00
Jelle Raaijmakers
d7126fbbc2
LibCore/ArgsParser: Learn how to stop on first non-option
...
We need this for utilities like `env`, that do not gain anything by
parsing the options passed to the command they are supposed to
execute.
2021-06-08 11:30:58 +02:00
Jelle Raaijmakers
0b0bce78f6
LibCore/ArgsParser: Add test suite
...
This adds a very basic test suite for ArgsParser that we can use to set
a baseline of functionality that we want to make sure keeps working.
2021-06-08 11:30:58 +02:00
Jelle Raaijmakers
d6a3f1fcd7
Kernel: Simplify execve
shebang argument handling
2021-06-08 11:30:58 +02:00
Jelle Raaijmakers
250f8eccf3
LibCore: Support fine-grained failure behavior for ArgsParser
2021-06-08 11:30:58 +02:00
Luke
1dc31842cb
LibJS: Add sequence expression bytecode generation
2021-06-08 11:20:10 +02:00
Max Wipfli
cac94b1c16
Kernel: Implement InodeFile::stat() and simplify FileDescription::stat()
2021-06-08 11:12:31 +02:00
Andreas Kling
675b0aee24
Websites: Some updates for the serenityos.org front page
...
- Add link to the Discord server
- Remove reference to Freenode IRC channel since it's no longer used
- Add sponsorship links for Linus :^)
2021-06-08 10:56:52 +02:00
Luke
de3ee701ce
LibJS: Add conditional expression bytecode generation
...
Or, by its more common name, the ternary operator :^)
2021-06-08 09:53:56 +01:00
Gunnar Beutner
6da587b59b
LibJS: Implement bytecode ops for logical expressions
2021-06-08 10:42:45 +02:00
Gunnar Beutner
216d27d4c1
LibJS: Convert values to boolean for JumpIfTrue/JumpIfFalse
...
Value::as_bool() might fail if the underlying value isn't already a
boolean value.
2021-06-08 10:42:45 +02:00
Idan Horowitz
aefb7995f1
LibJS: Add the Symbol.species getter to the appropriate built-ins
2021-06-08 09:09:51 +01:00
Linus Groh
39c3aefe5d
LibJS: Use to_property_key() a bunch in ReflectObject
...
Yay for correctness. :^)
2021-06-07 23:11:08 +01:00
Linus Groh
7565bf0590
LibJS: Remove redundant exception checks
2021-06-07 23:09:06 +01:00
Linus Groh
3fdad563e2
LibJS: Never omit setter/getter attributes in accessor descriptor object
...
These should not be omitted, an accessor with out getter or setter still
yields an undefined for the attribute in its descriptor object.
2021-06-07 23:07:13 +01:00
Linus Groh
8c964ef9f8
LibJS: Fix get_own_property_descriptor_object() field name order
...
This is defined by the spec: enumerable and configurable come last.
2021-06-07 23:02:52 +01:00
Linus Groh
4e555fae22
LibJS: Add missing cyclic prototype check to Object.setPrototypeOf()
2021-06-07 22:56:16 +01:00
Andreas Kling
ebb40e7d7b
LibJS: Use macros to generate the common unary/binary bytecode ops
2021-06-07 23:20:48 +02:00
Jelle Raaijmakers
3067ee9c4c
Toolchain: Add gettext
as a dependency to Dockerfile
...
We need `msgfmt` inside of the `gettext` package in order to build the
git port.
2021-06-07 22:46:53 +02:00
Jelle Raaijmakers
774fb4dede
Ports: Make curl
detect our OpenSSL port
...
Without a proper prefix, the `configure` script will probably pick up
the host's OpenSSL library. This change makes sure the script always
looks at the library present in the Serenity build dir.
2021-06-07 22:43:43 +02:00
Nick Miller
17c78be334
SoundPlayer: Enable stop button when play button clicked
...
Previously, if you play a file, then stop, then play again, the stop
button will be permanently disabled until you open a file again.
The stop button should be enabled whenever a file is loaded.
This commit fixes the GUI bug by enabling the stop button whenever the
play button is clicked (if a file is currently loaded).
2021-06-08 00:54:07 +04:30
Linus Groh
e0a2c1544f
LibJS: Fix whitespace errors in ASTCodegen.cpp
2021-06-07 21:19:12 +01:00
Linus Groh
9c0d83d11d
LibJS: Add bytecode generation for BinaryOp::InstanceOf
2021-06-07 21:18:35 +01:00
Linus Groh
5e996de8c6
LibJS: Add bytecode generation for BinaryOp::In
2021-06-07 21:18:35 +01:00
Gunnar Beutner
93eae063a1
LibJS: Make sure that if expressions yield the correct value
...
When evaluated as an expression "if (true) { 3 } else { 5 }"
should yield 3. This updates the bytecode interpreter to make
it so.
2021-06-07 22:10:57 +02:00
Gunnar Beutner
2c10bd72f2
LibJS: Make sure scope expressions yield the correct value
...
When evaluated as an expression "{ 3 }" should yield 3. This updates
the bytecode interpreter to make it so.
2021-06-07 22:10:57 +02:00
Nick Miller
ed5777eb0a
LibAudio: WavLoader: Avoid reading partial samples
...
When samples are requested in `Audio::Loader::get_more_samples`,
the request comes in as a max number of bytes to read.
However, the requested number of bytes may not be an even multiple
of the bytes per sample of the loaded file. If this is the case, and
the bytes are read from the file/stream, then
the last sample will be a partial/runt sample, which then offsets
the remainder of the stream, causing white noise in playback.
This bug was discovered when trying to play 24-bit Wave files, which
happened to have a sample size that never aligned with the number
of requested bytes.
This commit fixes the bug by only reading a multiple of
"bytes per sample" for the loaded file.
2021-06-08 00:38:54 +04:30
Nick Miller
3938b56577
LibAudio+LibCore: Remove unnecessary IODeviceStreamReader.h
...
IODeviceStreamReader isn't pulling its weight.
It's essentially a subset of InputFileStream with only one user
(WavLoader).
This refactors WavLoader to use InputFileStream instead.
2021-06-08 00:38:54 +04:30
Brian Gianforcaro
06ea31d0d5
CatDog: Enhance the speech bubble artificial intelligence
...
Enable cat dog to greet you, and help you with yak shave sessions.
2021-06-07 21:52:16 +02:00
Nick Miller
c3a60a5dcd
LibGUI+SoundPlayer: Add Slider option to jump to cursor
...
When the cursor is clicked outside of the slider knob,
the current behavior is that it will step up or down by the
Slider page step amount.
This commit adds an option to jump the slider knob
directly to the where the mouse cursor is on mouse down events.
This behavior is disabled by default. It must be enabled with
`Slider::set_jump_to_cursor()`.
Jump to cursor is enabled in SoundPlayer since most music players
have this behavior.
2021-06-08 00:10:54 +04:30
Ryan Chandler
6612e026ba
LibJS: Add <<, >> and >>> assignment operators
2021-06-07 21:23:11 +02:00
Luke
1e10965e61
LibJS: Add bytecode ops for <<, >> and >>>
2021-06-07 21:18:34 +02:00
Ryan Chandler
6681415f58
LibJS: Add support for various assignment operators
2021-06-07 21:18:19 +02:00
Ryan Chandler
18ac7fde12
LibJS: Add support for typed equality checks
2021-06-07 21:17:29 +02:00
Gunnar Beutner
9e69ffc1b1
LibJS: Add bytecode generation for EmptyStatement
2021-06-07 20:06:46 +01:00
Linus Groh
2b8a2542a0
LibJS: Add bytecode generation for DebuggerStatement
...
No-op. :^)
2021-06-07 20:05:50 +01:00
Linus Groh
fa9bad912e
LibJS: Add bytecode instructions for a bunch of unary operators
...
~, !, +, -, typeof, and void.
2021-06-07 19:53:47 +01:00