(cherry picked from commit 6be083187f49e444de1bb116bb5930b20125190b)
This commit is contained in:
Brian Smith 2023-04-08 03:27:08 -05:00 committed by roytam1
commit a8ab41b4c6
21 changed files with 238 additions and 46 deletions

View file

@ -2019,6 +2019,7 @@ class LazyScript : public gc::TenuredCell
uint32_t isDerivedClassConstructor : 1;
uint32_t needsHomeObject : 1;
uint32_t hasRest : 1;
uint32_t parseGoal : 1;
};
union {
@ -2058,7 +2059,8 @@ class LazyScript : public gc::TenuredCell
const frontend::AtomVector& closedOverBindings,
Handle<GCVector<JSFunction*, 8>> innerFunctions,
JSVersion version, uint32_t begin, uint32_t end,
uint32_t toStringStart, uint32_t lineno, uint32_t column);
uint32_t toStringStart, uint32_t lineno, uint32_t column,
frontend::ParseGoal parseGoal);
// Create a LazyScript and initialize the closedOverBindings and the
// innerFunctions with dummy values to be replaced in a later initialization
@ -2169,6 +2171,10 @@ class LazyScript : public gc::TenuredCell
p_.isExprBody = true;
}
frontend::ParseGoal parseGoal() const {
return frontend::ParseGoal(p_.parseGoal);
}
bool strict() const {
return p_.strict;
}