summaryrefslogtreecommitdiffstats
path: root/js/src/vm/FunctionFlags.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /js/src/vm/FunctionFlags.h
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--js/src/vm/FunctionFlags.h28
1 files changed, 12 insertions, 16 deletions
diff --git a/js/src/vm/FunctionFlags.h b/js/src/vm/FunctionFlags.h
index 27d51c214a..558c71a6b7 100644
--- a/js/src/vm/FunctionFlags.h
+++ b/js/src/vm/FunctionFlags.h
@@ -94,6 +94,11 @@ class FunctionFlags {
BASESCRIPT = 1 << 5,
SELFHOSTLAZY = 1 << 6,
+ // This Native function has a JIT entry which emulates the
+ // js::BaseScript::jitCodeRaw mechanism. Used for Wasm functions and
+ // TrampolineNative builtins.
+ NATIVE_JIT_ENTRY = 1 << 7,
+
// Function may be called as a constructor. This corresponds in the spec as
// having a [[Construct]] internal method.
//
@@ -103,12 +108,7 @@ class FunctionFlags {
// This flag is used both by scripted functions and native functions.
//
// WARNING: This is independent from FunctionKind::ClassConstructor.
- CONSTRUCTOR = 1 << 7,
-
- // Function is either getter or setter, with "get " or "set " prefix,
- // but JSFunction::AtomSlot contains unprefixed name, and the function name
- // is lazily constructed on the first access.
- LAZY_ACCESSOR_NAME = 1 << 8,
+ CONSTRUCTOR = 1 << 8,
// Function comes from a FunctionExpression, ArrowFunction, or Function()
// call (not a FunctionDeclaration).
@@ -116,10 +116,10 @@ class FunctionFlags {
// This flag is used only by scripted functions and AsmJS.
LAMBDA = 1 << 9,
- // This Native function has a JIT entry which emulates the
- // js::BaseScript::jitCodeRaw mechanism. Used for Wasm functions and
- // TrampolineNative builtins.
- NATIVE_JIT_ENTRY = 1 << 10,
+ // Function is either getter or setter, with "get " or "set " prefix,
+ // but JSFunction::AtomSlot contains unprefixed name, and the function name
+ // is lazily constructed on the first access.
+ LAZY_ACCESSOR_NAME = 1 << 10,
// Function had no explicit name, but a name was set by SetFunctionName at
// compile time or SetFunctionName at runtime.
@@ -436,12 +436,8 @@ class FunctionFlags {
FunctionFlags& setIsGhost() { return setFlags(GHOST_FUNCTION); }
bool isGhost() const { return hasFlags(GHOST_FUNCTION); }
- static uint16_t HasJitEntryFlags(bool isConstructing) {
- uint16_t flags = BASESCRIPT | SELFHOSTLAZY;
- if (!isConstructing) {
- flags |= NATIVE_JIT_ENTRY;
- }
- return flags;
+ static constexpr uint16_t HasJitEntryFlags() {
+ return BASESCRIPT | SELFHOSTLAZY | NATIVE_JIT_ENTRY;
}
static FunctionFlags clearMutableflags(FunctionFlags flags) {