mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:17:36 +00: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:
parent
8d3f92c844
commit
7a742b17da
8 changed files with 33 additions and 28 deletions
|
@ -23,7 +23,7 @@ namespace JS::Bytecode {
|
|||
|
||||
class Generator {
|
||||
public:
|
||||
static Executable generate(ASTNode const&, FunctionKind = FunctionKind::Normal);
|
||||
static NonnullOwnPtr<Executable> generate(ASTNode const&, FunctionKind = FunctionKind::Normal);
|
||||
|
||||
Register allocate_register();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue