mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-02 04:27:12 +02:00
LibJS: Store ECMAScriptFunctionObject bytecode in an OwnPtr
Using an Optional was extremely wasteful for function objects that don't even have a bytecode executable. This allows ECMAScriptFunctionObject to fit in a smaller size class.
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 19:55:50 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/7a742b17da1
@@ -103,7 +103,7 @@ private:
|
||||
ThrowCompletionOr<void> function_declaration_instantiation(Interpreter*);
|
||||
|
||||
FlyString m_name;
|
||||
Optional<Bytecode::Executable> m_bytecode_executable;
|
||||
OwnPtr<Bytecode::Executable> m_bytecode_executable;
|
||||
i32 m_function_length { 0 };
|
||||
|
||||
// Internal Slots of ECMAScript Function Objects, https://tc39.es/ecma262/#table-internal-slots-of-ecmascript-function-objects
|
||||
|
||||
Reference in New Issue
Block a user