mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Everywhere: Fix spelling mistakes
This commit is contained in:
parent
168063819d
commit
10ec98dd38
Notes:
sideshowbarker
2024-07-17 21:29:37 +09:00
Author: https://github.com/mjz19910 Commit: https://github.com/SerenityOS/serenity/commit/10ec98dd385 Pull-request: https://github.com/SerenityOS/serenity/pull/11694 Reviewed-by: https://github.com/Dexesttp Reviewed-by: https://github.com/creator1creeper1 ✅ Reviewed-by: https://github.com/linusg ✅
56 changed files with 90 additions and 90 deletions
|
@ -73,7 +73,7 @@ public:
|
||||||
{
|
{
|
||||||
auto current_consumers = m_consumers.fetch_or(1u, AK::MemoryOrder::memory_order_relaxed);
|
auto current_consumers = m_consumers.fetch_or(1u, AK::MemoryOrder::memory_order_relaxed);
|
||||||
VERIFY(!(current_consumers & 1u));
|
VERIFY(!(current_consumers & 1u));
|
||||||
// We flagged revokation, now wait until everyone trying to obtain
|
// We flagged revocation, now wait until everyone trying to obtain
|
||||||
// a strong reference is done
|
// a strong reference is done
|
||||||
while (current_consumers > 0) {
|
while (current_consumers > 0) {
|
||||||
#ifdef KERNEL
|
#ifdef KERNEL
|
||||||
|
@ -94,7 +94,7 @@ private:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
mutable Atomic<void*> m_ptr;
|
mutable Atomic<void*> m_ptr;
|
||||||
mutable Atomic<unsigned> m_consumers; // LSB indicates revokation in progress
|
mutable Atomic<unsigned> m_consumers; // LSB indicates revocation in progress
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
Before Width: | Height: | Size: 231 B After Width: | Height: | Size: 231 B |
|
@ -200,7 +200,7 @@
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<p>list-style: outside lower-roman url(list-file.png)</p>
|
<p>list-style: outside lower-roman url(list-file.png)</p>
|
||||||
<ol style="list-style: outside lower-roman url(custome-list-item-2.png);">
|
<ol style="list-style: outside lower-roman url(custom-list-item-2.png);">
|
||||||
<li>First</li>
|
<li>First</li>
|
||||||
<li>Second</li>
|
<li>Second</li>
|
||||||
<li>Third</li>
|
<li>Third</li>
|
||||||
|
|
|
@ -21,7 +21,7 @@ The letters `[+-=]` controls which action will be taken: `+` sets the permission
|
||||||
|
|
||||||
The letters `[rwx]` controls which permission will be changes: `r` is read, `w` is write and `x` is execute.
|
The letters `[rwx]` controls which permission will be changes: `r` is read, `w` is write and `x` is execute.
|
||||||
|
|
||||||
A numeric mode is combination of 1 to 4 numbers. Omitted digits are assumet to be leading zeros. The first digit select the set user ID (4), set group ID (2) and restricted deletion / sticky (1) attributes. The second, third and fourth digit controls permissions of each user group: owner, owning group and others (not owner or owning group), respectively: read (4), write (2) and execute (1).
|
A numeric mode is combination of 1 to 4 numbers. Omitted digits are assumed to be leading zeros. The first digit select the set user ID (4), set group ID (2) and restricted deletion / sticky (1) attributes. The second, third and fourth digit controls permissions of each user group: owner, owning group and others (not owner or owning group), respectively: read (4), write (2) and execute (1).
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,6 @@ $ copy [options...] [text...]
|
||||||
# Copy some image to clipboard
|
# Copy some image to clipboard
|
||||||
$ cat image.png | copy -t image/png
|
$ cat image.png | copy -t image/png
|
||||||
|
|
||||||
# Place text 'foo' in clupboard
|
# Place text 'foo' in clipboard
|
||||||
$ copy foo
|
$ copy foo
|
||||||
```
|
```
|
||||||
|
|
|
@ -26,7 +26,7 @@ LibAudio is the baseline audio library that provides common audio abstractions,
|
||||||
|
|
||||||
#### LibDSP
|
#### LibDSP
|
||||||
|
|
||||||
LibDSP is the digital signal processing library. It provides structures for audio editing programs, such as tracks and clips, while both dealing with MIDI data and sample data. More important is the Processor system, which allows synthesizers, samplers, sequencers, effects, etc. to be written with a common interface and be combined into chains for unlimited DSP (and musical) potential. The ProcessorParameters provide an interface for changing processor parameters programatically or through a UI.
|
LibDSP is the digital signal processing library. It provides structures for audio editing programs, such as tracks and clips, while both dealing with MIDI data and sample data. More important is the Processor system, which allows synthesizers, samplers, sequencers, effects, etc. to be written with a common interface and be combined into chains for unlimited DSP (and musical) potential. The ProcessorParameters provide an interface for changing processor parameters programmatically or through a UI.
|
||||||
|
|
||||||
LibDSP was started to support development efforts in Piano, but it is intended as a general-purpose audio processing library, building on the groundwork from LibAudio. Therefore, users of LibDSP must be familiar with LibAudio classes and concepts, as they are used extensively in LibDSP.
|
LibDSP was started to support development efforts in Piano, but it is intended as a general-purpose audio processing library, building on the groundwork from LibAudio. Therefore, users of LibDSP must be familiar with LibAudio classes and concepts, as they are used extensively in LibDSP.
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ Audio volume is more complicated than just multiplying a (digital or analog) aud
|
||||||
|
|
||||||
For the SerenityOS audio system, the following applies: Userland applications and libraries that do their own volume changes need to be aware of the nature of volume. LibAudio provides utility functions for correctly handling volume, so these are to be used whenever applicable. For AudioServer, main and per-client volume is already handled correctly; to the outside, volume is linear between 0 and 1.
|
For the SerenityOS audio system, the following applies: Userland applications and libraries that do their own volume changes need to be aware of the nature of volume. LibAudio provides utility functions for correctly handling volume, so these are to be used whenever applicable. For AudioServer, main and per-client volume is already handled correctly; to the outside, volume is linear between 0 and 1.
|
||||||
|
|
||||||
For example: A program may set its client volume to 0.5 and the audio will be percieved as half as loud by a human. However, if the program wishes to change the volume beforehand, it needs to use logarithmic scaling, for example with LibAudio's built-in functionality.
|
For example: A program may set its client volume to 0.5 and the audio will be perceived as half as loud by a human. However, if the program wishes to change the volume beforehand, it needs to use logarithmic scaling, for example with LibAudio's built-in functionality.
|
||||||
|
|
||||||
### Sample rate
|
### Sample rate
|
||||||
|
|
||||||
|
|
|
@ -36,11 +36,11 @@ them.
|
||||||
|
|
||||||
### `sys` directory
|
### `sys` directory
|
||||||
|
|
||||||
This subdirectoy includes global settings of the kernel.
|
This subdirectory includes global settings of the kernel.
|
||||||
|
|
||||||
* **`caps_lock_to_ctrl`** - this node controls remapping of of caps lock to the Ctrl key.
|
* **`caps_lock_to_ctrl`** - this node controls remapping of of caps lock to the Ctrl key.
|
||||||
* **`kmalloc_stacks`** - this node controls whether to send information about kmalloc to debug log.
|
* **`kmalloc_stacks`** - this node controls whether to send information about kmalloc to debug log.
|
||||||
* **`ubsan_is_deadly`** - this node controls the deadliness of the kernel undefinied behavior
|
* **`ubsan_is_deadly`** - this node controls the deadliness of the kernel undefined behavior
|
||||||
sanitizer errors.
|
sanitizer errors.
|
||||||
|
|
||||||
### Per process entries
|
### Per process entries
|
||||||
|
|
|
@ -33,6 +33,6 @@ This program must be run as root.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# groupadd -g 110 contributors
|
# groupadd -g 110 contributors
|
||||||
# groupadd mainteners
|
# groupadd maintainers
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ This guide assumes several things:
|
||||||
|
|
||||||
- The TFTP server root is `/srv/tftp/`
|
- The TFTP server root is `/srv/tftp/`
|
||||||
- Bootloaders are located inside `/srv/tftp/boot/`
|
- Bootloaders are located inside `/srv/tftp/boot/`
|
||||||
- SerenityOS artefacts are located inside `/srv/tftp/serenity/`:
|
- SerenityOS artifacts are located inside `/srv/tftp/serenity/`:
|
||||||
- The prekernel is located at `/srv/tftp/serenity/prekernel`
|
- The prekernel is located at `/srv/tftp/serenity/prekernel`
|
||||||
- You can find it at `Build/i686/Kernel/Prekernel/Prekernel`
|
- You can find it at `Build/i686/Kernel/Prekernel/Prekernel`
|
||||||
- The kernel is located at `/srv/tftp/serenity/kernel`
|
- The kernel is located at `/srv/tftp/serenity/kernel`
|
||||||
|
@ -134,7 +134,7 @@ LABEL SerenityOS
|
||||||
### Troubleshooting
|
### Troubleshooting
|
||||||
|
|
||||||
- Issues with DHCP or TFTP usually require sniffing packets on the network to figure out.
|
- Issues with DHCP or TFTP usually require sniffing packets on the network to figure out.
|
||||||
- TFTP is a slow protocol, transferring the QEMU disk image (~ 200 MiB) will take some time. Consider setting up a FTP or HTTP server for faster downloading of SerenityOS artefacts if your bootloader supports it.
|
- TFTP is a slow protocol, transferring the QEMU disk image (~ 200 MiB) will take some time. Consider setting up a FTP or HTTP server for faster downloading of SerenityOS artifacts if your bootloader supports it.
|
||||||
- Remember that SerenityOS has not been extensively tested on physical hardware.
|
- Remember that SerenityOS has not been extensively tested on physical hardware.
|
||||||
- Some BIOS implementations of PXE are buggy or some machines may not have a PXE boot option at all in which case you could try using [iPXE](https://ipxe.org/).
|
- Some BIOS implementations of PXE are buggy or some machines may not have a PXE boot option at all in which case you could try using [iPXE](https://ipxe.org/).
|
||||||
- Virtual machines can also be booted over the network. Cheat notes for QEMU on Linux, assuming `br0` is already set up:
|
- Virtual machines can also be booted over the network. Cheat notes for QEMU on Linux, assuming `br0` is already set up:
|
||||||
|
|
|
@ -234,7 +234,7 @@ See: https://en.cppreference.com/w/cpp/utility/source_location
|
||||||
`AK::SourceLocation` is the implementation of this feature in
|
`AK::SourceLocation` is the implementation of this feature in
|
||||||
SerenityOS. It's become the idiomatic way to capture the location
|
SerenityOS. It's become the idiomatic way to capture the location
|
||||||
when adding extra debugging instrumentation, without resorting to
|
when adding extra debugging instrumentation, without resorting to
|
||||||
litering the code with preprocessor macros.
|
littering the code with preprocessor macros.
|
||||||
|
|
||||||
To use it, you can add the `AK::SourceLocation` as a default argument
|
To use it, you can add the `AK::SourceLocation` as a default argument
|
||||||
to any function, using `AK::SourceLocation::current()` to initialize the
|
to any function, using `AK::SourceLocation::current()` to initialize the
|
||||||
|
|
|
@ -63,7 +63,7 @@ RUST_WHITELISTED_EVENT_NAME=push
|
||||||
```shell
|
```shell
|
||||||
MAX_RUNNER_THREADS=XXX
|
MAX_RUNNER_THREADS=XXX
|
||||||
```
|
```
|
||||||
If you are setting up multiple runners on the same machine, this setting can be used to divvy up the cores, if youre only setting up one runner, this can just be set to the server's core count
|
If you are setting up multiple runners on the same machine, this setting can be used to divvy up the cores, if you're only setting up one runner, this can just be set to the server's core count
|
||||||
### Install the runner as a service
|
### Install the runner as a service
|
||||||
```shell
|
```shell
|
||||||
sudo ./svc.sh install
|
sudo ./svc.sh install
|
||||||
|
|
|
@ -15,7 +15,7 @@ VALIDATE_IS_X86()
|
||||||
|
|
||||||
namespace Kernel {
|
namespace Kernel {
|
||||||
|
|
||||||
class GenericInterruptHandeler;
|
class GenericInterruptHandler;
|
||||||
|
|
||||||
extern "C" void interrupt_common_asm_entry();
|
extern "C" void interrupt_common_asm_entry();
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,7 @@ struct ext2_group_desc {
|
||||||
__u16 bg_flags;
|
__u16 bg_flags;
|
||||||
__u32 bg_reserved[2];
|
__u32 bg_reserved[2];
|
||||||
__u16 bg_itable_unused; /* Unused inodes count */
|
__u16 bg_itable_unused; /* Unused inodes count */
|
||||||
__u16 bg_checksum; /* crc16(s_uuid+grouo_num+group_desc)*/
|
__u16 bg_checksum; /* crc16(s_uuid+group_num+group_desc)*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ext4_group_desc {
|
struct ext4_group_desc {
|
||||||
|
@ -151,7 +151,7 @@ struct ext4_group_desc {
|
||||||
__u16 bg_flags;
|
__u16 bg_flags;
|
||||||
__u32 bg_reserved[2];
|
__u32 bg_reserved[2];
|
||||||
__u16 bg_itable_unused; /* Unused inodes count */
|
__u16 bg_itable_unused; /* Unused inodes count */
|
||||||
__u16 bg_checksum; /* crc16(s_uuid+grouo_num+group_desc)*/
|
__u16 bg_checksum; /* crc16(s_uuid+group_num+group_desc)*/
|
||||||
__u32 bg_block_bitmap_hi; /* Blocks bitmap block MSB */
|
__u32 bg_block_bitmap_hi; /* Blocks bitmap block MSB */
|
||||||
__u32 bg_inode_bitmap_hi; /* Inodes bitmap block MSB */
|
__u32 bg_inode_bitmap_hi; /* Inodes bitmap block MSB */
|
||||||
__u32 bg_inode_table_hi; /* Inodes table block MSB */
|
__u32 bg_inode_table_hi; /* Inodes table block MSB */
|
||||||
|
|
|
@ -105,7 +105,7 @@ UNMAP_AFTER_INIT BochsGraphicsAdapter::BochsGraphicsAdapter(PCI::DeviceIdentifie
|
||||||
, m_mmio_registers(PCI::get_BAR2(pci_device_identifier.address()) & 0xfffffff0)
|
, m_mmio_registers(PCI::get_BAR2(pci_device_identifier.address()) & 0xfffffff0)
|
||||||
, m_registers(Memory::map_typed_writable<BochsDisplayMMIORegisters volatile>(m_mmio_registers))
|
, m_registers(Memory::map_typed_writable<BochsDisplayMMIORegisters volatile>(m_mmio_registers))
|
||||||
{
|
{
|
||||||
// We assume safe resolutio is 1024x768x32
|
// We assume safe resolution is 1024x768x32
|
||||||
m_framebuffer_console = Graphics::ContiguousFramebufferConsole::initialize(PhysicalAddress(PCI::get_BAR0(pci_device_identifier.address()) & 0xfffffff0), 1024, 768, 1024 * sizeof(u32));
|
m_framebuffer_console = Graphics::ContiguousFramebufferConsole::initialize(PhysicalAddress(PCI::get_BAR0(pci_device_identifier.address()) & 0xfffffff0), 1024, 768, 1024 * sizeof(u32));
|
||||||
// FIXME: This is a very wrong way to do this...
|
// FIXME: This is a very wrong way to do this...
|
||||||
GraphicsManagement::the().m_console = m_framebuffer_console;
|
GraphicsManagement::the().m_console = m_framebuffer_console;
|
||||||
|
|
|
@ -81,7 +81,7 @@ bool Mailbox::send_queue(void* queue, u32 queue_size) const
|
||||||
|
|
||||||
auto& mmio = MMIO::the();
|
auto& mmio = MMIO::the();
|
||||||
|
|
||||||
// The mailbox interface has a FIFO for message deliverly in both directions.
|
// The mailbox interface has a FIFO for message delivery in both directions.
|
||||||
// Responses can be delivered out of order to requests, but we currently ever only send on request at once.
|
// Responses can be delivered out of order to requests, but we currently ever only send on request at once.
|
||||||
// It'd be nice to have an async interface here where we send a message, then return immediately, and read the response when an interrupt arrives.
|
// It'd be nice to have an async interface here where we send a message, then return immediately, and read the response when an interrupt arrives.
|
||||||
// But for now, this is synchronous.
|
// But for now, this is synchronous.
|
||||||
|
|
|
@ -438,7 +438,7 @@ public:
|
||||||
NonnullOwnPtrVector<KString> const& arguments() const { return m_arguments; };
|
NonnullOwnPtrVector<KString> const& arguments() const { return m_arguments; };
|
||||||
NonnullOwnPtrVector<KString> const& environment() const { return m_environment; };
|
NonnullOwnPtrVector<KString> const& environment() const { return m_environment; };
|
||||||
|
|
||||||
ErrorOr<void> exec(NonnullOwnPtr<KString> path, NonnullOwnPtrVector<KString> arguments, NonnullOwnPtrVector<KString> environment, int recusion_depth = 0);
|
ErrorOr<void> exec(NonnullOwnPtr<KString> path, NonnullOwnPtrVector<KString> arguments, NonnullOwnPtrVector<KString> environment, int recursion_depth = 0);
|
||||||
|
|
||||||
ErrorOr<LoadResult> load(NonnullRefPtr<OpenFileDescription> main_program_description, RefPtr<OpenFileDescription> interpreter_description, const ElfW(Ehdr) & main_program_header);
|
ErrorOr<LoadResult> load(NonnullRefPtr<OpenFileDescription> main_program_description, RefPtr<OpenFileDescription> interpreter_description, const ElfW(Ehdr) & main_program_header);
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ get_filename_component(
|
||||||
ABSOLUTE CACHE
|
ABSOLUTE CACHE
|
||||||
)
|
)
|
||||||
set(SERENITY_ARCH "i686" CACHE STRING "Target architecture for SerenityOS.")
|
set(SERENITY_ARCH "i686" CACHE STRING "Target architecture for SerenityOS.")
|
||||||
set(SERENITY_TOOLCHAIN "GNU" CACHE STRING "Compliler toolchain to use for Serenity (GNU or Clang)")
|
set(SERENITY_TOOLCHAIN "GNU" CACHE STRING "Compiler toolchain to use for Serenity (GNU or Clang)")
|
||||||
|
|
||||||
# FIXME: It is preferred to keep all the sub-build artifacts below the binary directory for the superbuild
|
# FIXME: It is preferred to keep all the sub-build artifacts below the binary directory for the superbuild
|
||||||
# However, this has an impact on developer's IDE settings and more significantly, the Ports tree.
|
# However, this has an impact on developer's IDE settings and more significantly, the Ports tree.
|
||||||
|
|
|
@ -293,7 +293,7 @@ if (BUILD_LAGOM)
|
||||||
|
|
||||||
# ELF
|
# ELF
|
||||||
file(GLOB LIBELF_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibELF/*.cpp")
|
file(GLOB LIBELF_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibELF/*.cpp")
|
||||||
# There's no way we can reliably make the dymamic loading classes cross platform
|
# There's no way we can reliably make the dynamic loading classes cross platform
|
||||||
list(FILTER LIBELF_SOURCES EXCLUDE REGEX ".*Dynamic.*.cpp$")
|
list(FILTER LIBELF_SOURCES EXCLUDE REGEX ".*Dynamic.*.cpp$")
|
||||||
lagom_lib(ELF elf
|
lagom_lib(ELF elf
|
||||||
SOURCES ${LIBELF_SOURCES}
|
SOURCES ${LIBELF_SOURCES}
|
||||||
|
@ -316,9 +316,9 @@ if (BUILD_LAGOM)
|
||||||
|
|
||||||
# GL
|
# GL
|
||||||
file(GLOB LIBGL_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibGL/*.cpp")
|
file(GLOB LIBGL_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibGL/*.cpp")
|
||||||
file(GLOB LIBGL_TEX_SCOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibGL/Tex/*.cpp")
|
file(GLOB LIBGL_TEX_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibGL/Tex/*.cpp")
|
||||||
lagom_lib(GL gl
|
lagom_lib(GL gl
|
||||||
SOURCES ${LIBGL_SOURCES} ${LIBGL_TEX_SCOURCES}
|
SOURCES ${LIBGL_SOURCES} ${LIBGL_TEX_SOURCES}
|
||||||
LIBS m LagomGfx LagomSoftGPU)
|
LIBS m LagomGfx LagomSoftGPU)
|
||||||
|
|
||||||
# GUI-GML
|
# GUI-GML
|
||||||
|
|
|
@ -14,7 +14,7 @@ Lagom can be used to fuzz parts of SerenityOS's code base. Fuzzers can be run lo
|
||||||
|
|
||||||
### Fuzzing locally
|
### Fuzzing locally
|
||||||
|
|
||||||
Lagom can be used to fuzz parts of SerenityOS's code base. This requires buildling with `clang`, so it's convenient to use a different build directory for that. Fuzzers work best with Address Sanitizer enabled. Run CMake like this:
|
Lagom can be used to fuzz parts of SerenityOS's code base. This requires building with `clang`, so it's convenient to use a different build directory for that. Fuzzers work best with Address Sanitizer enabled. Run CMake like this:
|
||||||
|
|
||||||
# From the root of the SerenityOS checkout:
|
# From the root of the SerenityOS checkout:
|
||||||
cmake -GNinja -S Meta/Lagom -B Build/lagom-fuzzers \
|
cmake -GNinja -S Meta/Lagom -B Build/lagom-fuzzers \
|
||||||
|
|
|
@ -53,7 +53,7 @@ public:
|
||||||
IndexType ensure(StorageType value)
|
IndexType ensure(StorageType value)
|
||||||
{
|
{
|
||||||
// We maintain a set of unique values in two structures: a vector which stores the values in
|
// We maintain a set of unique values in two structures: a vector which stores the values in
|
||||||
// the order they are added, and a hash map which maps that value to its index in the vetor.
|
// the order they are added, and a hash map which maps that value to its index in the vector.
|
||||||
// The vector is to ensure the values are generated in an easily known order, and the map is
|
// The vector is to ensure the values are generated in an easily known order, and the map is
|
||||||
// to allow quickly deciding if a value is actually unique (otherwise, we'd have to linearly
|
// to allow quickly deciding if a value is actually unique (otherwise, we'd have to linearly
|
||||||
// search the vector for each value).
|
// search the vector for each value).
|
||||||
|
|
|
@ -574,7 +574,7 @@
|
||||||
<footer>
|
<footer>
|
||||||
<h2>Thanks</h2>
|
<h2>Thanks</h2>
|
||||||
|
|
||||||
<p>To all the awesome people who have particpated in the last year, writing code,
|
<p>To all the awesome people who have participated in the last year, writing code,
|
||||||
bug reports, documentation, commenting/liking/sharing my videos, sending letters,
|
bug reports, documentation, commenting/liking/sharing my videos, sending letters,
|
||||||
chilling on Discord, coming to the Office Hours livestreams, telling your friends,
|
chilling on Discord, coming to the Office Hours livestreams, telling your friends,
|
||||||
etc, thank you all!
|
etc, thank you all!
|
||||||
|
|
|
@ -17,7 +17,7 @@ static constexpr int constexpr_sum(const Span<const int> span)
|
||||||
return sum;
|
return sum;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE(compile_time_contructible)
|
TEST_CASE(compile_time_constructible)
|
||||||
{
|
{
|
||||||
constexpr Array<int, 4> array = { 0, 1, 2, 3 };
|
constexpr Array<int, 4> array = { 0, 1, 2, 3 };
|
||||||
static_assert(array.size() == 4);
|
static_assert(array.size() == 4);
|
||||||
|
|
|
@ -17,7 +17,7 @@ TEST_CASE(constexpr_default_constructor_is_empty)
|
||||||
static_assert(span.is_empty(), "Default constructed span should be empty.");
|
static_assert(span.is_empty(), "Default constructed span should be empty.");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE(implicit_converson_to_const)
|
TEST_CASE(implicit_conversion_to_const)
|
||||||
{
|
{
|
||||||
constexpr Bytes bytes0;
|
constexpr Bytes bytes0;
|
||||||
[[maybe_unused]] constexpr ReadonlyBytes bytes2 = bytes0;
|
[[maybe_unused]] constexpr ReadonlyBytes bytes2 = bytes0;
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
static_assert(!trait<__VA_ARGS__>)
|
static_assert(!trait<__VA_ARGS__>)
|
||||||
|
|
||||||
enum class Enummer : u8 {
|
enum class Enummer : u8 {
|
||||||
Dummmy,
|
Dummy
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_CASE(FundamentalTypeClassification)
|
TEST_CASE(FundamentalTypeClassification)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <AK/Format.h>
|
#include <AK/Format.h>
|
||||||
#include <LibTest/TestCase.h>
|
#include <LibTest/TestCase.h>
|
||||||
|
|
||||||
// Note: Needs to be 'noline' so stack canary isn't optimized out.
|
// Note: Needs to be 'noinline' so stack canary isn't optimized out.
|
||||||
static void __attribute__((noinline)) smasher(char* string)
|
static void __attribute__((noinline)) smasher(char* string)
|
||||||
{
|
{
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
|
@ -18,7 +18,7 @@ static void __attribute__((noinline)) smasher(char* string)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: Needs to be 'noline' so stack canary isn't optimized out.
|
// Note: Needs to be 'noinline' so stack canary isn't optimized out.
|
||||||
static void __attribute__((noinline)) stack_to_smash()
|
static void __attribute__((noinline)) stack_to_smash()
|
||||||
{
|
{
|
||||||
char string[8] = {};
|
char string[8] = {};
|
||||||
|
|
|
@ -257,7 +257,7 @@ int main(int argc, char** argv)
|
||||||
bool no_source_info = !source_position.has_value();
|
bool no_source_info = !source_position.has_value();
|
||||||
if (no_source_info || source_position.value() != previous_source_position) {
|
if (no_source_info || source_position.value() != previous_source_position) {
|
||||||
if (no_source_info)
|
if (no_source_info)
|
||||||
outln("No source information for current instruction! stoppoing.");
|
outln("No source information for current instruction! stopping.");
|
||||||
in_step_line = false;
|
in_step_line = false;
|
||||||
} else {
|
} else {
|
||||||
return Debug::DebugSession::DebugDecision::SingleStep;
|
return Debug::DebugSession::DebugDecision::SingleStep;
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace Spreadsheet {
|
||||||
Optional<FunctionAndArgumentIndex> get_function_and_argument_index(StringView source)
|
Optional<FunctionAndArgumentIndex> get_function_and_argument_index(StringView source)
|
||||||
{
|
{
|
||||||
JS::Lexer lexer { source };
|
JS::Lexer lexer { source };
|
||||||
// Track <identifier> <OpenParen>'s, and how many complete expressions are inside the parenthesised expression.
|
// Track <identifier> <OpenParen>'s, and how many complete expressions are inside the parenthesized expression.
|
||||||
Vector<size_t> state;
|
Vector<size_t> state;
|
||||||
StringView last_name;
|
StringView last_name;
|
||||||
Vector<StringView> names;
|
Vector<StringView> names;
|
||||||
|
|
|
@ -44,7 +44,7 @@ struct ParserTraits {
|
||||||
E(NonConformingColumnCount, "Header count does not match given column count") \
|
E(NonConformingColumnCount, "Header count does not match given column count") \
|
||||||
E(QuoteFailure, "Quoting failure") \
|
E(QuoteFailure, "Quoting failure") \
|
||||||
E(InternalError, "Internal error") \
|
E(InternalError, "Internal error") \
|
||||||
E(DataPastLogicalEnd, "Exrta data past the logical end of the rows")
|
E(DataPastLogicalEnd, "Extra data past the logical end of the rows")
|
||||||
|
|
||||||
enum class ReadError {
|
enum class ReadError {
|
||||||
#define E(name, _) name,
|
#define E(name, _) name,
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
@GUI::Label {
|
@GUI::Label {
|
||||||
text: "Please double-check the guessed file type\nor select the correct one below"
|
text: "Please double-check the guessed file type\nor select the correct one below"
|
||||||
text_aliignment: "TopLeft"
|
text_alignment: "TopLeft"
|
||||||
fixed_height: 32
|
fixed_height: 32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ void Fire::timer_event(Core::TimerEvent&)
|
||||||
if (phase > 1)
|
if (phase > 1)
|
||||||
phase = 0;
|
phase = 0;
|
||||||
|
|
||||||
/* Paint our palletized buffer to screen */
|
/* Paint our palettized buffer to screen */
|
||||||
for (int px = 0 + phase; px < FIRE_WIDTH; px += 2) {
|
for (int px = 0 + phase; px < FIRE_WIDTH; px += 2) {
|
||||||
for (int py = 1; py < FIRE_HEIGHT; py++) {
|
for (int py = 1; py < FIRE_HEIGHT; py++) {
|
||||||
int rnd = rand() % 3;
|
int rnd = rand() % 3;
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
namespace UserspaceEmulator {
|
namespace UserspaceEmulator {
|
||||||
|
|
||||||
constexpr u64 _inititalized_64 = 0x01010101'01010101LLU;
|
constexpr u64 _initialized_64 = 0x01010101'01010101LLU;
|
||||||
constexpr u128 _initialized_128 = u128(_inititalized_64, _inititalized_64);
|
constexpr u128 _initialized_128 = u128(_initialized_64, _initialized_64);
|
||||||
constexpr u256 _initialized_256 = u256(_initialized_128, _initialized_128);
|
constexpr u256 _initialized_256 = u256(_initialized_128, _initialized_128);
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
@ -43,7 +43,7 @@ public:
|
||||||
if constexpr (sizeof(T) == 16)
|
if constexpr (sizeof(T) == 16)
|
||||||
return (m_shadow & _initialized_128) != _initialized_128;
|
return (m_shadow & _initialized_128) != _initialized_128;
|
||||||
if constexpr (sizeof(T) == 8)
|
if constexpr (sizeof(T) == 8)
|
||||||
return (m_shadow & _inititalized_64) != _inititalized_64;
|
return (m_shadow & _initialized_64) != _initialized_64;
|
||||||
if constexpr (sizeof(T) == 4)
|
if constexpr (sizeof(T) == 4)
|
||||||
return (m_shadow & 0x01010101) != 0x01010101;
|
return (m_shadow & 0x01010101) != 0x01010101;
|
||||||
if constexpr (sizeof(T) == 2)
|
if constexpr (sizeof(T) == 2)
|
||||||
|
@ -59,7 +59,7 @@ public:
|
||||||
if constexpr (sizeof(T) == 16)
|
if constexpr (sizeof(T) == 16)
|
||||||
m_shadow = _initialized_128;
|
m_shadow = _initialized_128;
|
||||||
if constexpr (sizeof(T) == 8)
|
if constexpr (sizeof(T) == 8)
|
||||||
m_shadow = _inititalized_64;
|
m_shadow = _initialized_64;
|
||||||
if constexpr (sizeof(T) == 4)
|
if constexpr (sizeof(T) == 4)
|
||||||
m_shadow = 0x01010101;
|
m_shadow = 0x01010101;
|
||||||
if constexpr (sizeof(T) == 2)
|
if constexpr (sizeof(T) == 2)
|
||||||
|
@ -91,7 +91,7 @@ public:
|
||||||
if constexpr (sizeof(T) == 16)
|
if constexpr (sizeof(T) == 16)
|
||||||
return (m_shadow & _initialized_128) != _initialized_128;
|
return (m_shadow & _initialized_128) != _initialized_128;
|
||||||
if constexpr (sizeof(T) == 8)
|
if constexpr (sizeof(T) == 8)
|
||||||
return (m_shadow & _inititalized_64) != _inititalized_64;
|
return (m_shadow & _initialized_64) != _initialized_64;
|
||||||
if constexpr (sizeof(T) == 4)
|
if constexpr (sizeof(T) == 4)
|
||||||
return (m_shadow & 0x01010101) != 0x01010101;
|
return (m_shadow & 0x01010101) != 0x01010101;
|
||||||
if constexpr (sizeof(T) == 2)
|
if constexpr (sizeof(T) == 2)
|
||||||
|
@ -121,7 +121,7 @@ ALWAYS_INLINE ValueWithShadow<T> shadow_wrap_as_initialized(T value)
|
||||||
if constexpr (sizeof(T) == 16)
|
if constexpr (sizeof(T) == 16)
|
||||||
return { value, _initialized_128 };
|
return { value, _initialized_128 };
|
||||||
if constexpr (sizeof(T) == 8)
|
if constexpr (sizeof(T) == 8)
|
||||||
return { value, _inititalized_64 };
|
return { value, _initialized_64 };
|
||||||
if constexpr (sizeof(T) == 4)
|
if constexpr (sizeof(T) == 4)
|
||||||
return { value, 0x01010101 };
|
return { value, 0x01010101 };
|
||||||
if constexpr (sizeof(T) == 2)
|
if constexpr (sizeof(T) == 2)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <AK/Types.h>
|
#include <AK/Types.h>
|
||||||
#include <fenv.h>
|
#include <fenv.h>
|
||||||
|
|
||||||
// This is the size of the floating point envinronment image in protected mode
|
// This is the size of the floating point environment image in protected mode
|
||||||
static_assert(sizeof(__x87_floating_point_environment) == 28);
|
static_assert(sizeof(__x87_floating_point_environment) == 28);
|
||||||
|
|
||||||
static u16 read_status_register()
|
static u16 read_status_register()
|
||||||
|
|
|
@ -212,9 +212,9 @@ int posix_spawnattr_getschedparam(const posix_spawnattr_t* attr, struct sched_pa
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_spawnattr_getschedpolicy.html
|
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_spawnattr_getschedpolicy.html
|
||||||
int posix_spawnattr_getschedpolicy(const posix_spawnattr_t* attr, int* out_schedpolicty)
|
int posix_spawnattr_getschedpolicy(const posix_spawnattr_t* attr, int* out_schedpolicy)
|
||||||
{
|
{
|
||||||
*out_schedpolicty = attr->schedpolicy;
|
*out_schedpolicy = attr->schedpolicy;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ __BEGIN_DECLS
|
||||||
#define AT_EGID 14 /* a_val holds effective group id of process */
|
#define AT_EGID 14 /* a_val holds effective group id of process */
|
||||||
#define AT_PLATFORM 15 /* a_val points to a string containing platform name */
|
#define AT_PLATFORM 15 /* a_val points to a string containing platform name */
|
||||||
#define AT_HWCAP 16 /* a_val contains bitmask of CPU features. Equivalent to CPUID 1.EDX*/
|
#define AT_HWCAP 16 /* a_val contains bitmask of CPU features. Equivalent to CPUID 1.EDX*/
|
||||||
#define AT_CLKTCK 17 /* a_val contains frequence at which times() increments. (Re: Spec. What is times()?) */
|
#define AT_CLKTCK 17 /* a_val contains frequency at which times() increments. (Re: Spec. What is times()?) */
|
||||||
#define AT_SECURE 23 /* a_val holds 1 if program in secure mode (e.g. suid). Otherwise 0 */
|
#define AT_SECURE 23 /* a_val holds 1 if program in secure mode (e.g. suid). Otherwise 0 */
|
||||||
#define AT_BASE_PLATFORM 24 /* a_ptr points to a string identifying base platform name, which might be different from platform (e.g x86_64 when in i386 compat) */
|
#define AT_BASE_PLATFORM 24 /* a_ptr points to a string identifying base platform name, which might be different from platform (e.g x86_64 when in i386 compat) */
|
||||||
#define AT_RANDOM 25 /* a_ptr points to 16 securely generated random bytes */
|
#define AT_RANDOM 25 /* a_ptr points to 16 securely generated random bytes */
|
||||||
|
|
|
@ -237,7 +237,7 @@ ALWAYS_INLINE UnsignedBigInteger::Word UnsignedBigIntegerAlgorithms::shift_left_
|
||||||
size_t result_word_index)
|
size_t result_word_index)
|
||||||
{
|
{
|
||||||
// "<= length()" (rather than length() - 1) is intentional,
|
// "<= length()" (rather than length() - 1) is intentional,
|
||||||
// The result inedx of length() is used when calculating the carry word
|
// The result index of length() is used when calculating the carry word
|
||||||
VERIFY(result_word_index <= number.length());
|
VERIFY(result_word_index <= number.length());
|
||||||
VERIFY(num_bits <= UnsignedBigInteger::BITS_IN_WORD);
|
VERIFY(num_bits <= UnsignedBigInteger::BITS_IN_WORD);
|
||||||
u32 result = 0;
|
u32 result = 0;
|
||||||
|
|
|
@ -60,7 +60,7 @@ u64 SignedBigInteger::to_u64() const
|
||||||
u64 unsigned_value = m_unsigned_data.to_u64();
|
u64 unsigned_value = m_unsigned_data.to_u64();
|
||||||
if (!m_sign)
|
if (!m_sign)
|
||||||
return unsigned_value;
|
return unsigned_value;
|
||||||
return ~(unsigned_value - 1); // equivalent to `-unsigned_value`, but doesnt trigger UBSAN
|
return ~(unsigned_value - 1); // equivalent to `-unsigned_value`, but doesn't trigger UBSAN
|
||||||
}
|
}
|
||||||
|
|
||||||
double SignedBigInteger::to_double() const
|
double SignedBigInteger::to_double() const
|
||||||
|
|
|
@ -37,9 +37,9 @@ void AbbreviationsMap::populate_map()
|
||||||
u8 has_children = 0;
|
u8 has_children = 0;
|
||||||
abbreviation_stream >> has_children;
|
abbreviation_stream >> has_children;
|
||||||
|
|
||||||
AbbreviationEntry abbrevation_entry {};
|
AbbreviationEntry abbreviation_entry {};
|
||||||
abbrevation_entry.tag = static_cast<EntryTag>(tag);
|
abbreviation_entry.tag = static_cast<EntryTag>(tag);
|
||||||
abbrevation_entry.has_children = (has_children == 1);
|
abbreviation_entry.has_children = (has_children == 1);
|
||||||
|
|
||||||
AttributeSpecification current_attribute_specification {};
|
AttributeSpecification current_attribute_specification {};
|
||||||
do {
|
do {
|
||||||
|
@ -58,11 +58,11 @@ void AbbreviationsMap::populate_map()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (current_attribute_specification.attribute != Attribute::None) {
|
if (current_attribute_specification.attribute != Attribute::None) {
|
||||||
abbrevation_entry.attribute_specifications.append(current_attribute_specification);
|
abbreviation_entry.attribute_specifications.append(current_attribute_specification);
|
||||||
}
|
}
|
||||||
} while (current_attribute_specification.attribute != Attribute::None || current_attribute_specification.form != AttributeDataForm::None);
|
} while (current_attribute_specification.attribute != Attribute::None || current_attribute_specification.form != AttributeDataForm::None);
|
||||||
|
|
||||||
m_entries.set((u32)abbreviation_code, move(abbrevation_entry));
|
m_entries.set((u32)abbreviation_code, move(abbreviation_entry));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ Optional<ProcessInspector::SymbolicationResult> ProcessInspector::symbolicate(Fl
|
||||||
auto* lib = library_at(address);
|
auto* lib = library_at(address);
|
||||||
if (!lib)
|
if (!lib)
|
||||||
return {};
|
return {};
|
||||||
// FIXME: ELF::Image symlicate() API should return String::empty() if symbol is not found (It currently returns ??)
|
// FIXME: ELF::Image symbolicate() API should return String::empty() if symbol is not found (It currently returns ??)
|
||||||
auto symbol = lib->debug_info->elf().symbolicate(address - lib->base_address);
|
auto symbol = lib->debug_info->elf().symbolicate(address - lib->base_address);
|
||||||
return { { lib->name, symbol } };
|
return { { lib->name, symbol } };
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ private:
|
||||||
bool uses_alpha() const
|
bool uses_alpha() const
|
||||||
{
|
{
|
||||||
// We don't care about the title_stripes_color or title_shadow_color alpha channels because they are
|
// We don't care about the title_stripes_color or title_shadow_color alpha channels because they are
|
||||||
// effectively rendered on top of the borders and don't mean whether the frame itself atually has
|
// effectively rendered on top of the borders and don't mean whether the frame itself actually has
|
||||||
// any alpha channels that would require the entire frame to be rendered as transparency.
|
// any alpha channels that would require the entire frame to be rendered as transparency.
|
||||||
return title_color.alpha() != 0xff || border_color.alpha() != 0xff || border_color2.alpha() != 0xff;
|
return title_color.alpha() != 0xff || border_color.alpha() != 0xff || border_color2.alpha() != 0xff;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
namespace JS::Intl {
|
namespace JS::Intl {
|
||||||
|
|
||||||
// 13 ListFomat Objects, https://tc39.es/ecma402/#listformat-objects
|
// 13 ListFormat Objects, https://tc39.es/ecma402/#listformat-objects
|
||||||
ListFormat::ListFormat(Object& prototype)
|
ListFormat::ListFormat(Object& prototype)
|
||||||
: Object(prototype)
|
: Object(prototype)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1589,7 +1589,7 @@ int compute_exponent(NumberFormat& number_format, double number)
|
||||||
int magnitude = log10floor(number);
|
int magnitude = log10floor(number);
|
||||||
|
|
||||||
// 4. Let exponent be ComputeExponentForMagnitude(numberFormat, magnitude).
|
// 4. Let exponent be ComputeExponentForMagnitude(numberFormat, magnitude).
|
||||||
int exponent = compute_exponent_for_magniude(number_format, magnitude);
|
int exponent = compute_exponent_for_magnitude(number_format, magnitude);
|
||||||
|
|
||||||
// 5. Let x be x × 10^(-exponent).
|
// 5. Let x be x × 10^(-exponent).
|
||||||
number *= pow(10, -exponent);
|
number *= pow(10, -exponent);
|
||||||
|
@ -1613,11 +1613,11 @@ int compute_exponent(NumberFormat& number_format, double number)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 10. Return ComputeExponentForMagnitude(numberFormat, magnitude + 1).
|
// 10. Return ComputeExponentForMagnitude(numberFormat, magnitude + 1).
|
||||||
return compute_exponent_for_magniude(number_format, magnitude + 1);
|
return compute_exponent_for_magnitude(number_format, magnitude + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 15.1.17 ComputeExponentForMagnitude ( numberFormat, magnitude ), https://tc39.es/ecma402/#sec-computeexponentformagnitude
|
// 15.1.17 ComputeExponentForMagnitude ( numberFormat, magnitude ), https://tc39.es/ecma402/#sec-computeexponentformagnitude
|
||||||
int compute_exponent_for_magniude(NumberFormat& number_format, int magnitude)
|
int compute_exponent_for_magnitude(NumberFormat& number_format, int magnitude)
|
||||||
{
|
{
|
||||||
// 1. Let notation be numberFormat.[[Notation]].
|
// 1. Let notation be numberFormat.[[Notation]].
|
||||||
switch (number_format.notation()) {
|
switch (number_format.notation()) {
|
||||||
|
|
|
@ -220,6 +220,6 @@ ThrowCompletionOr<void> set_number_format_unit_options(GlobalObject& global_obje
|
||||||
Optional<Variant<StringView, String>> get_number_format_pattern(NumberFormat& number_format, double number, Unicode::NumberFormat& found_pattern);
|
Optional<Variant<StringView, String>> get_number_format_pattern(NumberFormat& number_format, double number, Unicode::NumberFormat& found_pattern);
|
||||||
Optional<StringView> get_notation_sub_pattern(NumberFormat& number_format, int exponent);
|
Optional<StringView> get_notation_sub_pattern(NumberFormat& number_format, int exponent);
|
||||||
int compute_exponent(NumberFormat& number_format, double number);
|
int compute_exponent(NumberFormat& number_format, double number);
|
||||||
int compute_exponent_for_magniude(NumberFormat& number_format, int magnitude);
|
int compute_exponent_for_magnitude(NumberFormat& number_format, int magnitude);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -563,7 +563,7 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::symbol_match)
|
||||||
|
|
||||||
// 3. If matchStr is the empty String, then
|
// 3. If matchStr is the empty String, then
|
||||||
if (match_str.is_empty()) {
|
if (match_str.is_empty()) {
|
||||||
// Stepsp 3a-3c are implemented by increment_last_index.
|
// Steps 3a-3c are implemented by increment_last_index.
|
||||||
TRY(increment_last_index(global_object, *regexp_object, string.view(), full_unicode));
|
TRY(increment_last_index(global_object, *regexp_object, string.view(), full_unicode));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -682,7 +682,7 @@ JS_DEFINE_NATIVE_FUNCTION(RegExpPrototype::symbol_replace)
|
||||||
|
|
||||||
// 2. If matchStr is the empty String, then
|
// 2. If matchStr is the empty String, then
|
||||||
if (match_str.is_empty()) {
|
if (match_str.is_empty()) {
|
||||||
// Stepsp 2a-2c are implemented by increment_last_index.
|
// Steps 2a-2c are implemented by increment_last_index.
|
||||||
TRY(increment_last_index(global_object, *regexp_object, string.view(), full_unicode));
|
TRY(increment_last_index(global_object, *regexp_object, string.view(), full_unicode));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -273,7 +273,7 @@ describe("dayPeriod", () => {
|
||||||
|
|
||||||
describe("hour", () => {
|
describe("hour", () => {
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
// FIXME: The 2-digit results are supposed to include {ampm}. These results are acheived from the "HH"
|
// FIXME: The 2-digit results are supposed to include {ampm}. These results are achieved from the "HH"
|
||||||
// pattern, which should only be applied to 24-hour cycles.
|
// pattern, which should only be applied to 24-hour cycles.
|
||||||
const data = [
|
const data = [
|
||||||
{ hour: "2-digit", en0: "05", en1: "07", ar0: "٠٥", ar1: "٠٧" },
|
{ hour: "2-digit", en0: "05", en1: "07", ar0: "٠٥", ar1: "٠٧" },
|
||||||
|
|
|
@ -3,7 +3,7 @@ test("length is 2", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("errors", () => {
|
describe("errors", () => {
|
||||||
test("non-object protpotype value", () => {
|
test("non-object prototype value", () => {
|
||||||
expect(() => Object.create(42)).toThrowWithMessage(
|
expect(() => Object.create(42)).toThrowWithMessage(
|
||||||
TypeError,
|
TypeError,
|
||||||
"Prototype must be an object or null"
|
"Prototype must be an object or null"
|
||||||
|
|
|
@ -64,7 +64,7 @@ describe("only allowed in async functions", () => {
|
||||||
expect("(function* () { for await (const v of []) return v; })").not.toEval();
|
expect("(function* () { for await (const v of []) return v; })").not.toEval();
|
||||||
});
|
});
|
||||||
|
|
||||||
test("async genrator functions", () => {
|
test("async generator functions", () => {
|
||||||
expect("async function* foo() { for await (const v of []) yield v; }").toEval();
|
expect("async function* foo() { for await (const v of []) yield v; }").toEval();
|
||||||
expect("(async function* () { for await (const v of []) yield v; })").toEval();
|
expect("(async function* () { for await (const v of []) yield v; })").toEval();
|
||||||
});
|
});
|
||||||
|
|
|
@ -139,7 +139,7 @@ private:
|
||||||
bool punct_before;
|
bool punct_before;
|
||||||
bool punct_after;
|
bool punct_after;
|
||||||
// is_run indicates that this token is a 'delimiter run'. A delimiter
|
// is_run indicates that this token is a 'delimiter run'. A delimiter
|
||||||
// run occurs when several of the same sytactical character ('`', '_',
|
// run occurs when several of the same syntactical character ('`', '_',
|
||||||
// or '*') occur in a row.
|
// or '*') occur in a row.
|
||||||
bool is_run;
|
bool is_run;
|
||||||
|
|
||||||
|
|
|
@ -615,12 +615,12 @@ void Device::draw_primitives(PrimitiveType primitive_type, FloatMatrix4x4 const&
|
||||||
// At this point, the user has effectively specified that they are done with defining the geometry
|
// At this point, the user has effectively specified that they are done with defining the geometry
|
||||||
// of what they want to draw. We now need to do a few things (https://www.khronos.org/opengl/wiki/Rendering_Pipeline_Overview):
|
// of what they want to draw. We now need to do a few things (https://www.khronos.org/opengl/wiki/Rendering_Pipeline_Overview):
|
||||||
//
|
//
|
||||||
// 1. Transform all of the vertices in the current vertex list into eye space by mulitplying the model-view matrix
|
// 1. Transform all of the vertices in the current vertex list into eye space by multiplying the model-view matrix
|
||||||
// 2. Transform all of the vertices from eye space into clip space by multiplying by the projection matrix
|
// 2. Transform all of the vertices from eye space into clip space by multiplying by the projection matrix
|
||||||
// 3. If culling is enabled, we cull the desired faces (https://learnopengl.com/Advanced-OpenGL/Face-culling)
|
// 3. If culling is enabled, we cull the desired faces (https://learnopengl.com/Advanced-OpenGL/Face-culling)
|
||||||
// 4. Each element of the vertex is then divided by w to bring the positions into NDC (Normalized Device Coordinates)
|
// 4. Each element of the vertex is then divided by w to bring the positions into NDC (Normalized Device Coordinates)
|
||||||
// 5. The vertices are sorted (for the rasteriser, how are we doing this? 3Dfx did this top to bottom in terms of vertex y coordinates)
|
// 5. The vertices are sorted (for the rasterizer, how are we doing this? 3Dfx did this top to bottom in terms of vertex y coordinates)
|
||||||
// 6. The vertices are then sent off to the rasteriser and drawn to the screen
|
// 6. The vertices are then sent off to the rasterizer and drawn to the screen
|
||||||
|
|
||||||
float scr_width = m_render_target->width();
|
float scr_width = m_render_target->width();
|
||||||
float scr_height = m_render_target->height();
|
float scr_height = m_render_target->height();
|
||||||
|
|
|
@ -177,7 +177,7 @@ public:
|
||||||
JS::Value run_javascript(StringView source, StringView filename = "(unknown)");
|
JS::Value run_javascript(StringView source, StringView filename = "(unknown)");
|
||||||
|
|
||||||
NonnullRefPtr<Element> create_element(const String& tag_name);
|
NonnullRefPtr<Element> create_element(const String& tag_name);
|
||||||
NonnullRefPtr<Element> create_element_ns(const String& namespace_, const String& qualifed_name);
|
NonnullRefPtr<Element> create_element_ns(const String& namespace_, const String& qualified_name);
|
||||||
NonnullRefPtr<DocumentFragment> create_document_fragment();
|
NonnullRefPtr<DocumentFragment> create_document_fragment();
|
||||||
NonnullRefPtr<Text> create_text_node(const String& data);
|
NonnullRefPtr<Text> create_text_node(const String& data);
|
||||||
NonnullRefPtr<Comment> create_comment(const String& data);
|
NonnullRefPtr<Comment> create_comment(const String& data);
|
||||||
|
|
|
@ -546,7 +546,7 @@ static void build_sse_f3(u8 op, const char* mnemonic, InstructionFormat format,
|
||||||
build_slash_rm(0xD9, 5, 0xED, "FLDLN2", OP_FPU, &Interpreter::FLDLN2);
|
build_slash_rm(0xD9, 5, 0xED, "FLDLN2", OP_FPU, &Interpreter::FLDLN2);
|
||||||
build_slash_rm(0xD9, 5, 0xEE, "FLDZ", OP_FPU, &Interpreter::FLDZ);
|
build_slash_rm(0xD9, 5, 0xEE, "FLDZ", OP_FPU, &Interpreter::FLDZ);
|
||||||
build_slash(0xD9, 6, "FNSTENV", OP_FPU_RM32, &Interpreter::FNSTENV);
|
build_slash(0xD9, 6, "FNSTENV", OP_FPU_RM32, &Interpreter::FNSTENV);
|
||||||
// FIXME: Extraodinary prefix 0x9B + 0xD9/6: FSTENV
|
// FIXME: Extraordinary prefix 0x9B + 0xD9/6: FSTENV
|
||||||
build_slash_rm(0xD9, 6, 0xF0, "F2XM1", OP_FPU, &Interpreter::F2XM1);
|
build_slash_rm(0xD9, 6, 0xF0, "F2XM1", OP_FPU, &Interpreter::F2XM1);
|
||||||
build_slash_rm(0xD9, 6, 0xF1, "FYL2X", OP_FPU, &Interpreter::FYL2X);
|
build_slash_rm(0xD9, 6, 0xF1, "FYL2X", OP_FPU, &Interpreter::FYL2X);
|
||||||
build_slash_rm(0xD9, 6, 0xF2, "FPTAN", OP_FPU, &Interpreter::FPTAN);
|
build_slash_rm(0xD9, 6, 0xF2, "FPTAN", OP_FPU, &Interpreter::FPTAN);
|
||||||
|
@ -556,7 +556,7 @@ static void build_sse_f3(u8 op, const char* mnemonic, InstructionFormat format,
|
||||||
build_slash_rm(0xD9, 6, 0xF6, "FDECSTP", OP_FPU, &Interpreter::FDECSTP);
|
build_slash_rm(0xD9, 6, 0xF6, "FDECSTP", OP_FPU, &Interpreter::FDECSTP);
|
||||||
build_slash_rm(0xD9, 6, 0xF7, "FINCSTP", OP_FPU, &Interpreter::FINCSTP);
|
build_slash_rm(0xD9, 6, 0xF7, "FINCSTP", OP_FPU, &Interpreter::FINCSTP);
|
||||||
build_slash(0xD9, 7, "FNSTCW", OP_FPU_RM16, &Interpreter::FNSTCW);
|
build_slash(0xD9, 7, "FNSTCW", OP_FPU_RM16, &Interpreter::FNSTCW);
|
||||||
// FIXME: Extraodinary prefix 0x9B + 0xD9/7: FSTCW
|
// FIXME: Extraordinary prefix 0x9B + 0xD9/7: FSTCW
|
||||||
build_slash_rm(0xD9, 7, 0xF8, "FPREM", OP_FPU, &Interpreter::FPREM);
|
build_slash_rm(0xD9, 7, 0xF8, "FPREM", OP_FPU, &Interpreter::FPREM);
|
||||||
build_slash_rm(0xD9, 7, 0xF9, "FYL2XP1", OP_FPU, &Interpreter::FYL2XP1);
|
build_slash_rm(0xD9, 7, 0xF9, "FYL2XP1", OP_FPU, &Interpreter::FYL2XP1);
|
||||||
build_slash_rm(0xD9, 7, 0xFA, "FSQRT", OP_FPU, &Interpreter::FSQRT);
|
build_slash_rm(0xD9, 7, 0xFA, "FSQRT", OP_FPU, &Interpreter::FSQRT);
|
||||||
|
@ -592,9 +592,9 @@ static void build_sse_f3(u8 op, const char* mnemonic, InstructionFormat format,
|
||||||
build_slash_rm(0xDB, 4, 0xE0, "FNENI", OP_FPU_reg, &Interpreter::FNENI);
|
build_slash_rm(0xDB, 4, 0xE0, "FNENI", OP_FPU_reg, &Interpreter::FNENI);
|
||||||
build_slash_rm(0xDB, 4, 0xE1, "FNDISI", OP_FPU_reg, &Interpreter::FNDISI);
|
build_slash_rm(0xDB, 4, 0xE1, "FNDISI", OP_FPU_reg, &Interpreter::FNDISI);
|
||||||
build_slash_rm(0xDB, 4, 0xE2, "FNCLEX", OP_FPU_reg, &Interpreter::FNCLEX);
|
build_slash_rm(0xDB, 4, 0xE2, "FNCLEX", OP_FPU_reg, &Interpreter::FNCLEX);
|
||||||
// FIXME: Extraodinary prefix 0x9B + 0xDB/4: FCLEX
|
// FIXME: Extraordinary prefix 0x9B + 0xDB/4: FCLEX
|
||||||
build_slash_rm(0xDB, 4, 0xE3, "FNINIT", OP_FPU_reg, &Interpreter::FNINIT);
|
build_slash_rm(0xDB, 4, 0xE3, "FNINIT", OP_FPU_reg, &Interpreter::FNINIT);
|
||||||
// FIXME: Extraodinary prefix 0x9B + 0xDB/4: FINIT
|
// FIXME: Extraordinary prefix 0x9B + 0xDB/4: FINIT
|
||||||
build_slash_rm(0xDB, 4, 0xE4, "FNSETPM", OP_FPU_reg, &Interpreter::FNSETPM);
|
build_slash_rm(0xDB, 4, 0xE4, "FNSETPM", OP_FPU_reg, &Interpreter::FNSETPM);
|
||||||
build_slash(0xDB, 5, "FLD", OP_FPU_M80, &Interpreter::FLD_RM80);
|
build_slash(0xDB, 5, "FLD", OP_FPU_M80, &Interpreter::FLD_RM80);
|
||||||
build_slash_reg(0xDB, 5, "FUCOMI", OP_FPU_reg, &Interpreter::FUCOMI);
|
build_slash_reg(0xDB, 5, "FUCOMI", OP_FPU_reg, &Interpreter::FUCOMI);
|
||||||
|
@ -622,9 +622,9 @@ static void build_sse_f3(u8 op, const char* mnemonic, InstructionFormat format,
|
||||||
build_slash(0xDD, 5, "FUCOMP", OP_FPU_reg, &Interpreter::FUCOMP);
|
build_slash(0xDD, 5, "FUCOMP", OP_FPU_reg, &Interpreter::FUCOMP);
|
||||||
// FIXME: DD/5 E9 (...but isn't this what DD/5 does naturally, with E9 just being normal R/M?)
|
// FIXME: DD/5 E9 (...but isn't this what DD/5 does naturally, with E9 just being normal R/M?)
|
||||||
build_slash(0xDD, 6, "FNSAVE", OP_FPU_mem, &Interpreter::FNSAVE);
|
build_slash(0xDD, 6, "FNSAVE", OP_FPU_mem, &Interpreter::FNSAVE);
|
||||||
// FIXME: Extraodinary prefix 0x9B + 0xDD/6: FSAVE
|
// FIXME: Extraordinary prefix 0x9B + 0xDD/6: FSAVE
|
||||||
build_slash(0xDD, 7, "FNSTSW", OP_FPU_RM16, &Interpreter::FNSTSW);
|
build_slash(0xDD, 7, "FNSTSW", OP_FPU_RM16, &Interpreter::FNSTSW);
|
||||||
// FIXME: Extraodinary prefix 0x9B + 0xDD/7: FSTSW
|
// FIXME: Extraordinary prefix 0x9B + 0xDD/7: FSTSW
|
||||||
|
|
||||||
build_slash(0xDE, 0, "FIADD", OP_FPU_RM16, &Interpreter::FIADD_RM16);
|
build_slash(0xDE, 0, "FIADD", OP_FPU_RM16, &Interpreter::FIADD_RM16);
|
||||||
build_slash_reg(0xDE, 0, "FADDP", OP_FPU_reg, &Interpreter::FADDP);
|
build_slash_reg(0xDE, 0, "FADDP", OP_FPU_reg, &Interpreter::FADDP);
|
||||||
|
@ -659,7 +659,7 @@ static void build_sse_f3(u8 op, const char* mnemonic, InstructionFormat format,
|
||||||
build_slash_reg(0xDF, 3, "FSTP9", OP_FPU_reg, &Interpreter::FSTP_RM32);
|
build_slash_reg(0xDF, 3, "FSTP9", OP_FPU_reg, &Interpreter::FSTP_RM32);
|
||||||
build_slash(0xDF, 4, "FBLD", OP_FPU_M80, &Interpreter::FBLD_M80);
|
build_slash(0xDF, 4, "FBLD", OP_FPU_M80, &Interpreter::FBLD_M80);
|
||||||
build_slash_reg(0xDF, 4, "FNSTSW", OP_FPU_AX16, &Interpreter::FNSTSW_AX);
|
build_slash_reg(0xDF, 4, "FNSTSW", OP_FPU_AX16, &Interpreter::FNSTSW_AX);
|
||||||
// FIXME: Extraodinary prefix 0x9B + 0xDF/e: FSTSW_AX
|
// FIXME: Extraordinary prefix 0x9B + 0xDF/e: FSTSW_AX
|
||||||
build_slash(0xDF, 5, "FILD", OP_FPU_RM64, &Interpreter::FILD_RM64);
|
build_slash(0xDF, 5, "FILD", OP_FPU_RM64, &Interpreter::FILD_RM64);
|
||||||
build_slash_reg(0xDF, 5, "FUCOMIP", OP_FPU_reg, &Interpreter::FUCOMIP);
|
build_slash_reg(0xDF, 5, "FUCOMIP", OP_FPU_reg, &Interpreter::FUCOMIP);
|
||||||
build_slash(0xDF, 6, "FBSTP", OP_FPU_M80, &Interpreter::FBSTP_M80);
|
build_slash(0xDF, 6, "FBSTP", OP_FPU_M80, &Interpreter::FBSTP_M80);
|
||||||
|
@ -828,7 +828,7 @@ static void build_sse_f3(u8 op, const char* mnemonic, InstructionFormat format,
|
||||||
build_0f_slash(0x18, 2, "PREFETCHT1", OP_RM8, &Interpreter::PREFETCHT1);
|
build_0f_slash(0x18, 2, "PREFETCHT1", OP_RM8, &Interpreter::PREFETCHT1);
|
||||||
build_0f_slash(0x18, 3, "PREFETCHT2", OP_RM8, &Interpreter::PREFETCHT2);
|
build_0f_slash(0x18, 3, "PREFETCHT2", OP_RM8, &Interpreter::PREFETCHT2);
|
||||||
|
|
||||||
// FIXME: Techinically NoPrefix (sse_np_slash?)
|
// FIXME: Technically NoPrefix (sse_np_slash?)
|
||||||
build_0f_slash(0xAE, 2, "LDMXCSR", OP_RM32, &Interpreter::LDMXCSR);
|
build_0f_slash(0xAE, 2, "LDMXCSR", OP_RM32, &Interpreter::LDMXCSR);
|
||||||
build_0f_slash(0xAE, 3, "STMXCSR", OP_RM32, &Interpreter::STMXCSR);
|
build_0f_slash(0xAE, 3, "STMXCSR", OP_RM32, &Interpreter::STMXCSR);
|
||||||
// FIXME: SFENCE: NP 0F AE F8
|
// FIXME: SFENCE: NP 0F AE F8
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
@GUI::ImageWidget {
|
@GUI::ImageWidget {
|
||||||
name: "banner"
|
name: "banner"
|
||||||
auto_resie: true
|
auto_resize: true
|
||||||
}
|
}
|
||||||
|
|
||||||
@GUI::Widget {
|
@GUI::Widget {
|
||||||
|
|
|
@ -54,7 +54,7 @@ int main(int argc, char** argv)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If pw is not NULL it means we ended prematuraly, aka. the group was found as primary group of an user
|
// If pw is not NULL it means we ended prematurely, aka. the group was found as primary group of an user
|
||||||
if (pw) {
|
if (pw) {
|
||||||
warnln("cannot remove the primary group of user '{}'", pw->pw_name);
|
warnln("cannot remove the primary group of user '{}'", pw->pw_name);
|
||||||
endpwent();
|
endpwent();
|
||||||
|
|
|
@ -152,7 +152,7 @@ public:
|
||||||
size_t real_n = line_subline_add(m_line, m_subline, n);
|
size_t real_n = line_subline_add(m_line, m_subline, n);
|
||||||
|
|
||||||
// If we are moving less than a screen down, just draw the extra lines
|
// If we are moving less than a screen down, just draw the extra lines
|
||||||
// for efficency and more(1) compatibility.
|
// for efficiency and more(1) compatibility.
|
||||||
if (n < m_height - 1) {
|
if (n < m_height - 1) {
|
||||||
size_t line = m_line;
|
size_t line = m_line;
|
||||||
size_t subline = m_subline;
|
size_t subline = m_subline;
|
||||||
|
|
|
@ -29,7 +29,7 @@ static void test_getenv_preexisting()
|
||||||
assert_env("HOME", "/home/anon");
|
assert_env("HOME", "/home/anon");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_puttenv()
|
static void test_putenv()
|
||||||
{
|
{
|
||||||
char* to_put = strdup("PUTENVTEST=HELLOPUTENV");
|
char* to_put = strdup("PUTENVTEST=HELLOPUTENV");
|
||||||
int rc = putenv(to_put);
|
int rc = putenv(to_put);
|
||||||
|
@ -41,7 +41,7 @@ static void test_puttenv()
|
||||||
// Do not free `to_put`!
|
// Do not free `to_put`!
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_settenv()
|
static void test_setenv()
|
||||||
{
|
{
|
||||||
int rc = setenv("SETENVTEST", "HELLO SETENV!", 0);
|
int rc = setenv("SETENVTEST", "HELLO SETENV!", 0);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
|
@ -66,7 +66,7 @@ static void test_settenv()
|
||||||
assert_env("SETENVTEST", "Goodbye, friend!");
|
assert_env("SETENVTEST", "Goodbye, friend!");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_settenv_overwrite_empty()
|
static void test_setenv_overwrite_empty()
|
||||||
{
|
{
|
||||||
int rc = setenv("EMPTYTEST", "Forcefully overwrite non-existing envvar", 1);
|
int rc = setenv("EMPTYTEST", "Forcefully overwrite non-existing envvar", 1);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
|
@ -85,9 +85,9 @@ int main(int, char**)
|
||||||
outln("Success!"); \
|
outln("Success!"); \
|
||||||
}
|
}
|
||||||
RUNTEST(test_getenv_preexisting);
|
RUNTEST(test_getenv_preexisting);
|
||||||
RUNTEST(test_puttenv);
|
RUNTEST(test_putenv);
|
||||||
RUNTEST(test_settenv);
|
RUNTEST(test_setenv);
|
||||||
RUNTEST(test_settenv_overwrite_empty);
|
RUNTEST(test_setenv_overwrite_empty);
|
||||||
outln("PASS");
|
outln("PASS");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue