Commit graph

12 commits

Author SHA1 Message Date
Ali Mohammad Pur
5e1499d104 Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte
string.
As the null state has already been removed, there are no other
particularly hairy blockers in repurposing this type as a byte string
(what it _really_ is).

This commit is auto-generated:
  $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \
    Meta Ports Ladybird Tests Kernel)
  $ perl -pie 's/\bDeprecatedString\b/ByteString/g;
    s/deprecated_string/byte_string/g' $xs
  $ clang-format --style=file -i \
    $(git diff --name-only | grep \.cpp\|\.h)
  $ gn format $(git ls-files '*.gn' '*.gni')
2023-12-17 18:25:10 +03:30
Ali Mohammad Pur
4fb209d25f LibWasm: Explicitly place the paddings in the WASI API types
This makes it so we don't rely on e.g. u64 to have an 8-byte alignment,
fixing breakage on i686 systems.
2023-09-04 13:32:36 +03:30
Timothy Flynn
aff81d318b Everywhere: Run clang-format
The following command was used to clang-format these files:

    clang-format-16 -i $(find . \
        -not \( -path "./\.*" -prune \) \
        -not \( -path "./Base/*" -prune \) \
        -not \( -path "./Build/*" -prune \) \
        -not \( -path "./Toolchain/*" -prune \) \
        -not \( -path "./Ports/*" -prune \) \
        -type f -name "*.cpp" -o -name "*.h")
2023-07-08 10:32:56 +01:00
Ali Mohammad Pur
538c308357 LibWasm: Stop passing a nonzero 'mode' to open(..., O_DIRECTORY)
Bionic warns on this, but not passing the mode argument is technically
undefined behaviour (depending on the libc implementation of open), as
our LibC reads `mode` unconditionally (yolo!), just pass a zero to avoid
the UB.
2023-06-10 07:18:02 +02:00
Ali Mohammad Pur
5f999097e5 LibWasm: Implement wasi fd_read 2023-06-10 07:18:02 +02:00
Ali Mohammad Pur
ae9c40451a LibWasm: Implement wasi fd_filestat_get() 2023-06-10 07:18:02 +02:00
Ali Mohammad Pur
f62187ed5d LibWasm: Accept newly-created wasi file descriptors as well 2023-06-10 07:18:02 +02:00
Ali Mohammad Pur
a608e87ff9 LibWasm: Show wasi function arguments and result in debug mode 2023-06-10 07:18:02 +02:00
Ali Mohammad Pur
47248a3511 LibWasm: Keep track of created directory fds in path_create_directory 2023-06-10 07:18:02 +02:00
Ali Mohammad Pur
5121b368cd LibWasm: Implement the random_get() call 2023-06-10 07:18:02 +02:00
Niklas Poslovski
fcbb8d63c0 LibWasm: Change dir_fd to auto instead of int 2023-05-20 03:27:38 +03:30
Ali Mohammad Pur
7e4e9fdb8f LibWasm: Start implementing WASI
This commit starts adding support for WASI, along with the framework to
implement all the functions (though only a couple are currently
implemented).
2023-04-26 03:47:15 +03:30