| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index fc7dcff4549b608c8cadf09b14d0630c99d4ef60..9de5acb8b04e626d4423a07f384aa1443dc2564a 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -7704,18 +7704,9 @@ class SharedFunctionInfo: public HeapObject {
|
| kDontFlush,
|
| // byte 2
|
| kFunctionKind,
|
| - kIsArrow = kFunctionKind,
|
| - kIsGenerator,
|
| - kIsConciseMethod,
|
| - kIsDefaultConstructor,
|
| - kIsSubclassConstructor,
|
| - kIsBaseConstructor,
|
| - kIsGetterFunction,
|
| - kIsSetterFunction,
|
| + // rest of byte 2 and first two bits of byte 3 are used by FunctionKind
|
| // byte 3
|
| - kIsAsyncFunction,
|
| - kIsModule,
|
| - kDeserialized,
|
| + kDeserialized = kFunctionKind + 10,
|
| kIsDeclaration,
|
| kIsAsmWasmBroken,
|
| kRequiresClassFieldInit,
|
| @@ -7724,23 +7715,8 @@ class SharedFunctionInfo: public HeapObject {
|
| };
|
| // kFunctionKind has to be byte-aligned
|
| STATIC_ASSERT((kFunctionKind % kBitsPerByte) == 0);
|
| -// Make sure that FunctionKind and byte 2 are in sync:
|
| -#define ASSERT_FUNCTION_KIND_ORDER(functionKind, compilerFunctionKind) \
|
| - STATIC_ASSERT(FunctionKind::functionKind == \
|
| - 1 << (compilerFunctionKind - kFunctionKind))
|
| - ASSERT_FUNCTION_KIND_ORDER(kArrowFunction, kIsArrow);
|
| - ASSERT_FUNCTION_KIND_ORDER(kGeneratorFunction, kIsGenerator);
|
| - ASSERT_FUNCTION_KIND_ORDER(kConciseMethod, kIsConciseMethod);
|
| - ASSERT_FUNCTION_KIND_ORDER(kDefaultConstructor, kIsDefaultConstructor);
|
| - ASSERT_FUNCTION_KIND_ORDER(kSubclassConstructor, kIsSubclassConstructor);
|
| - ASSERT_FUNCTION_KIND_ORDER(kBaseConstructor, kIsBaseConstructor);
|
| - ASSERT_FUNCTION_KIND_ORDER(kGetterFunction, kIsGetterFunction);
|
| - ASSERT_FUNCTION_KIND_ORDER(kSetterFunction, kIsSetterFunction);
|
| - ASSERT_FUNCTION_KIND_ORDER(kAsyncFunction, kIsAsyncFunction);
|
| - ASSERT_FUNCTION_KIND_ORDER(kModule, kIsModule);
|
| -#undef ASSERT_FUNCTION_KIND_ORDER
|
| -
|
| - class FunctionKindBits : public BitField<FunctionKind, kIsArrow, 10> {};
|
| +
|
| + class FunctionKindBits : public BitField<FunctionKind, kFunctionKind, 10> {};
|
|
|
| class DeoptCountBits : public BitField<int, 0, 4> {};
|
| class OptReenableTriesBits : public BitField<int, 4, 18> {};
|
| @@ -7772,21 +7748,10 @@ class SharedFunctionInfo: public HeapObject {
|
| static const int kHasDuplicateParametersBit =
|
| kHasDuplicateParameters + kCompilerHintsSmiTagSize;
|
|
|
| - static const int kIsArrowBit = kIsArrow + kCompilerHintsSmiTagSize;
|
| - static const int kIsGeneratorBit = kIsGenerator + kCompilerHintsSmiTagSize;
|
| - static const int kIsConciseMethodBit =
|
| - kIsConciseMethod + kCompilerHintsSmiTagSize;
|
| - static const int kIsAsyncFunctionBit =
|
| - kIsAsyncFunction + kCompilerHintsSmiTagSize;
|
| -
|
| - static const int kAccessorFunctionBits =
|
| - FunctionKind::kAccessorFunction
|
| - << (kFunctionKind + kCompilerHintsSmiTagSize);
|
| - static const int kClassConstructorBits =
|
| - FunctionKind::kClassConstructor
|
| - << (kFunctionKind + kCompilerHintsSmiTagSize);
|
| - static const int kFunctionKindMaskBits = FunctionKindBits::kMask
|
| - << kCompilerHintsSmiTagSize;
|
| + static const int kFunctionKindShift =
|
| + kFunctionKind + kCompilerHintsSmiTagSize;
|
| + static const int kAllFunctionKindBitsMask = FunctionKindBits::kMask
|
| + << kCompilerHintsSmiTagSize;
|
|
|
| // Constants for optimizing codegen for strict mode function and
|
| // native tests.
|
|
|