author | Ted Campbell <tcampbell@mozilla.com> |
Mon, 16 Dec 2019 13:48:49 +0000 | |
changeset 507129 | 887237f5f3e076dd6b0f319f7ea853649772f5d9 |
parent 507128 | 42f003a501505ba037fea0fac75559d1a7bb1928 |
child 507130 | fd2b064f3c17c72a3ddd236566151f18d314d64c |
push id | 103282 |
push user | tcampbell@mozilla.com |
push date | Mon, 16 Dec 2019 14:11:43 +0000 |
treeherder | autoland@887237f5f3e0 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jandem |
bugs | 1602222 |
milestone | 73.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/js/src/vm/JSScript.h +++ b/js/src/vm/JSScript.h @@ -2094,16 +2094,21 @@ setterLevel: } void setAsyncKind(FunctionAsyncKind kind) { if (kind == FunctionAsyncKind::AsyncFunction) { setFlag(ImmutableFlags::IsAsync); } } + frontend::ParseGoal parseGoal() const { + return hasModuleGoal() ? frontend::ParseGoal::Module + : frontend::ParseGoal::Script; + } + bool hasEnclosingLazyScript() const { return warmUpData_.isEnclosingScript(); } LazyScript* enclosingLazyScript() const { return warmUpData_.toEnclosingScript(); } void setEnclosingLazyScript(LazyScript* enclosingLazyScript); @@ -3403,23 +3408,16 @@ class LazyScript : public BaseScript { void initScript(JSScript* script); JSScript* maybeScript() { return script_; } const JSScript* maybeScriptUnbarriered() const { return script_.unbarrieredGet(); } bool hasScript() const { return bool(script_); } - frontend::ParseGoal parseGoal() const { - if (hasFlag(ImmutableFlags::HasModuleGoal)) { - return frontend::ParseGoal::Module; - } - return frontend::ParseGoal::Script; - } - // Returns true if the enclosing script has ever been compiled. // Once the enclosing script is compiled, the scope chain is created. // This LazyScript is delazify-able as long as it has the enclosing scope, // even if the enclosing JSScript is GCed. // The enclosing JSScript can be GCed later if the enclosing scope is not // FunctionScope or ModuleScope. bool enclosingScriptHasEverBeenCompiled() const { return warmUpData_.isEnclosingScope();