1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:48:10 +00:00
serenity/Userland/Libraries
Luke Wilde 5bc3371226 LibJS: Perform received abrupt generator completions in the generator
Previously, throw and return completions would not be executed inside
the generator. This is incorrect, as throw and return need to perform
unwinds which can potentially execute more code inside the generator,
such as finally blocks.

This is done by also passing the completion type alongside the passed
in value. The continuation block will immediately extract and type and
value and perform the appropriate operation for the given type.

For normal completions, this is continuing as normal.
For throw completions, it will perform `throw <value>`.
For return completions, it will perform `return <value>`, which is a
`Yield return` in this case due to being inside a generator.

This also refactors GeneratorObject to properly send across the
completion type and value to the generator inside of trying to operate
on the completions itself.

This is a prerequisite for yield*, as it performs special iterator
operations when receiving a throw/return completion and does not
complete the generator like the regular yield would.

There's still more work to be done to make GeneratorObject::execute
be closer to the spec. It's mostly a restructuring of the existing
GeneratorObject::next_impl.
2022-11-26 12:55:59 +01:00
..
LibArchive LibArchive: Do not assert if the provided stream cannot be discarded 2022-11-23 11:19:16 +01:00
LibAudio LibAudio: Set asynchronous audio enqueuer thread to maximum priority 2022-11-25 17:01:44 -07:00
LibC LibC: Implement getgrent_r 2022-11-25 23:13:16 +01:00
LibCards Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
LibChess Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
LibCodeComprehension Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
LibCompress Everywhere: Add support for compilation under emscripten 2022-11-26 02:23:15 +03:30
LibConfig Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
LibCore Everywhere: Add support for compilation under emscripten 2022-11-26 02:23:15 +03:30
LibCoredump Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
LibCpp Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
LibCrypt LibCrypt: Clean up crypt_r 2022-11-24 10:52:10 +00:00
LibCrypto AK+LibC+LibCrypto: Move FloatExtractor to AK/FloatingPoint.h 2022-11-03 20:17:09 -06:00
LibDebug Everywhere: Remove redundant inequality comparison operators 2022-11-06 10:25:08 -07:00
LibDesktop Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
LibDeviceTree Everywhere: Remove redundant inequality comparison operators 2022-11-06 10:25:08 -07:00
LibDiff Everywhere: Explicitly link all binaries against the LibC target 2022-11-01 14:49:09 +00:00
LibDNS Userland: Properly define IPC::encode and IPC::decode specializations 2022-11-15 13:25:51 -05:00
LibDSP Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
LibEDID Everywhere: Explicitly link all binaries against the LibC target 2022-11-01 14:49:09 +00:00
LibELF LibELF: Drop the "resolve and map" all-in-one 2022-10-31 19:23:02 +00:00
LibFileSystemAccessClient Userland: Remove workarounds for LibIPC include order sensitivity 2022-11-15 13:25:51 -05:00
LibGemini Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
LibGfx LibGfx: Prevent calling to_type<T>() on Line/Point/Rect/Size<T> 2022-11-26 09:14:49 +01:00
LibGL LibGL: Use buffers in vertex pointer functions and glDrawElements 2022-11-26 09:38:13 +01:00
LibGPU Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
LibGUI LibGUI: Propagate changing an action's text to its associated buttons 2022-11-26 09:02:25 +01:00
LibHTTP LibHTTP: Always send Content-Length header in POST requests 2022-11-07 14:10:41 +01:00
LibIDL Everywhere: Remove unnecessary mutable attributes from lambdas 2022-11-19 14:37:31 +00:00
LibImageDecoderClient Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
LibIMAP Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
LibIPC LibIPC: Handle ECONNRESET when reading from the IPC socket 2022-11-24 14:37:13 +01:00
LibJS LibJS: Perform received abrupt generator completions in the generator 2022-11-26 12:55:59 +01:00
LibKeyboard Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
LibLine LibVT/LibLine: Delete words when pressing Ctrl+Backspace in Terminal 2022-11-20 03:57:17 +03:30
LibLocale Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
LibMain Everywhere: Explicitly link all binaries against the LibC target 2022-11-01 14:49:09 +00:00
LibMarkdown Everywhere: Clean up "the the" comment typos 2022-11-03 17:38:32 +00:00
LibPartition Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
LibPCIDB Everywhere: Explicitly link all binaries against the LibC target 2022-11-01 14:49:09 +00:00
LibPDF LibPDF: Fix path coordinates calculation 2022-11-26 08:56:35 +01:00
LibProtocol Userland: Remove workarounds for LibIPC include order sensitivity 2022-11-15 13:25:51 -05:00
LibRegex LibRegex: Use spans<4> to avoid allocating small vectors 2022-11-17 20:13:04 +03:30
LibSanitizer LibC: Properly implement stack protectors 2022-11-01 14:49:09 +00:00
LibSoftGPU Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
LibSQL LibSQL: Fix BTree corruption in TreeNode::split 2022-11-26 09:15:34 +01:00
LibSymbolication Everywhere: Mark dependencies of most targets as PRIVATE 2022-11-01 14:49:09 +00:00
LibSyntax Everywhere: Explicitly link all binaries against the LibC target 2022-11-01 14:49:09 +00:00
LibSystem Meta+Userland: Add ENABLE_USERSPACE_COVERAGE_COLLECTION CMake option 2022-05-02 01:46:18 +02:00
LibTest Everywhere: Add support for compilation under emscripten 2022-11-26 02:23:15 +03:30
LibTextCodec Everywhere: Explicitly link all binaries against the LibC target 2022-11-01 14:49:09 +00:00
LibThreading LibThreading: Add thread priority controls to Thread 2022-11-13 19:42:39 +00:00
LibTimeZone LibTimeZone: Resolve /etc/localtime with realpath(), not readlink() 2022-10-17 22:19:50 +02:00
LibTLS Everywhere: Clean up "the the" comment typos 2022-11-03 17:38:32 +00:00
LibUnicode Meta+LibUnicode: Avoid relocations for static unicode data 2022-11-06 17:34:06 +01:00
LibUSBDB Everywhere: Explicitly link all binaries against the LibC target 2022-11-01 14:49:09 +00:00
LibVideo LibVideo: Implement Matroska Cues for faster keyframe lookup 2022-11-25 23:28:39 +01:00
LibVT LibVT: Prevent u16 underflow when resizing terminal to a height of 1 2022-11-26 01:28:05 +01:00
LibWasm LibWasm: Avoid parsing if/block/loop instructions recursively 2022-11-26 02:23:15 +03:30
LibWeb LibWeb+WebContent: Label redirects with new FrameLoader::Type::Redirect 2022-11-26 11:03:24 +01:00
LibWebSocket LibWebSocket: Buffer incoming frame data until whole frame is available 2022-11-09 02:06:33 +01:00
LibWebView Browser: Replace history entry if loading URL because of a redirect 2022-11-26 11:03:24 +01:00
LibX86 LibX86: Use '+' format parameter to include signs for displacements 2022-11-26 12:50:38 +01:00
LibXML LibXML+LibWeb: Store the XML document's original source 2022-11-03 14:52:16 +00:00
CMakeLists.txt LibIDL+WrapperGenerator: Move IDL code into a library 2022-09-17 21:27:17 +02:00