LibJS: Add ClassBlueprint data structures

Introduce ClassBlueprint and ClassElementDescriptor structs that will
replace the AST-backed class construction path. ClassBlueprint stores
pre-compiled function data indices and element metadata, following the
same pattern as SharedFunctionInstanceData for NewFunction.

Add Vector<ClassBlueprint> to Executable for storage.

No behavioral change.
This commit is contained in:
Andreas Kling
2026-02-11 00:15:19 +01:00
committed by Andreas Kling
parent 6b0003b057
commit f2df6b2531
Notes: github-actions[bot] 2026-02-11 23:01:41 +00:00
2 changed files with 46 additions and 0 deletions

View File

@@ -12,6 +12,7 @@
#include <LibGC/CellAllocator.h>
#include <LibGC/Weak.h>
#include <LibGC/WeakInlines.h>
#include <LibJS/Bytecode/ClassBlueprint.h>
#include <LibJS/Bytecode/IdentifierTable.h>
#include <LibJS/Bytecode/Label.h>
#include <LibJS/Bytecode/Operand.h>
@@ -131,6 +132,7 @@ public:
Vector<Value> constants;
Vector<GC::Ptr<SharedFunctionInstanceData>> shared_function_data;
Vector<ClassBlueprint> class_blueprints;
NonnullRefPtr<SourceCode const> source_code;
u32 number_of_registers { 0 };