Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benjamingr/v8-natives-api
https://github.com/benjamingr/v8-natives-api
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/benjamingr/v8-natives-api
- Owner: benjamingr
- License: other
- Created: 2020-11-21T18:41:19.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-21T18:48:06.000Z (almost 4 years ago)
- Last Synced: 2024-10-19T05:02:20.457Z (19 days ago)
- Language: JavaScript
- Size: 21.5 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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',
];
```