summaryrefslogtreecommitdiffstats
path: root/js/src/frontend/SharedContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/frontend/SharedContext.h')
-rw-r--r--js/src/frontend/SharedContext.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/src/frontend/SharedContext.h b/js/src/frontend/SharedContext.h
index 12f9a6ed12..ab0606527e 100644
--- a/js/src/frontend/SharedContext.h
+++ b/js/src/frontend/SharedContext.h
@@ -180,6 +180,10 @@ class SharedContext {
// FunctionBox::copyUpdated* methods.
bool isScriptExtraFieldCopiedToStencil : 1;
+ // Indicates this shared context is eligible to use JSOp::ArgumentsLength
+ // when emitting the ArgumentsLength parse node.
+ bool eligibleForArgumentsLength : 1;
+
// End of fields.
enum class Kind : uint8_t { FunctionBox, Global, Eval, Module };
@@ -273,6 +277,11 @@ class SharedContext {
return retVal;
}
+ bool isEligibleForArgumentsLength() {
+ return eligibleForArgumentsLength && !bindingsAccessedDynamically();
+ }
+ void setIneligibleForArgumentsLength() { eligibleForArgumentsLength = false; }
+
void copyScriptExtraFields(ScriptStencilExtra& scriptExtra);
};