1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 07:15:07 +00:00
serenity/Meta/gn/secondary/Userland/Libraries/LibJS
Andreas Kling 4bbb0a5c35 LibJS: Add ConservativeVector<T>
This works very similarly to MarkedVector<T>, but instead of expecting
T to be Value or a GC-allocated pointer type, T can be anything.
Every pointer-sized value in the vector's storage will be checked during
conservative root scanning.

In other words, this allows you to put something like this in a
ConservativeVector<Foo> and it will be protected from GC:

    struct Foo {
        i64 number;
        Value some_value;
        GCPtr<Object> some_object;
    };
2024-02-22 16:44:54 +01:00
..
BUILD.gn LibJS: Add ConservativeVector<T> 2024-02-22 16:44:54 +01:00