LCOV - code coverage report
Current view: top level - src/runtime - runtime.h (source / functions) Hit Total Coverage
Test: app.info Lines: 1 1 100.0 %
Date: 2017-10-20 Functions: 0 0 -

          Line data    Source code
       1             : // Copyright 2012 the V8 project authors. All rights reserved.
       2             : // Use of this source code is governed by a BSD-style license that can be
       3             : // found in the LICENSE file.
       4             : 
       5             : #ifndef V8_RUNTIME_RUNTIME_H_
       6             : #define V8_RUNTIME_RUNTIME_H_
       7             : 
       8             : #include <memory>
       9             : 
      10             : #include "src/allocation.h"
      11             : #include "src/base/platform/time.h"
      12             : #include "src/elements-kind.h"
      13             : #include "src/globals.h"
      14             : #include "src/unicode.h"
      15             : #include "src/zone/zone.h"
      16             : 
      17             : namespace v8 {
      18             : namespace internal {
      19             : 
      20             : // * Each intrinsic is consistently exposed in JavaScript via 2 names:
      21             : //    * %#name, which is always a runtime call.
      22             : //    * %_#name, which can be inlined or just a runtime call, the compiler in
      23             : //      question decides.
      24             : //
      25             : // * IntrinsicTypes are Runtime::RUNTIME and Runtime::INLINE, respectively.
      26             : //
      27             : // * IDs are Runtime::k##name and Runtime::kInline##name, respectively.
      28             : //
      29             : // * All intrinsics have a C++ implementation Runtime_##name.
      30             : //
      31             : // * Each compiler has an explicit list of intrisics it supports, falling back
      32             : //   to a simple runtime call if necessary.
      33             : 
      34             : 
      35             : // Entries have the form F(name, number of arguments, number of values):
      36             : // A variable number of arguments is specified by a -1, additional restrictions
      37             : // are specified by inline comments
      38             : 
      39             : #define FOR_EACH_INTRINSIC_ARRAY(F) \
      40             :   F(TransitionElementsKind, 2, 1)   \
      41             :   F(RemoveArrayHoles, 2, 1)         \
      42             :   F(MoveArrayContents, 2, 1)        \
      43             :   F(EstimateNumberOfElements, 1, 1) \
      44             :   F(GetArrayKeys, 2, 1)             \
      45             :   F(NewArray, -1 /* >= 3 */, 1)     \
      46             :   F(FunctionBind, -1, 1)            \
      47             :   F(NormalizeElements, 1, 1)        \
      48             :   F(GrowArrayElements, 2, 1)        \
      49             :   F(HasComplexElements, 1, 1)       \
      50             :   F(IsArray, 1, 1)                  \
      51             :   F(ArrayIsArray, 1, 1)             \
      52             :   F(ArraySpeciesConstructor, 1, 1)  \
      53             :   F(ArrayIncludes_Slow, 3, 1)       \
      54             :   F(ArrayIndexOf, 3, 1)             \
      55             :   F(SpreadIterablePrepare, 1, 1)
      56             : 
      57             : #define FOR_EACH_INTRINSIC_ATOMICS(F)           \
      58             :   F(ThrowNotIntegerSharedTypedArrayError, 1, 1) \
      59             :   F(ThrowNotInt32SharedTypedArrayError, 1, 1)   \
      60             :   F(ThrowInvalidAtomicAccessIndexError, 0, 1)   \
      61             :   F(AtomicsExchange, 3, 1)                      \
      62             :   F(AtomicsCompareExchange, 4, 1)               \
      63             :   F(AtomicsAdd, 3, 1)                           \
      64             :   F(AtomicsSub, 3, 1)                           \
      65             :   F(AtomicsAnd, 3, 1)                           \
      66             :   F(AtomicsOr, 3, 1)                            \
      67             :   F(AtomicsXor, 3, 1)                           \
      68             :   F(AtomicsNumWaitersForTesting, 2, 1)          \
      69             :   F(SetAllowAtomicsWait, 1, 1)
      70             : 
      71             : #define FOR_EACH_INTRINSIC_BIGINT(F) \
      72             :   F(BigIntBinaryOp, 3, 1)            \
      73             :   F(BigIntEqual, 2, 1)               \
      74             :   F(BigIntEqualToNumber, 2, 1)       \
      75             :   F(BigIntEqualToString, 2, 1)       \
      76             :   F(BigIntToBoolean, 1, 1)           \
      77             :   F(BigIntUnaryOp, 2, 1)
      78             : 
      79             : #define FOR_EACH_INTRINSIC_CLASSES(F)        \
      80             :   F(ThrowUnsupportedSuperError, 0, 1)        \
      81             :   F(ThrowConstructorNonCallableError, 1, 1)  \
      82             :   F(ThrowStaticPrototypeError, 0, 1)         \
      83             :   F(ThrowSuperAlreadyCalledError, 0, 1)      \
      84             :   F(ThrowSuperNotCalled, 0, 1)               \
      85             :   F(ThrowNotSuperConstructor, 2, 1)          \
      86             :   F(HomeObjectSymbol, 0, 1)                  \
      87             :   F(DefineClass, 4, 1)                       \
      88             :   F(InstallClassNameAccessor, 1, 1)          \
      89             :   F(InstallClassNameAccessorWithCheck, 1, 1) \
      90             :   F(LoadFromSuper, 3, 1)                     \
      91             :   F(LoadKeyedFromSuper, 3, 1)                \
      92             :   F(StoreToSuper_Strict, 4, 1)               \
      93             :   F(StoreToSuper_Sloppy, 4, 1)               \
      94             :   F(StoreKeyedToSuper_Strict, 4, 1)          \
      95             :   F(StoreKeyedToSuper_Sloppy, 4, 1)          \
      96             :   F(GetSuperConstructor, 1, 1)
      97             : 
      98             : #define FOR_EACH_INTRINSIC_COLLECTIONS(F) \
      99             :   F(TheHole, 0, 1)                        \
     100             :   F(GenericHash, 1, 1)                    \
     101             :   F(GetExistingHash, 1, 1)                \
     102             :   F(SetGrow, 1, 1)                        \
     103             :   F(SetShrink, 1, 1)                      \
     104             :   F(SetIteratorClone, 1, 1)               \
     105             :   F(MapShrink, 1, 1)                      \
     106             :   F(MapGrow, 1, 1)                        \
     107             :   F(MapIteratorClone, 1, 1)               \
     108             :   F(GetWeakMapEntries, 2, 1)              \
     109             :   F(WeakCollectionInitialize, 1, 1)       \
     110             :   F(WeakCollectionDelete, 3, 1)           \
     111             :   F(WeakCollectionSet, 4, 1)              \
     112             :   F(GetWeakSetValues, 2, 1)               \
     113             :   F(IsJSMap, 1, 1)                        \
     114             :   F(IsJSSet, 1, 1)                        \
     115             :   F(IsJSWeakMap, 1, 1)                    \
     116             :   F(IsJSWeakSet, 1, 1)
     117             : 
     118             : #define FOR_EACH_INTRINSIC_COMPILER(F)    \
     119             :   F(CompileLazy, 1, 1)                    \
     120             :   F(CompileOptimized_Concurrent, 1, 1)    \
     121             :   F(CompileOptimized_NotConcurrent, 1, 1) \
     122             :   F(EvictOptimizedCodeSlot, 1, 1)         \
     123             :   F(NotifyDeoptimized, 0, 1)              \
     124             :   F(CompileForOnStackReplacement, 1, 1)   \
     125             :   F(ResolvePossiblyDirectEval, 6, 1)      \
     126             :   F(InstantiateAsmJs, 4, 1)
     127             : 
     128             : #define FOR_EACH_INTRINSIC_DATE(F) \
     129             :   F(IsDate, 1, 1)                  \
     130             :   F(DateCurrentTime, 0, 1)         \
     131             :   F(ThrowNotDateError, 0, 1)
     132             : 
     133             : #define FOR_EACH_INTRINSIC_DEBUG(F)             \
     134             :   F(HandleDebuggerStatement, 0, 1)              \
     135             :   F(DebugBreakOnBytecode, 1, 1)                 \
     136             :   F(SetDebugEventListener, 2, 1)                \
     137             :   F(ScheduleBreak, 0, 1)                        \
     138             :   F(DebugGetInternalProperties, 1, 1)           \
     139             :   F(DebugGetPropertyDetails, 2, 1)              \
     140             :   F(DebugGetProperty, 2, 1)                     \
     141             :   F(DebugPropertyKindFromDetails, 1, 1)         \
     142             :   F(DebugPropertyAttributesFromDetails, 1, 1)   \
     143             :   F(CheckExecutionState, 1, 1)                  \
     144             :   F(GetFrameCount, 1, 1)                        \
     145             :   F(GetFrameDetails, 2, 1)                      \
     146             :   F(GetScopeCount, 2, 1)                        \
     147             :   F(GetScopeDetails, 4, 1)                      \
     148             :   F(GetAllScopesDetails, 4, 1)                  \
     149             :   F(GetFunctionScopeCount, 1, 1)                \
     150             :   F(GetFunctionScopeDetails, 2, 1)              \
     151             :   F(GetGeneratorScopeCount, 1, 1)               \
     152             :   F(GetGeneratorScopeDetails, 2, 1)             \
     153             :   F(SetScopeVariableValue, 6, 1)                \
     154             :   F(DebugPrintScopes, 0, 1)                     \
     155             :   F(SetBreakPointsActive, 1, 1)                 \
     156             :   F(GetBreakLocations, 1, 1)                    \
     157             :   F(SetFunctionBreakPoint, 3, 1)                \
     158             :   F(SetScriptBreakPoint, 3, 1)                  \
     159             :   F(ClearBreakPoint, 1, 1)                      \
     160             :   F(ChangeBreakOnException, 2, 1)               \
     161             :   F(IsBreakOnException, 1, 1)                   \
     162             :   F(PrepareStep, 2, 1)                          \
     163             :   F(ClearStepping, 0, 1)                        \
     164             :   F(DebugEvaluate, 5, 1)                        \
     165             :   F(DebugEvaluateGlobal, 2, 1)                  \
     166             :   F(DebugGetLoadedScripts, 0, 1)                \
     167             :   F(DebugReferencedBy, 3, 1)                    \
     168             :   F(DebugConstructedBy, 2, 1)                   \
     169             :   F(DebugGetPrototype, 1, 1)                    \
     170             :   F(DebugSetScriptSource, 2, 1)                 \
     171             :   F(FunctionGetInferredName, 1, 1)              \
     172             :   F(FunctionGetDebugName, 1, 1)                 \
     173             :   F(GetDebugContext, 0, 1)                      \
     174             :   F(CollectGarbage, 1, 1)                       \
     175             :   F(GetHeapUsage, 0, 1)                         \
     176             :   F(GetScript, 1, 1)                            \
     177             :   F(ScriptLineCount, 1, 1)                      \
     178             :   F(ScriptLineStartPosition, 2, 1)              \
     179             :   F(ScriptLineEndPosition, 2, 1)                \
     180             :   F(ScriptLocationFromLine, 4, 1)               \
     181             :   F(ScriptLocationFromLine2, 4, 1)              \
     182             :   F(ScriptPositionInfo, 3, 1)                   \
     183             :   F(ScriptPositionInfo2, 3, 1)                  \
     184             :   F(ScriptSourceLine, 2, 1)                     \
     185             :   F(DebugOnFunctionCall, 1, 1)                  \
     186             :   F(DebugPrepareStepInSuspendedGenerator, 0, 1) \
     187             :   F(DebugRecordGenerator, 1, 1)                 \
     188             :   F(DebugPushPromise, 1, 1)                     \
     189             :   F(DebugPopPromise, 0, 1)                      \
     190             :   F(DebugPromiseReject, 2, 1)                   \
     191             :   F(DebugAsyncEventEnqueueRecurring, 2, 1)      \
     192             :   F(DebugAsyncFunctionPromiseCreated, 1, 1)     \
     193             :   F(DebugIsActive, 0, 1)                        \
     194             :   F(DebugBreakInOptimizedCode, 0, 1)            \
     195             :   F(DebugCollectCoverage, 0, 1)                 \
     196             :   F(DebugTogglePreciseCoverage, 1, 1)           \
     197             :   F(DebugToggleBlockCoverage, 1, 1)             \
     198             :   F(IncBlockCounter, 2, 1)
     199             : 
     200             : #define FOR_EACH_INTRINSIC_ERROR(F) F(ErrorToString, 1, 1)
     201             : 
     202             : #define FOR_EACH_INTRINSIC_FORIN(F) \
     203             :   F(ForInEnumerate, 1, 1)           \
     204             :   F(ForInHasProperty, 2, 1)
     205             : 
     206             : #ifdef V8_TRACE_IGNITION
     207             : #define FOR_EACH_INTRINSIC_INTERPRETER_TRACE(F) \
     208             :   F(InterpreterTraceBytecodeEntry, 3, 1)        \
     209             :   F(InterpreterTraceBytecodeExit, 3, 1)
     210             : #else
     211             : #define FOR_EACH_INTRINSIC_INTERPRETER_TRACE(F)
     212             : #endif
     213             : 
     214             : #define FOR_EACH_INTRINSIC_INTERPRETER(F) \
     215             :   FOR_EACH_INTRINSIC_INTERPRETER_TRACE(F) \
     216             :   F(InterpreterNewClosure, 4, 1)
     217             : 
     218             : #define FOR_EACH_INTRINSIC_FUNCTION(F)     \
     219             :   F(FunctionGetName, 1, 1)                 \
     220             :   F(FunctionGetScript, 1, 1)               \
     221             :   F(FunctionGetScriptId, 1, 1)             \
     222             :   F(FunctionGetSourceCode, 1, 1)           \
     223             :   F(FunctionGetScriptSourcePosition, 1, 1) \
     224             :   F(FunctionGetContextData, 1, 1)          \
     225             :   F(FunctionSetLength, 2, 1)               \
     226             :   F(FunctionSetPrototype, 2, 1)            \
     227             :   F(FunctionIsAPIFunction, 1, 1)           \
     228             :   F(SetCode, 2, 1)                         \
     229             :   F(SetNativeFlag, 1, 1)                   \
     230             :   F(IsConstructor, 1, 1)                   \
     231             :   F(Call, -1 /* >= 2 */, 1)                \
     232             :   F(ConvertReceiver, 1, 1)                 \
     233             :   F(IsFunction, 1, 1)                      \
     234             :   F(FunctionToString, 1, 1)
     235             : 
     236             : #define FOR_EACH_INTRINSIC_GENERATOR(F) \
     237             :   F(CreateJSGeneratorObject, 2, 1)      \
     238             :   F(GeneratorClose, 1, 1)               \
     239             :   F(GeneratorGetFunction, 1, 1)         \
     240             :   F(GeneratorGetReceiver, 1, 1)         \
     241             :   F(GeneratorGetContext, 1, 1)          \
     242             :   F(GeneratorGetInputOrDebugPos, 1, 1)  \
     243             :   F(AsyncGeneratorResolve, 3, 1)        \
     244             :   F(AsyncGeneratorReject, 2, 1)         \
     245             :   F(AsyncGeneratorYield, 3, 1)          \
     246             :   F(GeneratorGetContinuation, 1, 1)     \
     247             :   F(GeneratorGetSourcePosition, 1, 1)   \
     248             :   F(GeneratorGetResumeMode, 1, 1)       \
     249             :   F(AsyncGeneratorHasCatchHandlerForPC, 1, 1)
     250             : 
     251             : #ifdef V8_INTL_SUPPORT
     252             : #define FOR_EACH_INTRINSIC_INTL(F)           \
     253             :   F(CanonicalizeLanguageTag, 1, 1)           \
     254             :   F(AvailableLocalesOf, 1, 1)                \
     255             :   F(GetDefaultICULocale, 0, 1)               \
     256             :   F(IsInitializedIntlObject, 1, 1)           \
     257             :   F(IsInitializedIntlObjectOfType, 2, 1)     \
     258             :   F(MarkAsInitializedIntlObjectOfType, 2, 1) \
     259             :   F(CreateDateTimeFormat, 3, 1)              \
     260             :   F(InternalDateFormat, 2, 1)                \
     261             :   F(InternalDateFormatToParts, 2, 1)         \
     262             :   F(CreateNumberFormat, 3, 1)                \
     263             :   F(InternalNumberFormat, 2, 1)              \
     264             :   F(CurrencyDigits, 1, 1)                    \
     265             :   F(CreateCollator, 3, 1)                    \
     266             :   F(InternalCompare, 3, 1)                   \
     267             :   F(CreatePluralRules, 3, 1)                 \
     268             :   F(PluralRulesSelect, 2, 1)                 \
     269             :   F(CreateBreakIterator, 3, 1)               \
     270             :   F(BreakIteratorAdoptText, 2, 1)            \
     271             :   F(BreakIteratorFirst, 1, 1)                \
     272             :   F(BreakIteratorNext, 1, 1)                 \
     273             :   F(BreakIteratorCurrent, 1, 1)              \
     274             :   F(BreakIteratorBreakType, 1, 1)            \
     275             :   F(StringToLowerCaseIntl, 1, 1)             \
     276             :   F(StringToUpperCaseIntl, 1, 1)             \
     277             :   F(StringLocaleConvertCase, 3, 1)           \
     278             :   F(DateCacheVersion, 0, 1)
     279             : #else
     280             : #define FOR_EACH_INTRINSIC_INTL(F)
     281             : #endif
     282             : 
     283             : #define FOR_EACH_INTRINSIC_INTERNAL(F)                               \
     284             :   F(AllocateInNewSpace, 1, 1)                                        \
     285             :   F(AllocateInTargetSpace, 2, 1)                                     \
     286             :   F(AllocateSeqOneByteString, 1, 1)                                  \
     287             :   F(AllocateSeqTwoByteString, 1, 1)                                  \
     288             :   F(CheckIsBootstrapping, 0, 1)                                      \
     289             :   F(CreateAsyncFromSyncIterator, 1, 1)                               \
     290             :   F(CreateListFromArrayLike, 1, 1)                                   \
     291             :   F(DeserializeLazy, 1, 1)                                           \
     292             :   F(GetAndResetRuntimeCallStats, -1 /* <= 2 */, 1)                   \
     293             :   F(ExportFromRuntime, 1, 1)                                         \
     294             :   F(IncrementUseCounter, 1, 1)                                       \
     295             :   F(IncrementUseCounterConstructorReturnNonUndefinedPrimitive, 0, 1) \
     296             :   F(InstallToContext, 1, 1)                                          \
     297             :   F(Interrupt, 0, 1)                                                 \
     298             :   F(IS_VAR, 1, 1)                                                    \
     299             :   F(NewReferenceError, 2, 1)                                         \
     300             :   F(NewSyntaxError, 2, 1)                                            \
     301             :   F(NewTypeError, 2, 1)                                              \
     302             :   F(OrdinaryHasInstance, 2, 1)                                       \
     303             :   F(PromoteScheduledException, 0, 1)                                 \
     304             :   F(ReThrow, 1, 1)                                                   \
     305             :   F(RunMicrotasks, 0, 1)                                             \
     306             :   F(StackGuard, 0, 1)                                                \
     307             :   F(Throw, 1, 1)                                                     \
     308             :   F(ThrowApplyNonFunction, 1, 1)                                     \
     309             :   F(ThrowCannotConvertToPrimitive, 0, 1)                             \
     310             :   F(ThrowCalledNonCallable, 1, 1)                                    \
     311             :   F(ThrowCalledOnNullOrUndefined, 1, 1)                              \
     312             :   F(ThrowConstructedNonConstructable, 1, 1)                          \
     313             :   F(ThrowConstructorReturnedNonObject, 0, 1)                         \
     314             :   F(ThrowGeneratorRunning, 0, 1)                                     \
     315             :   F(ThrowIncompatibleMethodReceiver, 2, 1)                           \
     316             :   F(ThrowInvalidHint, 1, 1)                                          \
     317             :   F(ThrowInvalidStringLength, 0, 1)                                  \
     318             :   F(ThrowInvalidTypedArrayAlignment, 2, 1)                           \
     319             :   F(ThrowIteratorResultNotAnObject, 1, 1)                            \
     320             :   F(ThrowThrowMethodMissing, 0, 1)                                   \
     321             :   F(ThrowSymbolIteratorInvalid, 0, 1)                                \
     322             :   F(ThrowNonCallableInInstanceOfCheck, 0, 1)                         \
     323             :   F(ThrowNonObjectInInstanceOfCheck, 0, 1)                           \
     324             :   F(ThrowNotConstructor, 1, 1)                                       \
     325             :   F(ThrowRangeError, -1 /* >= 1 */, 1)                               \
     326             :   F(ThrowReferenceError, 1, 1)                                       \
     327             :   F(ThrowStackOverflow, 0, 1)                                        \
     328             :   F(ThrowSymbolAsyncIteratorInvalid, 0, 1)                           \
     329             :   F(ThrowTypeError, -1 /* >= 1 */, 1)                                \
     330             :   F(ThrowUndefinedOrNullToObject, 1, 1)                              \
     331             :   F(Typeof, 1, 1)                                                    \
     332             :   F(UnwindAndFindExceptionHandler, 0, 1)                             \
     333             :   F(AllowDynamicFunction, 1, 1)                                      \
     334             :   F(GetTemplateObject, 1, 1)
     335             : 
     336             : #define FOR_EACH_INTRINSIC_LITERALS(F) \
     337             :   F(CreateRegExpLiteral, 4, 1)         \
     338             :   F(CreateObjectLiteral, 4, 1)         \
     339             :   F(CreateArrayLiteral, 4, 1)
     340             : 
     341             : #define FOR_EACH_INTRINSIC_LIVEEDIT(F)              \
     342             :   F(LiveEditFindSharedFunctionInfosForScript, 1, 1) \
     343             :   F(LiveEditGatherCompileInfo, 2, 1)                \
     344             :   F(LiveEditReplaceScript, 3, 1)                    \
     345             :   F(LiveEditFunctionSourceUpdated, 2, 1)            \
     346             :   F(LiveEditReplaceFunctionCode, 2, 1)              \
     347             :   F(LiveEditFixupScript, 2, 1)                      \
     348             :   F(LiveEditFunctionSetScript, 2, 1)                \
     349             :   F(LiveEditReplaceRefToNestedFunction, 3, 1)       \
     350             :   F(LiveEditPatchFunctionPositions, 2, 1)           \
     351             :   F(LiveEditCheckAndDropActivations, 3, 1)          \
     352             :   F(LiveEditCompareStrings, 2, 1)                   \
     353             :   F(LiveEditRestartFrame, 2, 1)
     354             : 
     355             : #define FOR_EACH_INTRINSIC_MATHS(F) F(GenerateRandomNumbers, 0, 1)
     356             : 
     357             : #define FOR_EACH_INTRINSIC_MODULE(F) \
     358             :   F(DynamicImportCall, 2, 1)         \
     359             :   F(GetImportMetaObject, 0, 1)       \
     360             :   F(GetModuleNamespace, 1, 1)        \
     361             :   F(LoadModuleVariable, 1, 1)        \
     362             :   F(StoreModuleVariable, 2, 1)
     363             : 
     364             : #define FOR_EACH_INTRINSIC_NUMBERS(F)  \
     365             :   F(IsValidSmi, 1, 1)                  \
     366             :   F(StringToNumber, 1, 1)              \
     367             :   F(StringParseInt, 2, 1)              \
     368             :   F(StringParseFloat, 1, 1)            \
     369             :   F(NumberToString, 1, 1)              \
     370             :   F(NumberToStringSkipCache, 1, 1)     \
     371             :   F(NumberToSmi, 1, 1)                 \
     372             :   F(SmiLexicographicCompare, 2, 1)     \
     373             :   F(MaxSmi, 0, 1)                      \
     374             :   F(IsSmi, 1, 1)                       \
     375             :   F(GetHoleNaNUpper, 0, 1)             \
     376             :   F(GetHoleNaNLower, 0, 1)
     377             : 
     378             : #define FOR_EACH_INTRINSIC_OBJECT(F)                            \
     379             :   F(AddDictionaryProperty, 3, 1)                                \
     380             :   F(GetPrototype, 1, 1)                                         \
     381             :   F(ObjectKeys, 1, 1)                                           \
     382             :   F(ObjectHasOwnProperty, 2, 1)                                 \
     383             :   F(ObjectCreate, 2, 1)                                         \
     384             :   F(InternalSetPrototype, 2, 1)                                 \
     385             :   F(OptimizeObjectForAddingMultipleProperties, 2, 1)            \
     386             :   F(GetProperty, 2, 1)                                          \
     387             :   F(KeyedGetProperty, 2, 1)                                     \
     388             :   F(AddNamedProperty, 4, 1)                                     \
     389             :   F(SetProperty, 4, 1)                                          \
     390             :   F(AddElement, 3, 1)                                           \
     391             :   F(AppendElement, 2, 1)                                        \
     392             :   F(DeleteProperty, 3, 1)                                       \
     393             :   F(ShrinkPropertyDictionary, 1, 1)                             \
     394             :   F(HasProperty, 2, 1)                                          \
     395             :   F(GetOwnPropertyKeys, 2, 1)                                   \
     396             :   F(GetInterceptorInfo, 1, 1)                                   \
     397             :   F(ToFastProperties, 1, 1)                                     \
     398             :   F(AllocateHeapNumber, 0, 1)                                   \
     399             :   F(NewObject, 2, 1)                                            \
     400             :   F(FinalizeInstanceSize, 1, 1)                                 \
     401             :   F(LoadMutableDouble, 2, 1)                                    \
     402             :   F(TryMigrateInstance, 1, 1)                                   \
     403             :   F(IsJSGlobalProxy, 1, 1)                                      \
     404             :   F(DefineAccessorPropertyUnchecked, 5, 1)                      \
     405             :   F(DefineDataPropertyInLiteral, 6, 1)                          \
     406             :   F(CollectTypeProfile, 3, 1)                                   \
     407             :   F(GetDataProperty, 2, 1)                                      \
     408             :   F(GetConstructorName, 1, 1)                                   \
     409             :   F(HasFastPackedElements, 1, 1)                                \
     410             :   F(ValueOf, 1, 1)                                              \
     411             :   F(IsJSReceiver, 1, 1)                                         \
     412             :   F(ClassOf, 1, 1)                                              \
     413             :   F(CopyDataProperties, 2, 1)                                   \
     414             :   F(CopyDataPropertiesWithExcludedProperties, -1 /* >= 1 */, 1) \
     415             :   F(DefineGetterPropertyUnchecked, 4, 1)                        \
     416             :   F(DefineSetterPropertyUnchecked, 4, 1)                        \
     417             :   F(DefineMethodsInternal, 3, 1)                                \
     418             :   F(ToObject, 1, 1)                                             \
     419             :   F(ToPrimitive, 1, 1)                                          \
     420             :   F(ToPrimitive_Number, 1, 1)                                   \
     421             :   F(ToNumber, 1, 1)                                             \
     422             :   F(ToNumeric, 1, 1)                                            \
     423             :   F(ToInteger, 1, 1)                                            \
     424             :   F(ToLength, 1, 1)                                             \
     425             :   F(ToString, 1, 1)                                             \
     426             :   F(ToName, 1, 1)                                               \
     427             :   F(SameValue, 2, 1)                                            \
     428             :   F(SameValueZero, 2, 1)                                        \
     429             :   F(Compare, 3, 1)                                              \
     430             :   F(HasInPrototypeChain, 2, 1)                                  \
     431             :   F(CreateIterResultObject, 2, 1)                               \
     432             :   F(CreateDataProperty, 3, 1)                                   \
     433             :   F(IterableToListCanBeElided, 1, 1)                            \
     434             :   F(GetOwnPropertyDescriptor, 2, 1)
     435             : 
     436             : #define FOR_EACH_INTRINSIC_OPERATORS(F) \
     437             :   F(Multiply, 2, 1)                     \
     438             :   F(Divide, 2, 1)                       \
     439             :   F(Modulus, 2, 1)                      \
     440             :   F(Add, 2, 1)                          \
     441             :   F(Subtract, 2, 1)                     \
     442             :   F(ShiftLeft, 2, 1)                    \
     443             :   F(ShiftRight, 2, 1)                   \
     444             :   F(ShiftRightLogical, 2, 1)            \
     445             :   F(BitwiseAnd, 2, 1)                   \
     446             :   F(BitwiseOr, 2, 1)                    \
     447             :   F(BitwiseXor, 2, 1)                   \
     448             :   F(Equal, 2, 1)                        \
     449             :   F(NotEqual, 2, 1)                     \
     450             :   F(StrictEqual, 2, 1)                  \
     451             :   F(StrictNotEqual, 2, 1)               \
     452             :   F(LessThan, 2, 1)                     \
     453             :   F(GreaterThan, 2, 1)                  \
     454             :   F(LessThanOrEqual, 2, 1)              \
     455             :   F(GreaterThanOrEqual, 2, 1)           \
     456             :   F(InstanceOf, 2, 1)
     457             : 
     458             : #define FOR_EACH_INTRINSIC_PROMISE(F)       \
     459             :   F(EnqueueMicrotask, 1, 1)                 \
     460             :   F(EnqueuePromiseReactionJob, 1, 1)        \
     461             :   F(EnqueuePromiseResolveThenableJob, 1, 1) \
     462             :   F(PromiseHookInit, 2, 1)                  \
     463             :   F(PromiseHookResolve, 1, 1)               \
     464             :   F(PromiseHookBefore, 1, 1)                \
     465             :   F(PromiseHookAfter, 1, 1)                 \
     466             :   F(PromiseMarkAsHandled, 1, 1)             \
     467             :   F(PromiseRejectEventFromStack, 2, 1)      \
     468             :   F(PromiseRevokeReject, 1, 1)              \
     469             :   F(PromiseResult, 1, 1)                    \
     470             :   F(PromiseStatus, 1, 1)                    \
     471             :   F(ReportPromiseReject, 2, 1)
     472             : 
     473             : #define FOR_EACH_INTRINSIC_PROXY(F) \
     474             :   F(IsJSProxy, 1, 1)                \
     475             :   F(JSProxyGetTarget, 1, 1)         \
     476             :   F(JSProxyGetHandler, 1, 1)        \
     477             :   F(JSProxyRevoke, 1, 1)            \
     478             :   F(GetPropertyWithReceiver, 2, 1)  \
     479             :   F(CheckProxyHasTrap, 2, 1)        \
     480             :   F(SetPropertyWithReceiver, 5, 1)  \
     481             :   F(CheckProxyGetSetTrapResult, 2, 1)
     482             : 
     483             : #define FOR_EACH_INTRINSIC_REGEXP(F)                \
     484             :   F(IsRegExp, 1, 1)                                 \
     485             :   F(RegExpExec, 4, 1)                               \
     486             :   F(RegExpExecMultiple, 4, 1)                       \
     487             :   F(RegExpExecReThrow, 0, 1)                        \
     488             :   F(RegExpInitializeAndCompile, 3, 1)               \
     489             :   F(RegExpInternalReplace, 3, 1)                    \
     490             :   F(RegExpReplace, 3, 1)                            \
     491             :   F(RegExpSplit, 3, 1)                              \
     492             :   F(StringReplaceGlobalRegExpWithString, 4, 1)      \
     493             :   F(StringReplaceNonGlobalRegExpWithFunction, 3, 1) \
     494             :   F(StringSplit, 3, 1)
     495             : 
     496             : #define FOR_EACH_INTRINSIC_SCOPES(F)      \
     497             :   F(ThrowConstAssignError, 0, 1)          \
     498             :   F(DeclareGlobals, 3, 1)                 \
     499             :   F(DeclareGlobalsForInterpreter, 3, 1)   \
     500             :   F(DeclareEvalFunction, 2, 1)            \
     501             :   F(DeclareEvalVar, 1, 1)                 \
     502             :   F(NewSloppyArguments_Generic, 1, 1)     \
     503             :   F(NewStrictArguments, 1, 1)             \
     504             :   F(NewRestParameter, 1, 1)               \
     505             :   F(NewSloppyArguments, 3, 1)             \
     506             :   F(NewArgumentsElements, 3, 1)           \
     507             :   F(NewClosure, 3, 1)                     \
     508             :   F(NewClosure_Tenured, 3, 1)             \
     509             :   F(NewScriptContext, 2, 1)               \
     510             :   F(NewFunctionContext, 2, 1)             \
     511             :   F(PushModuleContext, 3, 1)              \
     512             :   F(PushWithContext, 3, 1)                \
     513             :   F(PushCatchContext, 4, 1)               \
     514             :   F(PushBlockContext, 2, 1)               \
     515             :   F(DeleteLookupSlot, 1, 1)               \
     516             :   F(LoadLookupSlot, 1, 1)                 \
     517             :   F(LoadLookupSlotInsideTypeof, 1, 1)     \
     518             :   F(StoreLookupSlot_Sloppy, 2, 1)         \
     519             :   F(StoreLookupSlot_SloppyHoisting, 2, 1) \
     520             :   F(StoreLookupSlot_Strict, 2, 1)
     521             : 
     522             : #define FOR_EACH_INTRINSIC_STRINGS(F)     \
     523             :   F(GetSubstitution, 5, 1)                \
     524             :   F(StringReplaceOneCharWithString, 3, 1) \
     525             :   F(StringIncludes, 3, 1)                 \
     526             :   F(StringTrim, 2, 1)                     \
     527             :   F(StringIndexOf, 3, 1)                  \
     528             :   F(StringIndexOfUnchecked, 3, 1)         \
     529             :   F(StringLastIndexOf, 2, 1)              \
     530             :   F(SubString, 3, 1)                      \
     531             :   F(StringAdd, 2, 1)                      \
     532             :   F(InternalizeString, 1, 1)              \
     533             :   F(StringCharCodeAt, 2, 1)               \
     534             :   F(StringCompare, 2, 1)                  \
     535             :   F(StringBuilderConcat, 3, 1)            \
     536             :   F(StringBuilderJoin, 3, 1)              \
     537             :   F(SparseJoinWithSeparator, 3, 1)        \
     538             :   F(StringToArray, 2, 1)                  \
     539             :   F(StringLessThan, 2, 1)                 \
     540             :   F(StringLessThanOrEqual, 2, 1)          \
     541             :   F(StringGreaterThan, 2, 1)              \
     542             :   F(StringGreaterThanOrEqual, 2, 1)       \
     543             :   F(StringEqual, 2, 1)                    \
     544             :   F(StringNotEqual, 2, 1)                 \
     545             :   F(FlattenString, 1, 1)                  \
     546             :   F(StringCharFromCode, 1, 1)             \
     547             :   F(StringMaxLength, 0, 1)
     548             : 
     549             : #define FOR_EACH_INTRINSIC_SYMBOL(F) \
     550             :   F(CreateSymbol, 1, 1)              \
     551             :   F(CreatePrivateSymbol, 1, 1)       \
     552             :   F(SymbolDescription, 1, 1)         \
     553             :   F(SymbolDescriptiveString, 1, 1)   \
     554             :   F(SymbolIsPrivate, 1, 1)
     555             : 
     556             : #define FOR_EACH_INTRINSIC_TEST(F)            \
     557             :   F(ConstructDouble, 2, 1)                    \
     558             :   F(ConstructConsString, 2, 1)                \
     559             :   F(DeoptimizeFunction, 1, 1)                 \
     560             :   F(DeoptimizeNow, 0, 1)                      \
     561             :   F(RunningInSimulator, 0, 1)                 \
     562             :   F(IsConcurrentRecompilationSupported, 0, 1) \
     563             :   F(OptimizeFunctionOnNextCall, -1, 1)        \
     564             :   F(TypeProfile, 1, 1)                        \
     565             :   F(OptimizeOsr, -1, 1)                       \
     566             :   F(NeverOptimizeFunction, 1, 1)              \
     567             :   F(GetOptimizationStatus, -1, 1)             \
     568             :   F(UnblockConcurrentRecompilation, 0, 1)     \
     569             :   F(GetDeoptCount, 1, 1)                      \
     570             :   F(GetUndetectable, 0, 1)                    \
     571             :   F(GetCallable, 0, 1)                        \
     572             :   F(ClearFunctionFeedback, 1, 1)              \
     573             :   F(CheckWasmWrapperElision, 2, 1)            \
     574             :   F(NotifyContextDisposed, 0, 1)              \
     575             :   F(SetAllocationTimeout, -1 /* 2 || 3 */, 1) \
     576             :   F(DebugPrint, 1, 1)                         \
     577             :   F(DebugTrace, 0, 1)                         \
     578             :   F(DebugTrackRetainingPath, 1, 1)            \
     579             :   F(PrintWithNameForAssert, 2, 1)             \
     580             :   F(GetExceptionDetails, 1, 1)                \
     581             :   F(GlobalPrint, 1, 1)                        \
     582             :   F(SystemBreak, 0, 1)                        \
     583             :   F(SetFlags, 1, 1)                           \
     584             :   F(Abort, 1, 1)                              \
     585             :   F(AbortJS, 1, 1)                            \
     586             :   F(NativeScriptsCount, 0, 1)                 \
     587             :   F(DisassembleFunction, 1, 1)                \
     588             :   F(TraceEnter, 0, 1)                         \
     589             :   F(TraceExit, 1, 1)                          \
     590             :   F(HaveSameMap, 2, 1)                        \
     591             :   F(InNewSpace, 1, 1)                         \
     592             :   F(HasSmiElements, 1, 1)                     \
     593             :   F(HasObjectElements, 1, 1)                  \
     594             :   F(HasSmiOrObjectElements, 1, 1)             \
     595             :   F(HasDoubleElements, 1, 1)                  \
     596             :   F(HasHoleyElements, 1, 1)                   \
     597             :   F(HasDictionaryElements, 1, 1)              \
     598             :   F(HasSloppyArgumentsElements, 1, 1)         \
     599             :   F(HasFixedTypedArrayElements, 1, 1)         \
     600             :   F(HasFastProperties, 1, 1)                  \
     601             :   F(HasFixedUint8Elements, 1, 1)              \
     602             :   F(HasFixedInt8Elements, 1, 1)               \
     603             :   F(HasFixedUint16Elements, 1, 1)             \
     604             :   F(HasFixedInt16Elements, 1, 1)              \
     605             :   F(HasFixedUint32Elements, 1, 1)             \
     606             :   F(HasFixedInt32Elements, 1, 1)              \
     607             :   F(HasFixedFloat32Elements, 1, 1)            \
     608             :   F(HasFixedFloat64Elements, 1, 1)            \
     609             :   F(HasFixedUint8ClampedElements, 1, 1)       \
     610             :   F(SpeciesProtector, 0, 1)                   \
     611             :   F(SerializeWasmModule, 1, 1)                \
     612             :   F(DeserializeWasmModule, 2, 1)              \
     613             :   F(IsAsmWasmCode, 1, 1)                      \
     614             :   F(IsWasmCode, 1, 1)                         \
     615             :   F(IsWasmTrapHandlerEnabled, 0, 1)           \
     616             :   F(GetWasmRecoveredTrapCount, 0, 1)          \
     617             :   F(DisallowCodegenFromStrings, 1, 1)         \
     618             :   F(ValidateWasmInstancesChain, 2, 1)         \
     619             :   F(ValidateWasmModuleState, 1, 1)            \
     620             :   F(ValidateWasmOrphanedInstance, 1, 1)       \
     621             :   F(SetWasmCompileControls, 2, 1)             \
     622             :   F(SetWasmInstantiateControls, 0, 1)         \
     623             :   F(HeapObjectVerify, 1, 1)                   \
     624             :   F(WasmNumInterpretedCalls, 1, 1)            \
     625             :   F(RedirectToWasmInterpreter, 2, 1)          \
     626             :   F(WasmTraceMemory, 4, 1)
     627             : 
     628             : #define FOR_EACH_INTRINSIC_TYPEDARRAY(F) \
     629             :   F(ArrayBufferGetByteLength, 1, 1)      \
     630             :   F(ArrayBufferNeuter, 1, 1)             \
     631             :   F(TypedArrayCopyElements, 3, 1)        \
     632             :   F(ArrayBufferViewGetByteLength, 1, 1)  \
     633             :   F(ArrayBufferViewGetByteOffset, 1, 1)  \
     634             :   F(ArrayBufferViewWasNeutered, 1, 1)    \
     635             :   F(TypedArrayGetLength, 1, 1)           \
     636             :   F(TypedArrayGetBuffer, 1, 1)           \
     637             :   F(TypedArraySortFast, 1, 1)            \
     638             :   F(IsTypedArray, 1, 1)                  \
     639             :   F(IsSharedTypedArray, 1, 1)            \
     640             :   F(IsSharedIntegerTypedArray, 1, 1)     \
     641             :   F(IsSharedInteger32TypedArray, 1, 1)   \
     642             :   F(TypedArraySpeciesCreateByLength, 2, 1)
     643             : 
     644             : #define FOR_EACH_INTRINSIC_WASM(F)   \
     645             :   F(WasmGrowMemory, 1, 1)            \
     646             :   F(ThrowWasmError, 2, 1)            \
     647             :   F(ThrowWasmErrorFromTrapIf, 1, 1)  \
     648             :   F(ThrowWasmStackOverflow, 0, 1)    \
     649             :   F(WasmThrowTypeError, 0, 1)        \
     650             :   F(WasmThrowCreate, 2, 1)           \
     651             :   F(WasmThrow, 0, 1)                 \
     652             :   F(WasmGetExceptionRuntimeId, 0, 1) \
     653             :   F(WasmExceptionSetElement, 2, 1)   \
     654             :   F(WasmExceptionGetElement, 1, 1)   \
     655             :   F(WasmRunInterpreter, 3, 1)        \
     656             :   F(WasmStackGuard, 0, 1)            \
     657             :   F(WasmCompileLazy, 0, 1)
     658             : 
     659             : #define FOR_EACH_INTRINSIC_RETURN_PAIR(F) \
     660             :   F(LoadLookupSlotForCall, 1, 2)
     661             : 
     662             : // Most intrinsics are implemented in the runtime/ directory, but ICs are
     663             : // implemented in ic.cc for now.
     664             : #define FOR_EACH_INTRINSIC_IC(F)             \
     665             :   F(ElementsTransitionAndStoreIC_Miss, 6, 1) \
     666             :   F(KeyedLoadIC_Miss, 4, 1)                  \
     667             :   F(KeyedStoreIC_Miss, 5, 1)                 \
     668             :   F(KeyedStoreIC_Slow, 5, 1)                 \
     669             :   F(LoadElementWithInterceptor, 2, 1)        \
     670             :   F(LoadGlobalIC_Miss, 3, 1)                 \
     671             :   F(LoadGlobalIC_Slow, 3, 1)                 \
     672             :   F(LoadIC_Miss, 4, 1)                       \
     673             :   F(LoadPropertyWithInterceptor, 5, 1)       \
     674             :   F(StoreCallbackProperty, 6, 1)             \
     675             :   F(StoreGlobalIC_Slow, 5, 1)                \
     676             :   F(StoreIC_Miss, 5, 1)                      \
     677             :   F(StorePropertyWithInterceptor, 5, 1)      \
     678             :   F(Unreachable, 0, 1)
     679             : 
     680             : #define FOR_EACH_INTRINSIC_RETURN_OBJECT(F) \
     681             :   FOR_EACH_INTRINSIC_IC(F)                  \
     682             :   FOR_EACH_INTRINSIC_ARRAY(F)               \
     683             :   FOR_EACH_INTRINSIC_ATOMICS(F)             \
     684             :   FOR_EACH_INTRINSIC_BIGINT(F)              \
     685             :   FOR_EACH_INTRINSIC_CLASSES(F)             \
     686             :   FOR_EACH_INTRINSIC_COLLECTIONS(F)         \
     687             :   FOR_EACH_INTRINSIC_COMPILER(F)            \
     688             :   FOR_EACH_INTRINSIC_DATE(F)                \
     689             :   FOR_EACH_INTRINSIC_DEBUG(F)               \
     690             :   FOR_EACH_INTRINSIC_ERROR(F)               \
     691             :   FOR_EACH_INTRINSIC_FORIN(F)               \
     692             :   FOR_EACH_INTRINSIC_INTERPRETER(F)         \
     693             :   FOR_EACH_INTRINSIC_FUNCTION(F)            \
     694             :   FOR_EACH_INTRINSIC_GENERATOR(F)           \
     695             :   FOR_EACH_INTRINSIC_INTL(F)                \
     696             :   FOR_EACH_INTRINSIC_INTERNAL(F)            \
     697             :   FOR_EACH_INTRINSIC_LITERALS(F)            \
     698             :   FOR_EACH_INTRINSIC_LIVEEDIT(F)            \
     699             :   FOR_EACH_INTRINSIC_MATHS(F)               \
     700             :   FOR_EACH_INTRINSIC_MODULE(F)              \
     701             :   FOR_EACH_INTRINSIC_NUMBERS(F)             \
     702             :   FOR_EACH_INTRINSIC_OBJECT(F)              \
     703             :   FOR_EACH_INTRINSIC_OPERATORS(F)           \
     704             :   FOR_EACH_INTRINSIC_PROMISE(F)             \
     705             :   FOR_EACH_INTRINSIC_PROXY(F)               \
     706             :   FOR_EACH_INTRINSIC_REGEXP(F)              \
     707             :   FOR_EACH_INTRINSIC_SCOPES(F)              \
     708             :   FOR_EACH_INTRINSIC_STRINGS(F)             \
     709             :   FOR_EACH_INTRINSIC_SYMBOL(F)              \
     710             :   FOR_EACH_INTRINSIC_TEST(F)                \
     711             :   FOR_EACH_INTRINSIC_TYPEDARRAY(F)          \
     712             :   FOR_EACH_INTRINSIC_WASM(F)
     713             : 
     714             : // FOR_EACH_INTRINSIC defines the list of all intrinsics, coming in 2 flavors,
     715             : // either returning an object or a pair.
     716             : #define FOR_EACH_INTRINSIC(F)         \
     717             :   FOR_EACH_INTRINSIC_RETURN_PAIR(F)   \
     718             :   FOR_EACH_INTRINSIC_RETURN_OBJECT(F)
     719             : 
     720             : 
     721             : #define F(name, nargs, ressize)                                 \
     722             :   Object* Runtime_##name(int args_length, Object** args_object, \
     723             :                          Isolate* isolate);
     724             : FOR_EACH_INTRINSIC_RETURN_OBJECT(F)
     725             : #undef F
     726             : 
     727             : //---------------------------------------------------------------------------
     728             : // Runtime provides access to all C++ runtime functions.
     729             : 
     730             : class Runtime : public AllStatic {
     731             :  public:
     732             :   enum FunctionId : int32_t {
     733             : #define F(name, nargs, ressize) k##name,
     734             : #define I(name, nargs, ressize) kInline##name,
     735             :     FOR_EACH_INTRINSIC(F) FOR_EACH_INTRINSIC(I)
     736             : #undef I
     737             : #undef F
     738             :         kNumFunctions,
     739             :   };
     740             : 
     741             :   enum IntrinsicType { RUNTIME, INLINE };
     742             : 
     743             :   // Intrinsic function descriptor.
     744             :   struct Function {
     745             :     FunctionId function_id;
     746             :     IntrinsicType intrinsic_type;
     747             :     // The JS name of the function.
     748             :     const char* name;
     749             : 
     750             :     // For RUNTIME functions, this is the C++ entry point.
     751             :     // For INLINE functions this is the C++ entry point of the fall back.
     752             :     Address entry;
     753             : 
     754             :     // The number of arguments expected. nargs is -1 if the function takes
     755             :     // a variable number of arguments.
     756             :     int8_t nargs;
     757             :     // Size of result.  Most functions return a single pointer, size 1.
     758             :     int8_t result_size;
     759             :   };
     760             : 
     761             :   static const int kNotFound = -1;
     762             : 
     763             :   // Get the intrinsic function with the given name.
     764             :   static const Function* FunctionForName(const unsigned char* name, int length);
     765             : 
     766             :   // Get the intrinsic function with the given FunctionId.
     767             :   V8_EXPORT_PRIVATE static const Function* FunctionForId(FunctionId id);
     768             : 
     769             :   // Get the intrinsic function with the given function entry address.
     770             :   static const Function* FunctionForEntry(Address ref);
     771             : 
     772             :   // Get the runtime intrinsic function table.
     773             :   static const Function* RuntimeFunctionTable(Isolate* isolate);
     774             : 
     775             :   MUST_USE_RESULT static Maybe<bool> DeleteObjectProperty(
     776             :       Isolate* isolate, Handle<JSReceiver> receiver, Handle<Object> key,
     777             :       LanguageMode language_mode);
     778             : 
     779             :   MUST_USE_RESULT static MaybeHandle<Object> SetObjectProperty(
     780             :       Isolate* isolate, Handle<Object> object, Handle<Object> key,
     781             :       Handle<Object> value, LanguageMode language_mode);
     782             : 
     783             :   MUST_USE_RESULT static MaybeHandle<Object> GetObjectProperty(
     784             :       Isolate* isolate, Handle<Object> object, Handle<Object> key,
     785             :       bool* is_found_out = nullptr);
     786             : 
     787             :   MUST_USE_RESULT static MaybeHandle<JSArray> GetInternalProperties(
     788             :       Isolate* isolate, Handle<Object>);
     789             : 
     790             :   MUST_USE_RESULT static MaybeHandle<Object> ThrowIteratorError(
     791             :       Isolate* isolate, Handle<Object> object);
     792             : };
     793             : 
     794             : 
     795             : class RuntimeState {
     796             :  public:
     797             : #ifndef V8_INTL_SUPPORT
     798             :   unibrow::Mapping<unibrow::ToUppercase, 128>* to_upper_mapping() {
     799             :     return &to_upper_mapping_;
     800             :   }
     801             :   unibrow::Mapping<unibrow::ToLowercase, 128>* to_lower_mapping() {
     802             :     return &to_lower_mapping_;
     803             :   }
     804             : #endif
     805             : 
     806             :   Runtime::Function* redirected_intrinsic_functions() {
     807             :     return redirected_intrinsic_functions_.get();
     808             :   }
     809             : 
     810             :   void set_redirected_intrinsic_functions(
     811             :       Runtime::Function* redirected_intrinsic_functions) {
     812             :     redirected_intrinsic_functions_.reset(redirected_intrinsic_functions);
     813             :   }
     814             : 
     815             :  private:
     816       54999 :   RuntimeState() {}
     817             : #ifndef V8_INTL_SUPPORT
     818             :   unibrow::Mapping<unibrow::ToUppercase, 128> to_upper_mapping_;
     819             :   unibrow::Mapping<unibrow::ToLowercase, 128> to_lower_mapping_;
     820             : #endif
     821             : 
     822             :   std::unique_ptr<Runtime::Function[]> redirected_intrinsic_functions_;
     823             : 
     824             :   friend class Isolate;
     825             :   friend class Runtime;
     826             : 
     827             :   DISALLOW_COPY_AND_ASSIGN(RuntimeState);
     828             : };
     829             : 
     830             : V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, Runtime::FunctionId);
     831             : 
     832             : //---------------------------------------------------------------------------
     833             : // Constants used by interface to runtime functions.
     834             : 
     835             : class AllocateDoubleAlignFlag : public BitField<bool, 0, 1> {};
     836             : class AllocateTargetSpace : public BitField<AllocationSpace, 1, 3> {};
     837             : 
     838             : class DeclareGlobalsEvalFlag : public BitField<bool, 0, 1> {};
     839             : class DeclareGlobalsNativeFlag : public BitField<bool, 1, 1> {};
     840             : 
     841             : // A set of bits returned by Runtime_GetOptimizationStatus.
     842             : // These bits must be in sync with bits defined in test/mjsunit/mjsunit.js
     843             : enum class OptimizationStatus {
     844             :   kIsFunction = 1 << 0,
     845             :   kNeverOptimize = 1 << 1,
     846             :   kAlwaysOptimize = 1 << 2,
     847             :   kMaybeDeopted = 1 << 3,
     848             :   kOptimized = 1 << 4,
     849             :   kTurboFanned = 1 << 5,
     850             :   kInterpreted = 1 << 6,
     851             :   kMarkedForOptimization = 1 << 7,
     852             :   kMarkedForConcurrentOptimization = 1 << 8,
     853             :   kOptimizingConcurrently = 1 << 9,
     854             :   kIsExecuting = 1 << 10,
     855             :   kTopmostFrameIsTurboFanned = 1 << 11,
     856             : };
     857             : 
     858             : }  // namespace internal
     859             : }  // namespace v8
     860             : 
     861             : #endif  // V8_RUNTIME_RUNTIME_H_

Generated by: LCOV version 1.10