mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:27:45 +00:00
Revert "LibJS: Don't hoist functions under certain circumstances"
This reverts commit 3411d50737
.
It was causing LeakSanitizer on CI to fail, possibly due to a circular
reference.
This commit is contained in:
parent
73183ee5c4
commit
3faeabf1dc
4 changed files with 8 additions and 45 deletions
|
@ -201,18 +201,12 @@ private:
|
|||
Function,
|
||||
Block,
|
||||
};
|
||||
struct HoistableDeclaration {
|
||||
NonnullRefPtr<FunctionDeclaration> declaration;
|
||||
NonnullRefPtr<Scope> scope; // where it is actually declared
|
||||
};
|
||||
|
||||
Type type;
|
||||
RefPtr<Scope> parent;
|
||||
|
||||
NonnullRefPtrVector<FunctionDeclaration> function_declarations;
|
||||
Vector<HoistableDeclaration> hoisted_function_declarations;
|
||||
|
||||
HashTable<FlyString> lexical_declarations;
|
||||
NonnullRefPtrVector<FunctionDeclaration> hoisted_function_declarations;
|
||||
|
||||
explicit Scope(Type, RefPtr<Scope>);
|
||||
RefPtr<Scope> get_current_function_scope();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue