Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/benjamingr/v8-natives-api


https://github.com/benjamingr/v8-natives-api

Last synced: 10 days ago
JSON representation

Awesome Lists containing this project

README

        

# v8-natives-api

Exposes natives functions accessible with the `--allow-natives-syntax` flag as a Node API:

```js
const api = require('v8-natives-syntax');

api.HasHoleyElements([1,,,3]); // true

api.OptimizeFunctionOnNextCall(someFunctionToOptimize);
```

### Warning

The API here may break at any moment should V8 choose to change the internal functions.

## Current function list

```js
const methodNames = [
'Abort',
'AbortJS',
'AbortCSAAssert',
'ArraySpeciesProtector',
'ClearFunctionFeedback',
'ClearMegamorphicStubCache',
'CompleteInobjectSlackTracking',
'ConstructConsString',
'ConstructDouble',
'ConstructSlicedString',
'DebugPrint',
'DebugPrintPtr',
'DebugTrace',
'DebugTrackRetainingPath',
'DeoptimizeFunction',
'DeserializeWasmModule',
'DisallowCodegenFromStrings',
'DisallowWasmCodegen',
'DisassembleFunction',
'DynamicMapChecksEnabled',
'EnableCodeLoggingForTesting',
'EnsureFeedbackVectorForFunction',
'FreezeWasmLazyCompilation',
'GetCallable',
'GetInitializerFunction',
'GetOptimizationStatus',
'GetUndetectable',
'GetWasmExceptionId',
'GetWasmExceptionValues',
'GetWasmRecoveredTrapCount',
'GlobalPrint',
'HasDictionaryElements',
'HasDoubleElements',
'HasElementsInALargeObjectSpace',
'HasFastElements',
'HasFastProperties',
'HasFixedBigInt64Elements',
'HasFixedBigUint64Elements',
'HasFixedFloat32Elements',
'HasFixedFloat64Elements',
'HasFixedInt16Elements',
'HasFixedInt32Elements',
'HasFixedInt8Elements',
'HasFixedUint16Elements',
'HasFixedUint32Elements',
'HasFixedUint8ClampedElements',
'HasFixedUint8Elements',
'HasHoleyElements',
'HasObjectElements',
'HasPackedElements',
'HasSloppyArgumentsElements',
'HasSmiElements',
'HasSmiOrObjectElements',
'HaveSameMap',
'HeapObjectVerify',
'ICsAreEnabled',
'InYoungGeneration',
'IsAsmWasmCode',
'IsBeingInterpreted',
'IsConcurrentRecompilationSupported',
'IsLiftoffFunction',
'IsThreadInWasm',
'IsWasmCode',
'IsWasmTrapHandlerEnabled',
'RegexpHasBytecode',
'RegexpHasNativeCode',
'RegexpTypeTag',
'MapIteratorProtector',
'NeverOptimizeFunction',
'NotifyContextDisposed',
'OptimizeFunctionOnNextCall',
'OptimizeOsr',
'NewRegExpWithBacktrackLimit',
'PrepareFunctionForOptimization',
'PrintWithNameForAssert',
'RunningInSimulator',
'RuntimeEvaluateREPL',
'SerializeDeserializeNow',
'SerializeWasmModule',
'SetAllocationTimeout',
'SetForceSlowPath',
'SetIteratorProtector',
'SetWasmCompileControls',
'SetWasmInstantiateControls',
'SetWasmThreadsEnabled',
'SimulateNewspaceFull',
'StringIteratorProtector',
'SystemBreak',
'TraceEnter',
'TraceExit',
'TurbofanStaticAssert',
'UnblockConcurrentRecompilation',
'WasmGetNumberOfInstances',
'WasmNumCodeSpaces',
'WasmTierDownModule',
'WasmTierUpFunction',
'WasmTierUpModule',
'WasmTraceEnter',
'WasmTraceExit',
'WasmTraceMemory',
'DeoptimizeNow',
// Strings
'FlattenString',
'GetSubstitution',
'InternalizeString',
'StringAdd',
'StringBuilderConcat',
'StringCharCodeAt',
'StringEqual',
'StringEscapeQuotes',
'StringGreaterThan',
'StringGreaterThanOrEqual',
'StringIncludes',
'StringIndexOf',
'StringIndexOfUnchecked',
'StringLastIndexOf',
'StringLessThan',
'StringLessThanOrEqual',
'StringMaxLength',
'StringReplaceOneCharWithString',
'StringCompareSequence',
'StringSubstring',
'StringToArray',
'StringTrim',
];
```