Bug 1619445 - Remove isDefaultClassConstructor immutable flag. r=tcampbell

Differential Revision: https://phabricator.services.mozilla.com/D65274

--HG--
extra : moz-landing-system : lando
This commit is contained in:
caroline 2020-03-12 22:26:55 +00:00
Родитель 40bbb73e7b
Коммит 2d11c8319b
4 изменённых файлов: 12 добавлений и 18 удалений

Просмотреть файл

@ -1401,7 +1401,6 @@ void JSScript::setDefaultClassConstructorSpan(
js::ScriptSourceObject* sourceObject, uint32_t start, uint32_t end, js::ScriptSourceObject* sourceObject, uint32_t start, uint32_t end,
unsigned line, unsigned column) { unsigned line, unsigned column) {
MOZ_ASSERT(compartment() == sourceObject->compartment()); MOZ_ASSERT(compartment() == sourceObject->compartment());
MOZ_ASSERT(isDefaultClassConstructor());
sourceObject_ = sourceObject; sourceObject_ = sourceObject;
extent_.toStringStart = start; extent_.toStringStart = start;
extent_.toStringEnd = end; extent_.toStringEnd = end;

Просмотреть файл

@ -2229,8 +2229,6 @@ setterLevel: \
IMMUTABLE_FLAG_GETTER_SETTER_PUBLIC(needsHomeObject, NeedsHomeObject) IMMUTABLE_FLAG_GETTER_SETTER_PUBLIC(needsHomeObject, NeedsHomeObject)
IMMUTABLE_FLAG_GETTER_SETTER_PUBLIC(isDerivedClassConstructor, IMMUTABLE_FLAG_GETTER_SETTER_PUBLIC(isDerivedClassConstructor,
IsDerivedClassConstructor) IsDerivedClassConstructor)
IMMUTABLE_FLAG_GETTER_SETTER_PUBLIC(isDefaultClassConstructor,
IsDefaultClassConstructor)
IMMUTABLE_FLAG_GETTER_SETTER_PUBLIC(isLikelyConstructorWrapper, IMMUTABLE_FLAG_GETTER_SETTER_PUBLIC(isLikelyConstructorWrapper,
IsLikelyConstructorWrapper) IsLikelyConstructorWrapper)
IMMUTABLE_FLAG_GETTER(isGenerator, IsGenerator) IMMUTABLE_FLAG_GETTER(isGenerator, IsGenerator)

Просмотреть файл

@ -532,8 +532,6 @@ static bool intrinsic_MakeDefaultConstructor(JSContext* cx, unsigned argc,
RootedFunction ctor(cx, &args[0].toObject().as<JSFunction>()); RootedFunction ctor(cx, &args[0].toObject().as<JSFunction>());
ctor->baseScript()->setIsDefaultClassConstructor();
// Because self-hosting code does not allow top-level lexicals, // Because self-hosting code does not allow top-level lexicals,
// class constructors are class expressions in top-level vars. // class constructors are class expressions in top-level vars.
// Because of this, we give them an inferred atom. Since they // Because of this, we give them an inferred atom. Since they

Просмотреть файл

@ -99,45 +99,44 @@ enum class ImmutableScriptFlagsEnum : uint32_t {
NeedsHomeObject = 1 << 13, NeedsHomeObject = 1 << 13,
IsDerivedClassConstructor = 1 << 14, IsDerivedClassConstructor = 1 << 14,
IsDefaultClassConstructor = 1 << 15,
// 'this', 'arguments' and f.apply() are used. This is likely to be a // 'this', 'arguments' and f.apply() are used. This is likely to be a
// wrapper. // wrapper.
IsLikelyConstructorWrapper = 1 << 16, IsLikelyConstructorWrapper = 1 << 15,
// Set if this function is a generator function or async generator. // Set if this function is a generator function or async generator.
IsGenerator = 1 << 17, IsGenerator = 1 << 16,
// Set if this function is an async function or async generator. // Set if this function is an async function or async generator.
IsAsync = 1 << 18, IsAsync = 1 << 17,
// Set if this function has a rest parameter. // Set if this function has a rest parameter.
HasRest = 1 << 19, HasRest = 1 << 18,
// See comments below. // See comments below.
ArgumentsHasVarBinding = 1 << 20, ArgumentsHasVarBinding = 1 << 19,
// Script came from eval(). // Script came from eval().
IsForEval = 1 << 21, IsForEval = 1 << 20,
// Whether this is a top-level module script. // Whether this is a top-level module script.
IsModule = 1 << 22, IsModule = 1 << 21,
// Whether this function needs a call object or named lambda environment. // Whether this function needs a call object or named lambda environment.
NeedsFunctionEnvironmentObjects = 1 << 23, NeedsFunctionEnvironmentObjects = 1 << 22,
// Whether the Parser declared 'arguments'. // Whether the Parser declared 'arguments'.
ShouldDeclareArguments = 1 << 24, ShouldDeclareArguments = 1 << 23,
// Script is for function. // Script is for function.
IsFunction = 1 << 25, IsFunction = 1 << 24,
// Whether this script contains a direct eval statement. // Whether this script contains a direct eval statement.
HasDirectEval = 1 << 26, HasDirectEval = 1 << 25,
// Whether this BaseScript is a LazyScript. This flag will be removed after // Whether this BaseScript is a LazyScript. This flag will be removed after
// LazyScript and JSScript are merged in Bug 1529456. // LazyScript and JSScript are merged in Bug 1529456.
IsLazyScript = 1 << 27, IsLazyScript = 1 << 26,
}; };
class ImmutableScriptFlags : public ScriptFlagBase<ImmutableScriptFlagsEnum> { class ImmutableScriptFlags : public ScriptFlagBase<ImmutableScriptFlagsEnum> {