aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/runtime.h')
-rw-r--r--src/runtime/runtime.h600
1 files changed, 162 insertions, 438 deletions
diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h
index 8e2e83c3..6c5a039d 100644
--- a/src/runtime/runtime.h
+++ b/src/runtime/runtime.h
@@ -9,8 +9,8 @@
#include "src/allocation.h"
#include "src/base/platform/time.h"
+#include "src/elements-kind.h"
#include "src/globals.h"
-#include "src/objects.h"
#include "src/unicode.h"
#include "src/zone/zone.h"
@@ -45,7 +45,6 @@ namespace internal {
F(EstimateNumberOfElements, 1, 1) \
F(GetArrayKeys, 2, 1) \
F(NewArray, -1 /* >= 3 */, 1) \
- F(ArrayPush, -1, 1) \
F(FunctionBind, -1, 1) \
F(NormalizeElements, 1, 1) \
F(GrowArrayElements, 2, 1) \
@@ -57,7 +56,8 @@ namespace internal {
F(ArraySpeciesConstructor, 1, 1) \
F(ArrayIncludes_Slow, 3, 1) \
F(ArrayIndexOf, 3, 1) \
- F(SpreadIterablePrepare, 1, 1)
+ F(SpreadIterablePrepare, 1, 1) \
+ F(SpreadIterableFixed, 1, 1)
#define FOR_EACH_INTRINSIC_ATOMICS(F) \
F(ThrowNotIntegerSharedTypedArrayError, 1, 1) \
@@ -73,23 +73,25 @@ namespace internal {
F(AtomicsIsLockFree, 1, 1) \
F(AtomicsWait, 4, 1) \
F(AtomicsWake, 3, 1) \
- F(AtomicsNumWaitersForTesting, 2, 1)
-
-#define FOR_EACH_INTRINSIC_CLASSES(F) \
- F(ThrowNonMethodError, 0, 1) \
- F(ThrowUnsupportedSuperError, 0, 1) \
- F(ThrowConstructorNonCallableError, 1, 1) \
- F(ThrowArrayNotSubclassableError, 0, 1) \
- F(ThrowStaticPrototypeError, 0, 1) \
- F(ThrowIfStaticPrototype, 1, 1) \
- F(HomeObjectSymbol, 0, 1) \
- F(DefineClass, 4, 1) \
- F(LoadFromSuper, 3, 1) \
- F(LoadKeyedFromSuper, 3, 1) \
- F(StoreToSuper_Strict, 4, 1) \
- F(StoreToSuper_Sloppy, 4, 1) \
- F(StoreKeyedToSuper_Strict, 4, 1) \
- F(StoreKeyedToSuper_Sloppy, 4, 1) \
+ F(AtomicsNumWaitersForTesting, 2, 1) \
+ F(SetAllowAtomicsWait, 1, 1)
+
+#define FOR_EACH_INTRINSIC_CLASSES(F) \
+ F(ThrowUnsupportedSuperError, 0, 1) \
+ F(ThrowConstructorNonCallableError, 1, 1) \
+ F(ThrowStaticPrototypeError, 0, 1) \
+ F(ThrowSuperAlreadyCalledError, 0, 1) \
+ F(ThrowNotSuperConstructor, 2, 1) \
+ F(HomeObjectSymbol, 0, 1) \
+ F(DefineClass, 4, 1) \
+ F(InstallClassNameAccessor, 1, 1) \
+ F(InstallClassNameAccessorWithCheck, 1, 1) \
+ F(LoadFromSuper, 3, 1) \
+ F(LoadKeyedFromSuper, 3, 1) \
+ F(StoreToSuper_Strict, 4, 1) \
+ F(StoreToSuper_Sloppy, 4, 1) \
+ F(StoreKeyedToSuper_Strict, 4, 1) \
+ F(StoreKeyedToSuper_Sloppy, 4, 1) \
F(GetSuperConstructor, 1, 1)
#define FOR_EACH_INTRINSIC_COLLECTIONS(F) \
@@ -147,7 +149,7 @@ namespace internal {
F(DebugGetInternalProperties, 1, 1) \
F(DebugGetPropertyDetails, 2, 1) \
F(DebugGetProperty, 2, 1) \
- F(DebugPropertyTypeFromDetails, 1, 1) \
+ F(DebugPropertyKindFromDetails, 1, 1) \
F(DebugPropertyAttributesFromDetails, 1, 1) \
F(CheckExecutionState, 1, 1) \
F(GetFrameCount, 1, 1) \
@@ -170,8 +172,8 @@ namespace internal {
F(IsBreakOnException, 1, 1) \
F(PrepareStep, 2, 1) \
F(ClearStepping, 0, 1) \
- F(DebugEvaluate, 6, 1) \
- F(DebugEvaluateGlobal, 4, 1) \
+ F(DebugEvaluate, 5, 1) \
+ F(DebugEvaluateGlobal, 2, 1) \
F(DebugGetLoadedScripts, 0, 1) \
F(DebugReferencedBy, 3, 1) \
F(DebugConstructedBy, 2, 1) \
@@ -179,7 +181,6 @@ namespace internal {
F(DebugSetScriptSource, 2, 1) \
F(FunctionGetInferredName, 1, 1) \
F(FunctionGetDebugName, 1, 1) \
- F(ExecuteInDebugContext, 1, 1) \
F(GetDebugContext, 0, 1) \
F(CollectGarbage, 1, 1) \
F(GetHeapUsage, 0, 1) \
@@ -190,31 +191,32 @@ namespace internal {
F(ScriptLocationFromLine, 4, 1) \
F(ScriptLocationFromLine2, 4, 1) \
F(ScriptPositionInfo, 3, 1) \
+ F(ScriptPositionInfo2, 3, 1) \
F(ScriptSourceLine, 2, 1) \
- F(DebugPrepareStepInIfStepping, 1, 1) \
+ F(DebugOnFunctionCall, 1, 1) \
F(DebugPrepareStepInSuspendedGenerator, 0, 1) \
- F(DebugRecordAsyncFunction, 1, 1) \
+ F(DebugRecordGenerator, 1, 1) \
F(DebugPushPromise, 1, 1) \
F(DebugPopPromise, 0, 1) \
- F(DebugNextMicrotaskId, 0, 1) \
- F(DebugAsyncTaskEvent, 3, 1) \
+ F(DebugPromiseReject, 2, 1) \
+ F(DebugAsyncEventEnqueueRecurring, 2, 1) \
+ F(DebugAsyncFunctionPromiseCreated, 1, 1) \
F(DebugIsActive, 0, 1) \
- F(DebugBreakInOptimizedCode, 0, 1)
+ F(DebugBreakInOptimizedCode, 0, 1) \
+ F(DebugCollectCoverage, 0, 1) \
+ F(DebugTogglePreciseCoverage, 1, 1)
#define FOR_EACH_INTRINSIC_ERROR(F) F(ErrorToString, 1, 1)
#define FOR_EACH_INTRINSIC_FORIN(F) \
F(ForInEnumerate, 1, 1) \
F(ForInFilter, 2, 1) \
- F(ForInHasProperty, 2, 1) \
- F(ForInNext, 4, 1)
+ F(ForInHasProperty, 2, 1)
#define FOR_EACH_INTRINSIC_INTERPRETER(F) \
- F(InterpreterNewClosure, 2, 1) \
+ F(InterpreterNewClosure, 4, 1) \
F(InterpreterTraceBytecodeEntry, 3, 1) \
F(InterpreterTraceBytecodeExit, 3, 1) \
- F(InterpreterClearPendingMessage, 0, 1) \
- F(InterpreterSetPendingMessage, 1, 1) \
F(InterpreterAdvanceBytecodeOffset, 2, 1)
#define FOR_EACH_INTRINSIC_FUNCTION(F) \
@@ -241,10 +243,10 @@ namespace internal {
#define FOR_EACH_INTRINSIC_GENERATOR(F) \
F(CreateJSGeneratorObject, 2, 1) \
- F(SuspendJSGeneratorObject, 1, 1) \
F(GeneratorClose, 1, 1) \
F(GeneratorGetFunction, 1, 1) \
F(GeneratorGetReceiver, 1, 1) \
+ F(GeneratorGetContext, 1, 1) \
F(GeneratorGetInputOrDebugPos, 1, 1) \
F(GeneratorGetContinuation, 1, 1) \
F(GeneratorGetSourcePosition, 1, 1) \
@@ -258,15 +260,12 @@ namespace internal {
F(GetLanguageTagVariants, 1, 1) \
F(IsInitializedIntlObject, 1, 1) \
F(IsInitializedIntlObjectOfType, 2, 1) \
- F(MarkAsInitializedIntlObjectOfType, 3, 1) \
- F(GetImplFromInitializedIntlObject, 1, 1) \
+ F(MarkAsInitializedIntlObjectOfType, 2, 1) \
F(CreateDateTimeFormat, 3, 1) \
F(InternalDateFormat, 2, 1) \
F(InternalDateFormatToParts, 2, 1) \
- F(InternalDateParse, 2, 1) \
F(CreateNumberFormat, 3, 1) \
F(InternalNumberFormat, 2, 1) \
- F(InternalNumberParse, 2, 1) \
F(CreateCollator, 3, 1) \
F(InternalCompare, 3, 1) \
F(StringNormalize, 2, 1) \
@@ -290,26 +289,18 @@ namespace internal {
F(AllocateSeqOneByteString, 1, 1) \
F(AllocateSeqTwoByteString, 1, 1) \
F(CheckIsBootstrapping, 0, 1) \
+ F(CreateAsyncFromSyncIterator, 1, 1) \
F(CreateListFromArrayLike, 1, 1) \
- F(EnqueueMicrotask, 1, 1) \
- F(EnqueuePromiseReactionJob, 4, 1) \
- F(EnqueuePromiseResolveThenableJob, 3, 1) \
F(GetAndResetRuntimeCallStats, -1 /* <= 2 */, 1) \
- F(ExportExperimentalFromRuntime, 1, 1) \
F(ExportFromRuntime, 1, 1) \
F(IncrementUseCounter, 1, 1) \
F(InstallToContext, 1, 1) \
F(Interrupt, 0, 1) \
F(IS_VAR, 1, 1) \
- F(IsWasmInstance, 1, 1) \
F(NewReferenceError, 2, 1) \
F(NewSyntaxError, 2, 1) \
F(NewTypeError, 2, 1) \
F(OrdinaryHasInstance, 2, 1) \
- F(PromiseReject, 3, 1) \
- F(PromiseFulfill, 4, 1) \
- F(PromiseRejectEventFromStack, 2, 1) \
- F(PromiseRevokeReject, 1, 1) \
F(PromoteScheduledException, 0, 1) \
F(ReThrow, 1, 1) \
F(RunMicrotasks, 0, 1) \
@@ -324,16 +315,22 @@ namespace internal {
F(ThrowGeneratorRunning, 0, 1) \
F(ThrowIllegalInvocation, 0, 1) \
F(ThrowIncompatibleMethodReceiver, 2, 1) \
+ F(ThrowInvalidHint, 1, 1) \
F(ThrowInvalidStringLength, 0, 1) \
F(ThrowIteratorResultNotAnObject, 1, 1) \
+ F(ThrowSymbolIteratorInvalid, 0, 1) \
+ F(ThrowNonCallableInInstanceOfCheck, 0, 1) \
+ F(ThrowNonObjectInInstanceOfCheck, 0, 1) \
+ F(ThrowNotConstructor, 1, 1) \
F(ThrowNotGeneric, 1, 1) \
F(ThrowReferenceError, 1, 1) \
F(ThrowStackOverflow, 0, 1) \
+ F(ThrowSymbolAsyncIteratorInvalid, 0, 1) \
F(ThrowTypeError, -1 /* >= 1 */, 1) \
- F(ThrowWasmError, 2, 1) \
F(ThrowUndefinedOrNullToObject, 1, 1) \
F(Typeof, 1, 1) \
- F(UnwindAndFindExceptionHandler, 0, 1)
+ F(UnwindAndFindExceptionHandler, 0, 1) \
+ F(AllowDynamicFunction, 1, 1)
#define FOR_EACH_INTRINSIC_LITERALS(F) \
F(CreateRegExpLiteral, 4, 1) \
@@ -341,13 +338,13 @@ namespace internal {
F(CreateArrayLiteral, 4, 1) \
F(CreateArrayLiteralStubBailout, 3, 1)
-
#define FOR_EACH_INTRINSIC_LIVEEDIT(F) \
F(LiveEditFindSharedFunctionInfosForScript, 1, 1) \
F(LiveEditGatherCompileInfo, 2, 1) \
F(LiveEditReplaceScript, 3, 1) \
- F(LiveEditFunctionSourceUpdated, 1, 1) \
+ F(LiveEditFunctionSourceUpdated, 2, 1) \
F(LiveEditReplaceFunctionCode, 2, 1) \
+ F(LiveEditFixupScript, 2, 1) \
F(LiveEditFunctionSetScript, 2, 1) \
F(LiveEditReplaceRefToNestedFunction, 3, 1) \
F(LiveEditPatchFunctionPositions, 2, 1) \
@@ -358,6 +355,7 @@ namespace internal {
#define FOR_EACH_INTRINSIC_MATHS(F) F(GenerateRandomNumbers, 0, 1)
#define FOR_EACH_INTRINSIC_MODULE(F) \
+ F(DynamicImportCall, 1, 1) \
F(GetModuleNamespace, 1, 1) \
F(LoadModuleVariable, 1, 1) \
F(StoreModuleVariable, 2, 1)
@@ -377,56 +375,57 @@ namespace internal {
F(GetHoleNaNUpper, 0, 1) \
F(GetHoleNaNLower, 0, 1)
-#define FOR_EACH_INTRINSIC_OBJECT(F) \
- F(GetPrototype, 1, 1) \
- F(ObjectHasOwnProperty, 2, 1) \
- F(ObjectCreate, 2, 1) \
- F(InternalSetPrototype, 2, 1) \
- F(OptimizeObjectForAddingMultipleProperties, 2, 1) \
- F(GetProperty, 2, 1) \
- F(KeyedGetProperty, 2, 1) \
- F(AddNamedProperty, 4, 1) \
- F(SetProperty, 4, 1) \
- F(AddElement, 3, 1) \
- F(AppendElement, 2, 1) \
- F(DeleteProperty_Sloppy, 2, 1) \
- F(DeleteProperty_Strict, 2, 1) \
- F(HasProperty, 2, 1) \
- F(GetOwnPropertyKeys, 2, 1) \
- F(GetInterceptorInfo, 1, 1) \
- F(ToFastProperties, 1, 1) \
- F(AllocateHeapNumber, 0, 1) \
- F(NewObject, 2, 1) \
- F(FinalizeInstanceSize, 1, 1) \
- F(LoadMutableDouble, 2, 1) \
- F(TryMigrateInstance, 1, 1) \
- F(IsJSGlobalProxy, 1, 1) \
- F(DefineAccessorPropertyUnchecked, 5, 1) \
- F(DefineDataPropertyInLiteral, 5, 1) \
- F(DefineDataProperty, 5, 1) \
- F(GetDataProperty, 2, 1) \
- F(GetConstructorName, 1, 1) \
- F(HasFastPackedElements, 1, 1) \
- F(ValueOf, 1, 1) \
- F(IsJSReceiver, 1, 1) \
- F(ClassOf, 1, 1) \
- F(DefineGetterPropertyUnchecked, 4, 1) \
- F(DefineSetterPropertyUnchecked, 4, 1) \
- F(ToObject, 1, 1) \
- F(ToPrimitive, 1, 1) \
- F(ToPrimitive_Number, 1, 1) \
- F(ToNumber, 1, 1) \
- F(ToInteger, 1, 1) \
- F(ToLength, 1, 1) \
- F(ToString, 1, 1) \
- F(ToName, 1, 1) \
- F(SameValue, 2, 1) \
- F(SameValueZero, 2, 1) \
- F(Compare, 3, 1) \
- F(HasInPrototypeChain, 2, 1) \
- F(CreateIterResultObject, 2, 1) \
- F(CreateKeyValueArray, 2, 1) \
- F(IsAccessCheckNeeded, 1, 1) \
+#define FOR_EACH_INTRINSIC_OBJECT(F) \
+ F(GetPrototype, 1, 1) \
+ F(ObjectHasOwnProperty, 2, 1) \
+ F(ObjectCreate, 2, 1) \
+ F(InternalSetPrototype, 2, 1) \
+ F(OptimizeObjectForAddingMultipleProperties, 2, 1) \
+ F(GetProperty, 2, 1) \
+ F(KeyedGetProperty, 2, 1) \
+ F(AddNamedProperty, 4, 1) \
+ F(SetProperty, 4, 1) \
+ F(AddElement, 3, 1) \
+ F(AppendElement, 2, 1) \
+ F(DeleteProperty_Sloppy, 2, 1) \
+ F(DeleteProperty_Strict, 2, 1) \
+ F(HasProperty, 2, 1) \
+ F(GetOwnPropertyKeys, 2, 1) \
+ F(GetInterceptorInfo, 1, 1) \
+ F(ToFastProperties, 1, 1) \
+ F(AllocateHeapNumber, 0, 1) \
+ F(NewObject, 2, 1) \
+ F(FinalizeInstanceSize, 1, 1) \
+ F(LoadMutableDouble, 2, 1) \
+ F(TryMigrateInstance, 1, 1) \
+ F(IsJSGlobalProxy, 1, 1) \
+ F(DefineAccessorPropertyUnchecked, 5, 1) \
+ F(DefineDataPropertyInLiteral, 6, 1) \
+ F(GetDataProperty, 2, 1) \
+ F(GetConstructorName, 1, 1) \
+ F(HasFastPackedElements, 1, 1) \
+ F(ValueOf, 1, 1) \
+ F(IsJSReceiver, 1, 1) \
+ F(ClassOf, 1, 1) \
+ F(CopyDataProperties, 2, 1) \
+ F(CopyDataPropertiesWithExcludedProperties, -1 /* >= 1 */, 1) \
+ F(DefineGetterPropertyUnchecked, 4, 1) \
+ F(DefineSetterPropertyUnchecked, 4, 1) \
+ F(ToObject, 1, 1) \
+ F(ToPrimitive, 1, 1) \
+ F(ToPrimitive_Number, 1, 1) \
+ F(ToNumber, 1, 1) \
+ F(ToInteger, 1, 1) \
+ F(ToLength, 1, 1) \
+ F(ToString, 1, 1) \
+ F(ToName, 1, 1) \
+ F(SameValue, 2, 1) \
+ F(SameValueZero, 2, 1) \
+ F(Compare, 3, 1) \
+ F(HasInPrototypeChain, 2, 1) \
+ F(CreateIterResultObject, 2, 1) \
+ F(CreateKeyValueArray, 2, 1) \
+ F(IsAccessCheckNeeded, 1, 1) \
F(CreateDataProperty, 3, 1)
#define FOR_EACH_INTRINSIC_OPERATORS(F) \
@@ -451,6 +450,21 @@ namespace internal {
F(GreaterThanOrEqual, 2, 1) \
F(InstanceOf, 2, 1)
+#define FOR_EACH_INTRINSIC_PROMISE(F) \
+ F(EnqueueMicrotask, 1, 1) \
+ F(EnqueuePromiseReactionJob, 1, 1) \
+ F(EnqueuePromiseResolveThenableJob, 1, 1) \
+ F(PromiseHookInit, 2, 1) \
+ F(PromiseHookResolve, 1, 1) \
+ F(PromiseHookBefore, 1, 1) \
+ F(PromiseHookAfter, 1, 1) \
+ F(PromiseMarkAsHandled, 1, 1) \
+ F(PromiseRejectEventFromStack, 2, 1) \
+ F(PromiseRevokeReject, 1, 1) \
+ F(PromiseResult, 1, 1) \
+ F(PromiseStatus, 1, 1) \
+ F(ReportPromiseReject, 2, 1)
+
#define FOR_EACH_INTRINSIC_PROXY(F) \
F(IsJSProxy, 1, 1) \
F(JSProxyCall, -1 /* >= 2 */, 1) \
@@ -465,8 +479,10 @@ namespace internal {
F(RegExpExec, 4, 1) \
F(RegExpExecMultiple, 4, 1) \
F(RegExpExecReThrow, 4, 1) \
+ F(RegExpInitializeAndCompile, 3, 1) \
F(RegExpInternalReplace, 3, 1) \
F(RegExpReplace, 3, 1) \
+ F(RegExpSplit, 3, 1) \
F(StringReplaceGlobalRegExpWithString, 4, 1) \
F(StringReplaceNonGlobalRegExpWithFunction, 3, 1) \
F(StringSplit, 3, 1)
@@ -482,10 +498,11 @@ namespace internal {
F(NewStrictArguments, 1, 1) \
F(NewRestParameter, 1, 1) \
F(NewSloppyArguments, 3, 1) \
- F(NewClosure, 1, 1) \
- F(NewClosure_Tenured, 1, 1) \
+ F(NewArgumentsElements, 2, 1) \
+ F(NewClosure, 3, 1) \
+ F(NewClosure_Tenured, 3, 1) \
F(NewScriptContext, 2, 1) \
- F(NewFunctionContext, 1, 1) \
+ F(NewFunctionContext, 2, 1) \
F(PushModuleContext, 3, 1) \
F(PushWithContext, 3, 1) \
F(PushCatchContext, 4, 1) \
@@ -496,319 +513,11 @@ namespace internal {
F(StoreLookupSlot_Sloppy, 2, 1) \
F(StoreLookupSlot_Strict, 2, 1)
-#define FOR_EACH_INTRINSIC_SIMD(F) \
- F(IsSimdValue, 1, 1) \
- F(CreateFloat32x4, 4, 1) \
- F(CreateInt32x4, 4, 1) \
- F(CreateUint32x4, 4, 1) \
- F(CreateBool32x4, 4, 1) \
- F(CreateInt16x8, 8, 1) \
- F(CreateUint16x8, 8, 1) \
- F(CreateBool16x8, 8, 1) \
- F(CreateInt8x16, 16, 1) \
- F(CreateUint8x16, 16, 1) \
- F(CreateBool8x16, 16, 1) \
- F(Float32x4Check, 1, 1) \
- F(Float32x4ExtractLane, 2, 1) \
- F(Float32x4ReplaceLane, 3, 1) \
- F(Float32x4Abs, 1, 1) \
- F(Float32x4Neg, 1, 1) \
- F(Float32x4Sqrt, 1, 1) \
- F(Float32x4RecipApprox, 1, 1) \
- F(Float32x4RecipSqrtApprox, 1, 1) \
- F(Float32x4Add, 2, 1) \
- F(Float32x4Sub, 2, 1) \
- F(Float32x4Mul, 2, 1) \
- F(Float32x4Div, 2, 1) \
- F(Float32x4Min, 2, 1) \
- F(Float32x4Max, 2, 1) \
- F(Float32x4MinNum, 2, 1) \
- F(Float32x4MaxNum, 2, 1) \
- F(Float32x4Equal, 2, 1) \
- F(Float32x4NotEqual, 2, 1) \
- F(Float32x4LessThan, 2, 1) \
- F(Float32x4LessThanOrEqual, 2, 1) \
- F(Float32x4GreaterThan, 2, 1) \
- F(Float32x4GreaterThanOrEqual, 2, 1) \
- F(Float32x4Select, 3, 1) \
- F(Float32x4Swizzle, 5, 1) \
- F(Float32x4Shuffle, 6, 1) \
- F(Float32x4FromInt32x4, 1, 1) \
- F(Float32x4FromUint32x4, 1, 1) \
- F(Float32x4FromInt32x4Bits, 1, 1) \
- F(Float32x4FromUint32x4Bits, 1, 1) \
- F(Float32x4FromInt16x8Bits, 1, 1) \
- F(Float32x4FromUint16x8Bits, 1, 1) \
- F(Float32x4FromInt8x16Bits, 1, 1) \
- F(Float32x4FromUint8x16Bits, 1, 1) \
- F(Float32x4Load, 2, 1) \
- F(Float32x4Load1, 2, 1) \
- F(Float32x4Load2, 2, 1) \
- F(Float32x4Load3, 2, 1) \
- F(Float32x4Store, 3, 1) \
- F(Float32x4Store1, 3, 1) \
- F(Float32x4Store2, 3, 1) \
- F(Float32x4Store3, 3, 1) \
- F(Int32x4Check, 1, 1) \
- F(Int32x4ExtractLane, 2, 1) \
- F(Int32x4ReplaceLane, 3, 1) \
- F(Int32x4Neg, 1, 1) \
- F(Int32x4Add, 2, 1) \
- F(Int32x4Sub, 2, 1) \
- F(Int32x4Mul, 2, 1) \
- F(Int32x4Min, 2, 1) \
- F(Int32x4Max, 2, 1) \
- F(Int32x4And, 2, 1) \
- F(Int32x4Or, 2, 1) \
- F(Int32x4Xor, 2, 1) \
- F(Int32x4Not, 1, 1) \
- F(Int32x4ShiftLeftByScalar, 2, 1) \
- F(Int32x4ShiftRightByScalar, 2, 1) \
- F(Int32x4Equal, 2, 1) \
- F(Int32x4NotEqual, 2, 1) \
- F(Int32x4LessThan, 2, 1) \
- F(Int32x4LessThanOrEqual, 2, 1) \
- F(Int32x4GreaterThan, 2, 1) \
- F(Int32x4GreaterThanOrEqual, 2, 1) \
- F(Int32x4Select, 3, 1) \
- F(Int32x4Swizzle, 5, 1) \
- F(Int32x4Shuffle, 6, 1) \
- F(Int32x4FromFloat32x4, 1, 1) \
- F(Int32x4FromUint32x4, 1, 1) \
- F(Int32x4FromFloat32x4Bits, 1, 1) \
- F(Int32x4FromUint32x4Bits, 1, 1) \
- F(Int32x4FromInt16x8Bits, 1, 1) \
- F(Int32x4FromUint16x8Bits, 1, 1) \
- F(Int32x4FromInt8x16Bits, 1, 1) \
- F(Int32x4FromUint8x16Bits, 1, 1) \
- F(Int32x4Load, 2, 1) \
- F(Int32x4Load1, 2, 1) \
- F(Int32x4Load2, 2, 1) \
- F(Int32x4Load3, 2, 1) \
- F(Int32x4Store, 3, 1) \
- F(Int32x4Store1, 3, 1) \
- F(Int32x4Store2, 3, 1) \
- F(Int32x4Store3, 3, 1) \
- F(Uint32x4Check, 1, 1) \
- F(Uint32x4ExtractLane, 2, 1) \
- F(Uint32x4ReplaceLane, 3, 1) \
- F(Uint32x4Add, 2, 1) \
- F(Uint32x4Sub, 2, 1) \
- F(Uint32x4Mul, 2, 1) \
- F(Uint32x4Min, 2, 1) \
- F(Uint32x4Max, 2, 1) \
- F(Uint32x4And, 2, 1) \
- F(Uint32x4Or, 2, 1) \
- F(Uint32x4Xor, 2, 1) \
- F(Uint32x4Not, 1, 1) \
- F(Uint32x4ShiftLeftByScalar, 2, 1) \
- F(Uint32x4ShiftRightByScalar, 2, 1) \
- F(Uint32x4Equal, 2, 1) \
- F(Uint32x4NotEqual, 2, 1) \
- F(Uint32x4LessThan, 2, 1) \
- F(Uint32x4LessThanOrEqual, 2, 1) \
- F(Uint32x4GreaterThan, 2, 1) \
- F(Uint32x4GreaterThanOrEqual, 2, 1) \
- F(Uint32x4Select, 3, 1) \
- F(Uint32x4Swizzle, 5, 1) \
- F(Uint32x4Shuffle, 6, 1) \
- F(Uint32x4FromFloat32x4, 1, 1) \
- F(Uint32x4FromInt32x4, 1, 1) \
- F(Uint32x4FromFloat32x4Bits, 1, 1) \
- F(Uint32x4FromInt32x4Bits, 1, 1) \
- F(Uint32x4FromInt16x8Bits, 1, 1) \
- F(Uint32x4FromUint16x8Bits, 1, 1) \
- F(Uint32x4FromInt8x16Bits, 1, 1) \
- F(Uint32x4FromUint8x16Bits, 1, 1) \
- F(Uint32x4Load, 2, 1) \
- F(Uint32x4Load1, 2, 1) \
- F(Uint32x4Load2, 2, 1) \
- F(Uint32x4Load3, 2, 1) \
- F(Uint32x4Store, 3, 1) \
- F(Uint32x4Store1, 3, 1) \
- F(Uint32x4Store2, 3, 1) \
- F(Uint32x4Store3, 3, 1) \
- F(Bool32x4Check, 1, 1) \
- F(Bool32x4ExtractLane, 2, 1) \
- F(Bool32x4ReplaceLane, 3, 1) \
- F(Bool32x4And, 2, 1) \
- F(Bool32x4Or, 2, 1) \
- F(Bool32x4Xor, 2, 1) \
- F(Bool32x4Not, 1, 1) \
- F(Bool32x4AnyTrue, 1, 1) \
- F(Bool32x4AllTrue, 1, 1) \
- F(Bool32x4Swizzle, 5, 1) \
- F(Bool32x4Shuffle, 6, 1) \
- F(Bool32x4Equal, 2, 1) \
- F(Bool32x4NotEqual, 2, 1) \
- F(Int16x8Check, 1, 1) \
- F(Int16x8ExtractLane, 2, 1) \
- F(Int16x8ReplaceLane, 3, 1) \
- F(Int16x8Neg, 1, 1) \
- F(Int16x8Add, 2, 1) \
- F(Int16x8AddSaturate, 2, 1) \
- F(Int16x8Sub, 2, 1) \
- F(Int16x8SubSaturate, 2, 1) \
- F(Int16x8Mul, 2, 1) \
- F(Int16x8Min, 2, 1) \
- F(Int16x8Max, 2, 1) \
- F(Int16x8And, 2, 1) \
- F(Int16x8Or, 2, 1) \
- F(Int16x8Xor, 2, 1) \
- F(Int16x8Not, 1, 1) \
- F(Int16x8ShiftLeftByScalar, 2, 1) \
- F(Int16x8ShiftRightByScalar, 2, 1) \
- F(Int16x8Equal, 2, 1) \
- F(Int16x8NotEqual, 2, 1) \
- F(Int16x8LessThan, 2, 1) \
- F(Int16x8LessThanOrEqual, 2, 1) \
- F(Int16x8GreaterThan, 2, 1) \
- F(Int16x8GreaterThanOrEqual, 2, 1) \
- F(Int16x8Select, 3, 1) \
- F(Int16x8Swizzle, 9, 1) \
- F(Int16x8Shuffle, 10, 1) \
- F(Int16x8FromUint16x8, 1, 1) \
- F(Int16x8FromFloat32x4Bits, 1, 1) \
- F(Int16x8FromInt32x4Bits, 1, 1) \
- F(Int16x8FromUint32x4Bits, 1, 1) \
- F(Int16x8FromUint16x8Bits, 1, 1) \
- F(Int16x8FromInt8x16Bits, 1, 1) \
- F(Int16x8FromUint8x16Bits, 1, 1) \
- F(Int16x8Load, 2, 1) \
- F(Int16x8Store, 3, 1) \
- F(Uint16x8Check, 1, 1) \
- F(Uint16x8ExtractLane, 2, 1) \
- F(Uint16x8ReplaceLane, 3, 1) \
- F(Uint16x8Add, 2, 1) \
- F(Uint16x8AddSaturate, 2, 1) \
- F(Uint16x8Sub, 2, 1) \
- F(Uint16x8SubSaturate, 2, 1) \
- F(Uint16x8Mul, 2, 1) \
- F(Uint16x8Min, 2, 1) \
- F(Uint16x8Max, 2, 1) \
- F(Uint16x8And, 2, 1) \
- F(Uint16x8Or, 2, 1) \
- F(Uint16x8Xor, 2, 1) \
- F(Uint16x8Not, 1, 1) \
- F(Uint16x8ShiftLeftByScalar, 2, 1) \
- F(Uint16x8ShiftRightByScalar, 2, 1) \
- F(Uint16x8Equal, 2, 1) \
- F(Uint16x8NotEqual, 2, 1) \
- F(Uint16x8LessThan, 2, 1) \
- F(Uint16x8LessThanOrEqual, 2, 1) \
- F(Uint16x8GreaterThan, 2, 1) \
- F(Uint16x8GreaterThanOrEqual, 2, 1) \
- F(Uint16x8Select, 3, 1) \
- F(Uint16x8Swizzle, 9, 1) \
- F(Uint16x8Shuffle, 10, 1) \
- F(Uint16x8FromInt16x8, 1, 1) \
- F(Uint16x8FromFloat32x4Bits, 1, 1) \
- F(Uint16x8FromInt32x4Bits, 1, 1) \
- F(Uint16x8FromUint32x4Bits, 1, 1) \
- F(Uint16x8FromInt16x8Bits, 1, 1) \
- F(Uint16x8FromInt8x16Bits, 1, 1) \
- F(Uint16x8FromUint8x16Bits, 1, 1) \
- F(Uint16x8Load, 2, 1) \
- F(Uint16x8Store, 3, 1) \
- F(Bool16x8Check, 1, 1) \
- F(Bool16x8ExtractLane, 2, 1) \
- F(Bool16x8ReplaceLane, 3, 1) \
- F(Bool16x8And, 2, 1) \
- F(Bool16x8Or, 2, 1) \
- F(Bool16x8Xor, 2, 1) \
- F(Bool16x8Not, 1, 1) \
- F(Bool16x8AnyTrue, 1, 1) \
- F(Bool16x8AllTrue, 1, 1) \
- F(Bool16x8Swizzle, 9, 1) \
- F(Bool16x8Shuffle, 10, 1) \
- F(Bool16x8Equal, 2, 1) \
- F(Bool16x8NotEqual, 2, 1) \
- F(Int8x16Check, 1, 1) \
- F(Int8x16ExtractLane, 2, 1) \
- F(Int8x16ReplaceLane, 3, 1) \
- F(Int8x16Neg, 1, 1) \
- F(Int8x16Add, 2, 1) \
- F(Int8x16AddSaturate, 2, 1) \
- F(Int8x16Sub, 2, 1) \
- F(Int8x16SubSaturate, 2, 1) \
- F(Int8x16Mul, 2, 1) \
- F(Int8x16Min, 2, 1) \
- F(Int8x16Max, 2, 1) \
- F(Int8x16And, 2, 1) \
- F(Int8x16Or, 2, 1) \
- F(Int8x16Xor, 2, 1) \
- F(Int8x16Not, 1, 1) \
- F(Int8x16ShiftLeftByScalar, 2, 1) \
- F(Int8x16ShiftRightByScalar, 2, 1) \
- F(Int8x16Equal, 2, 1) \
- F(Int8x16NotEqual, 2, 1) \
- F(Int8x16LessThan, 2, 1) \
- F(Int8x16LessThanOrEqual, 2, 1) \
- F(Int8x16GreaterThan, 2, 1) \
- F(Int8x16GreaterThanOrEqual, 2, 1) \
- F(Int8x16Select, 3, 1) \
- F(Int8x16Swizzle, 17, 1) \
- F(Int8x16Shuffle, 18, 1) \
- F(Int8x16FromUint8x16, 1, 1) \
- F(Int8x16FromFloat32x4Bits, 1, 1) \
- F(Int8x16FromInt32x4Bits, 1, 1) \
- F(Int8x16FromUint32x4Bits, 1, 1) \
- F(Int8x16FromInt16x8Bits, 1, 1) \
- F(Int8x16FromUint16x8Bits, 1, 1) \
- F(Int8x16FromUint8x16Bits, 1, 1) \
- F(Int8x16Load, 2, 1) \
- F(Int8x16Store, 3, 1) \
- F(Uint8x16Check, 1, 1) \
- F(Uint8x16ExtractLane, 2, 1) \
- F(Uint8x16ReplaceLane, 3, 1) \
- F(Uint8x16Add, 2, 1) \
- F(Uint8x16AddSaturate, 2, 1) \
- F(Uint8x16Sub, 2, 1) \
- F(Uint8x16SubSaturate, 2, 1) \
- F(Uint8x16Mul, 2, 1) \
- F(Uint8x16Min, 2, 1) \
- F(Uint8x16Max, 2, 1) \
- F(Uint8x16And, 2, 1) \
- F(Uint8x16Or, 2, 1) \
- F(Uint8x16Xor, 2, 1) \
- F(Uint8x16Not, 1, 1) \
- F(Uint8x16ShiftLeftByScalar, 2, 1) \
- F(Uint8x16ShiftRightByScalar, 2, 1) \
- F(Uint8x16Equal, 2, 1) \
- F(Uint8x16NotEqual, 2, 1) \
- F(Uint8x16LessThan, 2, 1) \
- F(Uint8x16LessThanOrEqual, 2, 1) \
- F(Uint8x16GreaterThan, 2, 1) \
- F(Uint8x16GreaterThanOrEqual, 2, 1) \
- F(Uint8x16Select, 3, 1) \
- F(Uint8x16Swizzle, 17, 1) \
- F(Uint8x16Shuffle, 18, 1) \
- F(Uint8x16FromInt8x16, 1, 1) \
- F(Uint8x16FromFloat32x4Bits, 1, 1) \
- F(Uint8x16FromInt32x4Bits, 1, 1) \
- F(Uint8x16FromUint32x4Bits, 1, 1) \
- F(Uint8x16FromInt16x8Bits, 1, 1) \
- F(Uint8x16FromUint16x8Bits, 1, 1) \
- F(Uint8x16FromInt8x16Bits, 1, 1) \
- F(Uint8x16Load, 2, 1) \
- F(Uint8x16Store, 3, 1) \
- F(Bool8x16Check, 1, 1) \
- F(Bool8x16ExtractLane, 2, 1) \
- F(Bool8x16ReplaceLane, 3, 1) \
- F(Bool8x16And, 2, 1) \
- F(Bool8x16Or, 2, 1) \
- F(Bool8x16Xor, 2, 1) \
- F(Bool8x16Not, 1, 1) \
- F(Bool8x16AnyTrue, 1, 1) \
- F(Bool8x16AllTrue, 1, 1) \
- F(Bool8x16Swizzle, 17, 1) \
- F(Bool8x16Shuffle, 18, 1) \
- F(Bool8x16Equal, 2, 1) \
- F(Bool8x16NotEqual, 2, 1)
-
#define FOR_EACH_INTRINSIC_STRINGS(F) \
+ F(GetSubstitution, 4, 1) \
F(StringReplaceOneCharWithString, 3, 1) \
F(StringIndexOf, 3, 1) \
+ F(StringIndexOfUnchecked, 3, 1) \
F(StringLastIndexOf, 2, 1) \
F(SubString, 3, 1) \
F(StringAdd, 2, 1) \
@@ -819,8 +528,6 @@ namespace internal {
F(StringBuilderJoin, 3, 1) \
F(SparseJoinWithSeparator, 3, 1) \
F(StringToArray, 2, 1) \
- F(StringToLowerCase, 1, 1) \
- F(StringToUpperCase, 1, 1) \
F(StringLessThan, 2, 1) \
F(StringLessThanOrEqual, 2, 1) \
F(StringGreaterThan, 2, 1) \
@@ -837,7 +544,6 @@ namespace internal {
F(CreatePrivateSymbol, 1, 1) \
F(SymbolDescription, 1, 1) \
F(SymbolDescriptiveString, 1, 1) \
- F(SymbolRegistry, 0, 1) \
F(SymbolIsPrivate, 1, 1)
#define FOR_EACH_INTRINSIC_TEST(F) \
@@ -856,7 +562,7 @@ namespace internal {
F(GetOptimizationCount, 1, 1) \
F(GetUndetectable, 0, 1) \
F(GetCallable, 0, 1) \
- F(ClearFunctionTypeFeedback, 1, 1) \
+ F(ClearFunctionFeedback, 1, 1) \
F(CheckWasmWrapperElision, 2, 1) \
F(NotifyContextDisposed, 0, 1) \
F(SetAllocationTimeout, -1 /* 2 || 3 */, 1) \
@@ -898,10 +604,14 @@ namespace internal {
F(SerializeWasmModule, 1, 1) \
F(DeserializeWasmModule, 2, 1) \
F(IsAsmWasmCode, 1, 1) \
- F(IsNotAsmWasmCode, 1, 1) \
+ F(IsWasmCode, 1, 1) \
+ F(DisallowCodegenFromStrings, 0, 1) \
F(ValidateWasmInstancesChain, 2, 1) \
F(ValidateWasmModuleState, 1, 1) \
- F(ValidateWasmOrphanedInstance, 1, 1)
+ F(ValidateWasmOrphanedInstance, 1, 1) \
+ F(SetWasmCompileControls, 2, 1) \
+ F(SetWasmInstantiateControls, 0, 1) \
+ F(Verify, 1, 1)
#define FOR_EACH_INTRINSIC_TYPEDARRAY(F) \
F(ArrayBufferGetByteLength, 1, 1) \
@@ -914,18 +624,23 @@ namespace internal {
F(TypedArrayGetLength, 1, 1) \
F(TypedArrayGetBuffer, 1, 1) \
F(TypedArraySetFastCases, 3, 1) \
+ F(TypedArraySortFast, 1, 1) \
F(TypedArrayMaxSizeInHeap, 0, 1) \
F(IsTypedArray, 1, 1) \
F(IsSharedTypedArray, 1, 1) \
F(IsSharedIntegerTypedArray, 1, 1) \
F(IsSharedInteger32TypedArray, 1, 1)
-#define FOR_EACH_INTRINSIC_WASM(F) \
- F(WasmGrowMemory, 1, 1) \
- F(WasmMemorySize, 0, 1) \
- F(WasmThrowTypeError, 0, 1) \
- F(WasmThrow, 2, 1) \
- F(WasmGetCaughtExceptionValue, 1, 1)
+#define FOR_EACH_INTRINSIC_WASM(F) \
+ F(WasmGrowMemory, 1, 1) \
+ F(WasmMemorySize, 0, 1) \
+ F(ThrowWasmError, 2, 1) \
+ F(ThrowWasmErrorFromTrapIf, 1, 1) \
+ F(WasmThrowTypeError, 0, 1) \
+ F(WasmThrow, 2, 1) \
+ F(WasmGetCaughtExceptionValue, 1, 1) \
+ F(WasmRunInterpreter, 3, 1) \
+ F(WasmStackGuard, 0, 1)
#define FOR_EACH_INTRINSIC_RETURN_PAIR(F) \
F(LoadLookupSlotForCall, 1, 2)
@@ -938,22 +653,20 @@ namespace internal {
#define FOR_EACH_INTRINSIC_IC(F) \
F(BinaryOpIC_Miss, 2, 1) \
F(BinaryOpIC_MissWithAllocationSite, 3, 1) \
- F(CallIC_Miss, 3, 1) \
F(CompareIC_Miss, 3, 1) \
F(ElementsTransitionAndStoreIC_Miss, 6, 1) \
F(KeyedLoadIC_Miss, 4, 1) \
- F(KeyedLoadIC_MissFromStubFailure, 4, 1) \
F(KeyedStoreIC_Miss, 5, 1) \
F(KeyedStoreIC_Slow, 5, 1) \
F(LoadElementWithInterceptor, 2, 1) \
- F(LoadGlobalIC_Miss, 2, 1) \
- F(LoadGlobalIC_Slow, 2, 1) \
+ F(LoadGlobalIC_Miss, 3, 1) \
+ F(LoadGlobalIC_Slow, 3, 1) \
F(LoadIC_Miss, 4, 1) \
- F(LoadPropertyWithInterceptor, 3, 1) \
+ F(LoadPropertyWithInterceptor, 5, 1) \
F(LoadPropertyWithInterceptorOnly, 3, 1) \
F(StoreCallbackProperty, 6, 1) \
F(StoreIC_Miss, 5, 1) \
- F(StorePropertyWithInterceptor, 3, 1) \
+ F(StorePropertyWithInterceptor, 5, 1) \
F(ToBooleanIC_Miss, 1, 1) \
F(Unreachable, 0, 1)
@@ -980,10 +693,10 @@ namespace internal {
FOR_EACH_INTRINSIC_NUMBERS(F) \
FOR_EACH_INTRINSIC_OBJECT(F) \
FOR_EACH_INTRINSIC_OPERATORS(F) \
+ FOR_EACH_INTRINSIC_PROMISE(F) \
FOR_EACH_INTRINSIC_PROXY(F) \
FOR_EACH_INTRINSIC_REGEXP(F) \
FOR_EACH_INTRINSIC_SCOPES(F) \
- FOR_EACH_INTRINSIC_SIMD(F) \
FOR_EACH_INTRINSIC_STRINGS(F) \
FOR_EACH_INTRINSIC_SYMBOL(F) \
FOR_EACH_INTRINSIC_TEST(F) \
@@ -1009,14 +722,13 @@ FOR_EACH_INTRINSIC_RETURN_OBJECT(F)
class Runtime : public AllStatic {
public:
- enum FunctionId {
+ enum FunctionId : int32_t {
#define F(name, nargs, ressize) k##name,
#define I(name, nargs, ressize) kInline##name,
- FOR_EACH_INTRINSIC(F)
- FOR_EACH_INTRINSIC(I)
+ FOR_EACH_INTRINSIC(F) FOR_EACH_INTRINSIC(I)
#undef I
#undef F
- kNumFunctions,
+ kNumFunctions,
};
enum IntrinsicType { RUNTIME, INLINE };
@@ -1133,6 +845,18 @@ class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {};
STATIC_ASSERT(LANGUAGE_END == 2);
class DeclareGlobalsLanguageMode : public BitField<LanguageMode, 2, 1> {};
+// A set of bits returned by Runtime_GetOptimizationStatus.
+// These bits must be in sync with bits defined in test/mjsunit/mjsunit.js
+enum class OptimizationStatus {
+ kIsFunction = 1 << 0,
+ kNeverOptimize = 1 << 1,
+ kAlwaysOptimize = 1 << 2,
+ kMaybeDeopted = 1 << 3,
+ kOptimized = 1 << 4,
+ kTurboFanned = 1 << 5,
+ kInterpreted = 1 << 6,
+};
+
} // namespace internal
} // namespace v8