#pragma once
namespace JSC {
enum JSType : uint8_t {
CellType,
StringType,
SymbolType,
BigIntType,
CustomGetterSetterType,
APIValueWrapperType,
ProgramExecutableType,
ModuleProgramExecutableType,
EvalExecutableType,
FunctionExecutableType,
UnlinkedFunctionExecutableType,
UnlinkedProgramCodeBlockType,
UnlinkedModuleProgramCodeBlockType,
UnlinkedEvalCodeBlockType,
UnlinkedFunctionCodeBlockType,
CodeBlockType,
JSFixedArrayType,
JSSourceCodeType,
JSScriptFetcherType,
JSScriptFetchParametersType,
ObjectType,
FinalObjectType,
JSCalleeType,
JSFunctionType,
InternalFunctionType,
NumberObjectType,
ErrorInstanceType,
PureForwardingProxyType,
ImpureProxyType,
WithScopeType,
DirectArgumentsType,
ScopedArgumentsType,
ClonedArgumentsType,
ArrayType,
DerivedArrayType,
Int8ArrayType,
Uint8ArrayType,
Uint8ClampedArrayType,
Int16ArrayType,
Uint16ArrayType,
Int32ArrayType,
Uint32ArrayType,
Float32ArrayType,
Float64ArrayType,
DataViewType,
GetterSetterType,
GlobalObjectType,
LexicalEnvironmentType,
GlobalLexicalEnvironmentType,
ModuleEnvironmentType,
StrictEvalActivationType,
RegExpObjectType,
ProxyObjectType,
JSMapType,
JSSetType,
JSWeakMapType,
JSWeakSetType,
WebAssemblyFunctionType,
WebAssemblyToJSCalleeType,
LastJSCObjectType = WebAssemblyToJSCalleeType,
MaxJSType = 0b11111111,
};
static const uint32_t FirstTypedArrayType = Int8ArrayType;
static const uint32_t LastTypedArrayType = DataViewType;
static constexpr uint32_t NumberOfTypedArrayTypes = LastTypedArrayType - FirstTypedArrayType + 1;
static constexpr uint32_t NumberOfTypedArrayTypesExcludingDataView = NumberOfTypedArrayTypes - 1;
static_assert(sizeof(JSType) == sizeof(uint8_t), "sizeof(JSType) is one byte.");
static_assert(LastJSCObjectType < 128, "The highest bit is reserved for embedder's extension.");
}