cengine

package
v0.33.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cengine is the C engine of engine/ generated as Go assembly, with its Go host. internal/goasm/gen/cmd/engine (make gen) writes the assembly and engine_decl_<arch>.go into this folder, for amd64 and arm64, next to the host files. The generated files are checked in, since a user of the module has no LLVM: a change to the C of engine/ or to the generator goes in with the files made again (make check-gen).

The host is a first one, for running scripts and measuring: VMs with their memory, clocks, seed and interrupt (package gohost answers the callbacks), Eval of a script to a string, RunGC, ReleaseMemory and Close with the count of blocks the engine still had. Registered Go functions, Builtin, Intl and Temporal are not there yet.

Index

Constants

View Source
const (
	RefCountOffset = layoutRefCountOffset // the int32 reference count, from the address a value holds
	StringLenMask  = layoutStringLenMask  // the length in the first uint32 of a string
	StringWideBit  = layoutStringWideBit  // set in it when the characters are 16-bit units
	StringChars    = layoutStringChars    // where the characters of a string start
	StringLenMax   = layoutStringLenMax   // the most characters a string holds

	AtomEmptyString  = atomEmptyString
	AtomFileName     = atomFileName
	AtomLineNumber   = atomLineNumber
	AtomColumnNumber = atomColumnNumber
	AtomMessage      = atomMessage
	AtomStack        = atomStack
	AtomName         = atomName
	AtomToString     = atomToString
	AtomThen         = atomThen
)

The layout of values, and the built-in atoms, of the engine the generator wrote (engine_decl_<arch>.go).

View Source
const (
	ShadowSize  = 1 << shadowSizeLog2
	ScratchSize = scratchSize
)

ShadowSize is the size of the shadow stack of a VM, and ScratchSize the bytes at its base the host keeps: every entry starts above them.

View Source
const DefaultShapeCache = 2048

DefaultShapeCache is the number of shapes of plain objects a new VM keeps after their last object is gone, as a VM of package beastjs does (beastjs.DefaultShapeCache): an object that gets the same keys in the same order as one before it finds its shapes kept.

View Source
const SPAlign = 16

SPAlign is the alignment of every shadow pointer the host passes the engine. The generated code lays out a frame at multiples of 16 bytes from the pointer it is given, and on amd64 it reads and writes a local of 16 bytes with SSE instructions that fault off 16 (docs/internals/changes/c-engine.md). So every shadow pointer the host makes comes from AlignSP.

Variables

View Source
var ErrBroken = errors.New("cengine: VM unusable after a panic in the engine, only Close works")

ErrBroken is what a VM returns after a panic or an abort left through engine frames.

View Source
var ErrClosed = errors.New("cengine: VM closed")

ErrClosed is what a VM returns, or panics with where it has no error to return, once Close began: also when Close failed to give all the memory back, since the engine is freed by then.

View Source
var ErrKilled = gohost.ErrKilled

ErrKilled is what Eval returns when the script did not stop by the grace after Interrupt and gohost.KillPolls polls (gohost.VM.SetKillGrace) and a poll killed it. The VM is broken then: only Close works. The other calls into the engine panic with it, as they do with ErrBroken.

Functions

func AlignSP

func AlignSP(p uintptr) uintptr

AlignSP rounds p up to a multiple of SPAlign: the shadow pointer of a call into the engine that starts at p or above.

func CheckSP

func CheckSP(sp uintptr)

CheckSP is where a test build stops a shadow pointer off SPAlign: every one comes from AlignSP, and a check on each call into the engine is not free, so the normal build has none.

func CreateArray

func CreateArray(sp, ctx, n, tab uintptr) (u, tag uintptr)

CreateArray is js_create_array, a new array of the n values at tab, which it borrows, made in one step as an array literal makes it.

func Free

func Free(sp, ctx, p uintptr)

Free is js_free, which frees what the engine gave a caller of the context, such as the bytes of JS_WriteObject.

func FreeRT

func FreeRT(sp, rt, p uintptr)

FreeRT is js_free_rt, which frees what Malloc gave.

func FreeValue

func FreeValue(sp, ctx, u, tag uintptr)

FreeValue is __JS_FreeValue, which frees a value whose reference count went to 0.

func JS_AddIntrinsicBaseObjects

func JS_AddIntrinsicBaseObjects(a0 uintptr, a1 uintptr)

func JS_AddIntrinsicBigInt

func JS_AddIntrinsicBigInt(a0 uintptr, a1 uintptr)

func JS_AddIntrinsicDate

func JS_AddIntrinsicDate(a0 uintptr, a1 uintptr)

func JS_AddIntrinsicEval

func JS_AddIntrinsicEval(a0 uintptr, a1 uintptr)

func JS_AddIntrinsicJSON

func JS_AddIntrinsicJSON(a0 uintptr, a1 uintptr)

func JS_AddIntrinsicMapSet

func JS_AddIntrinsicMapSet(a0 uintptr, a1 uintptr)

func JS_AddIntrinsicPromise

func JS_AddIntrinsicPromise(a0 uintptr, a1 uintptr)

func JS_AddIntrinsicProxy

func JS_AddIntrinsicProxy(a0 uintptr, a1 uintptr)

func JS_AddIntrinsicRegExp

func JS_AddIntrinsicRegExp(a0 uintptr, a1 uintptr)

func JS_AddIntrinsicRegExpCompiler

func JS_AddIntrinsicRegExpCompiler(a0 uintptr, a1 uintptr)

func JS_AddIntrinsicStringNormalize

func JS_AddIntrinsicStringNormalize(a0 uintptr, a1 uintptr)

func JS_AddIntrinsicTypedArrays

func JS_AddIntrinsicTypedArrays(a0 uintptr, a1 uintptr)

func JS_AddIntrinsicWeakRef

func JS_AddIntrinsicWeakRef(a0 uintptr, a1 uintptr)

func JS_AddModuleExport

func JS_AddModuleExport(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_AddModuleExportList

func JS_AddModuleExportList(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ArraySpeciesGetCtor

func JS_ArraySpeciesGetCtor(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_AtomGetStrRT

func JS_AtomGetStrRT(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_AtomIsArrayIndex

func JS_AtomIsArrayIndex(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_AtomIsNumericIndex

func JS_AtomIsNumericIndex(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_AtomIsNumericIndex1

func JS_AtomIsNumericIndex1(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_AtomToCStringLen

func JS_AtomToCStringLen(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_AtomToString

func JS_AtomToString(a0 uintptr, a1 uintptr, a2 uintptr) (r0, r1 uintptr)

func JS_AtomToValue

func JS_AtomToValue(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_AutoInitProperty

func JS_AutoInitProperty(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_Call

func JS_Call(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr, a7 uintptr) (r0, r1 uintptr)

func JS_CallConstructor

func JS_CallConstructor(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_CallConstructor2

func JS_CallConstructor2(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr, a7 uintptr)

func JS_CallConstructorInternal

func JS_CallConstructorInternal(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr, a7 uintptr, a8 uintptr)

func JS_CallFree

func JS_CallFree(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr, a7 uintptr)

func JS_CallInternal

func JS_CallInternal(a0 uintptr, a1 uintptr)

func JS_CheckBrand

func JS_CheckBrand(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_ClearKeptObjects

func JS_ClearKeptObjects(a0 uintptr, a1 uintptr)

func JS_CompactBigInt

func JS_CompactBigInt(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_ComputeMemoryUsage

func JS_ComputeMemoryUsage(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_ConcatString

func JS_ConcatString(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_ConcatString1

func JS_ConcatString1(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_ConcatString2

func JS_ConcatString2(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_ConcatString3

func JS_ConcatString3(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_ConcatStringAppend

func JS_ConcatStringAppend(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr)

func JS_ConcatStringInPlace

func JS_ConcatStringInPlace(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_CopySubArray

func JS_CopySubArray(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr, a7 uintptr)

func JS_CreateDataPropertyUint32

func JS_CreateDataPropertyUint32(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr, a7 uintptr)

func JS_CreateProperty

func JS_CreateProperty(a0 uintptr, a1 uintptr)

func JS_DefineObjectName

func JS_DefineObjectName(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_DefineObjectNameComputed

func JS_DefineObjectNameComputed(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_DefineProperty

func JS_DefineProperty(a0 uintptr, a1 uintptr)

func JS_DefinePropertyGetSet

func JS_DefinePropertyGetSet(a0 uintptr, a1 uintptr)

func JS_DefinePropertyValue

func JS_DefinePropertyValue(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr, a7 uintptr) uintptr

func JS_DefinePropertyValueInt64

func JS_DefinePropertyValueInt64(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr, a7 uintptr)

func JS_DefinePropertyValueStr

func JS_DefinePropertyValueStr(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr, a7 uintptr) uintptr

func JS_DefinePropertyValueUint32

func JS_DefinePropertyValueUint32(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr, a7 uintptr) uintptr

func JS_DefinePropertyValueValue

func JS_DefinePropertyValueValue(a0 uintptr, a1 uintptr)

func JS_DeleteProperty

func JS_DeleteProperty(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_DeletePropertyInt64

func JS_DeletePropertyInt64(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_DetachArrayBuffer

func JS_DetachArrayBuffer(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_DetectModule

func JS_DetectModule(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_DumpMemoryUsage

func JS_DumpMemoryUsage(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_DupAtom

func JS_DupAtom(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_DupContext

func JS_DupContext(a0 uintptr, a1 uintptr)

func JS_EnqueueJob

func JS_EnqueueJob(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_Eval

func JS_Eval(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr) (r0, r1 uintptr)

func JS_EvalFunction

func JS_EvalFunction(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr) (r0, r1 uintptr)

func JS_EvalFunctionInternal

func JS_EvalFunctionInternal(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr, a7 uintptr)

func JS_EvalObject

func JS_EvalObject(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_EvalThis

func JS_EvalThis(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr, a7 uintptr) (r0, r1 uintptr)

func JS_ExecutePendingJob

func JS_ExecutePendingJob(a0 uintptr, a1 uintptr, a2 uintptr) uintptr

func JS_FlattenIntoArray

func JS_FlattenIntoArray(a0 uintptr, a1 uintptr)

func JS_FreeAtom

func JS_FreeAtom(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_FreeAtomRT

func JS_FreeAtomRT(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_FreeAtomStruct

func JS_FreeAtomStruct(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_FreeCString

func JS_FreeCString(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_FreeContext

func JS_FreeContext(a0 uintptr, a1 uintptr)

func JS_FreeModuleTopLevel

func JS_FreeModuleTopLevel(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_FreePropertyEnum

func JS_FreePropertyEnum(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_FreeRuntime

func JS_FreeRuntime(a0 uintptr, a1 uintptr) uintptr

func JS_FreeValue

func JS_FreeValue(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_GetAnyOpaque

func JS_GetAnyOpaque(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_GetArrayBuffer

func JS_GetArrayBuffer(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_GetAsyncContext

func JS_GetAsyncContext(a0 uintptr, a1 uintptr) (r0, r1 uintptr)

func JS_GetCallDepth

func JS_GetCallDepth(a0 uintptr, a1 uintptr) uintptr

func JS_GetClassID

func JS_GetClassID(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_GetClassProto

func JS_GetClassProto(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_GetContextOpaque

func JS_GetContextOpaque(a0 uintptr, a1 uintptr)

func JS_GetException

func JS_GetException(a0 uintptr, a1 uintptr) (r0, r1 uintptr)

func JS_GetFunctionRealm

func JS_GetFunctionRealm(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_GetGCThreshold

func JS_GetGCThreshold(a0 uintptr, a1 uintptr) uintptr

func JS_GetGlobalObject

func JS_GetGlobalObject(a0 uintptr, a1 uintptr) (r0, r1 uintptr)

func JS_GetHostLimit

func JS_GetHostLimit(a0 uintptr, a1 uintptr) uintptr

func JS_GetImportMeta

func JS_GetImportMeta(a0 uintptr, a1 uintptr, a2 uintptr) (r0, r1 uintptr)

func JS_GetInternalDepth

func JS_GetInternalDepth(a0 uintptr, a1 uintptr)

func JS_GetInterruptFlag

func JS_GetInterruptFlag(a0 uintptr, a1 uintptr) uintptr

func JS_GetIterator

func JS_GetIterator(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_GetIterator2

func JS_GetIterator2(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_GetMaxCallDepth

func JS_GetMaxCallDepth(a0 uintptr, a1 uintptr)

func JS_GetMemoryFree

func JS_GetMemoryFree(a0 uintptr, a1 uintptr) uintptr

func JS_GetMemorySize

func JS_GetMemorySize(a0 uintptr, a1 uintptr) uintptr

func JS_GetModuleName

func JS_GetModuleName(a0 uintptr, a1 uintptr, a2 uintptr) uintptr

func JS_GetModuleNamespace

func JS_GetModuleNamespace(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_GetModulePrivateValue

func JS_GetModulePrivateValue(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_GetOpaque

func JS_GetOpaque(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_GetOpaque2

func JS_GetOpaque2(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_GetOwnProperty

func JS_GetOwnProperty(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr) uintptr

func JS_GetOwnPropertyInternal

func JS_GetOwnPropertyInternal(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_GetOwnPropertyNames

func JS_GetOwnPropertyNames(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr)

func JS_GetOwnPropertyNames2

func JS_GetOwnPropertyNames2(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_GetOwnPropertyNamesInternal

func JS_GetOwnPropertyNamesInternal(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_GetPropertyInt64

func JS_GetPropertyInt64(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_GetPropertyInternal

func JS_GetPropertyInternal(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr, a7 uintptr) (r0, r1 uintptr)

func JS_GetPropertyObj

func JS_GetPropertyObj(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_GetPropertyStr

func JS_GetPropertyStr(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr) (r0, r1 uintptr)

func JS_GetPropertyUint32

func JS_GetPropertyUint32(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_GetPropertyValue

func JS_GetPropertyValue(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_GetPrototype

func JS_GetPrototype(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr) (r0, r1 uintptr)

func JS_GetPrototypeFree

func JS_GetPrototypeFree(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_GetRuntime

func JS_GetRuntime(a0 uintptr, a1 uintptr)

func JS_GetRuntimeOpaque

func JS_GetRuntimeOpaque(a0 uintptr, a1 uintptr)

func JS_GetScriptOrModuleName

func JS_GetScriptOrModuleName(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_GetStripInfo

func JS_GetStripInfo(a0 uintptr, a1 uintptr)

func JS_GetTypedArrayBuffer

func JS_GetTypedArrayBuffer(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr)

func JS_HasException

func JS_HasException(a0 uintptr, a1 uintptr) uintptr

func JS_HasProperty

func JS_HasProperty(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_HasRejection

func JS_HasRejection(a0 uintptr, a1 uintptr, a2 uintptr) uintptr

func JS_InstantiateFunctionListItem2

func JS_InstantiateFunctionListItem2(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_Invoke

func JS_Invoke(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr)

func JS_InvokeFree

func JS_InvokeFree(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr)

func JS_IsArray

func JS_IsArray(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_IsCFunction

func JS_IsCFunction(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_IsConstructor

func JS_IsConstructor(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_IsError

func JS_IsError(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_IsException

func JS_IsException(a0 uintptr, a1 uintptr)

func JS_IsExtensible

func JS_IsExtensible(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_IsFunction

func JS_IsFunction(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr) uintptr

func JS_IsInstanceOf

func JS_IsInstanceOf(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_IsJobPending

func JS_IsJobPending(a0 uintptr, a1 uintptr)

func JS_IsLiveObject

func JS_IsLiveObject(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_IsRegisteredClass

func JS_IsRegisteredClass(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_IsUncatchableException

func JS_IsUncatchableException(a0 uintptr, a1 uintptr) uintptr

func JS_IteratorClose

func JS_IteratorClose(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_IteratorGetCompleteValue

func JS_IteratorGetCompleteValue(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_IteratorNext

func JS_IteratorNext(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr)

func JS_IteratorNext2

func JS_IteratorNext2(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr, a7 uintptr, a8 uintptr)

func JS_JSONStringify

func JS_JSONStringify(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6, a7 uintptr) (r0, r1 uintptr)

JS_JSONStringify stores its arguments in a block at the shadow pointer for JS_JSONStringify_block (gen.PackedGo).

func JS_JSONStringify_block

func JS_JSONStringify_block(a0 uintptr, a1 uintptr) (r0, r1 uintptr)

func JS_LoadModule

func JS_LoadModule(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_LoadModuleInternal

func JS_LoadModuleInternal(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr)

func JS_MarkValue

func JS_MarkValue(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_NewArray

func JS_NewArray(a0 uintptr, a1 uintptr) (r0, r1 uintptr)

func JS_NewArrayBuffer

func JS_NewArrayBuffer(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr)

func JS_NewArrayBufferCopy

func JS_NewArrayBufferCopy(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_NewAtom

func JS_NewAtom(a0 uintptr, a1 uintptr, a2 uintptr) uintptr

func JS_NewAtomInt64

func JS_NewAtomInt64(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_NewAtomLen

func JS_NewAtomLen(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr) uintptr

func JS_NewAtomStr

func JS_NewAtomStr(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_NewAtomString

func JS_NewAtomString(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_NewAtomUInt32

func JS_NewAtomUInt32(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_NewBigInt64

func JS_NewBigInt64(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_NewBigUint64

func JS_NewBigUint64(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_NewCConstructor

func JS_NewCConstructor(a0 uintptr, a1 uintptr)

func JS_NewCFunction2

func JS_NewCFunction2(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr)

func JS_NewCFunction3

func JS_NewCFunction3(a0 uintptr, a1 uintptr)

func JS_NewCFunctionData

func JS_NewCFunctionData(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr)

func JS_NewCModule

func JS_NewCModule(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_NewClass

func JS_NewClass(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_NewClassID

func JS_NewClassID(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_NewContext

func JS_NewContext(a0 uintptr, a1 uintptr) uintptr

func JS_NewContextRaw

func JS_NewContextRaw(a0 uintptr, a1 uintptr)

func JS_NewCopyPropsFunction

func JS_NewCopyPropsFunction(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr) (r0, r1 uintptr)

func JS_NewDate

func JS_NewDate(a0 uintptr, a1 uintptr, a2 float64)

func JS_NewEndTagFunction

func JS_NewEndTagFunction(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr) (r0, r1 uintptr)

func JS_NewError

func JS_NewError(a0 uintptr, a1 uintptr) (r0, r1 uintptr)

func JS_NewEscapeTextFunction

func JS_NewEscapeTextFunction(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr) (r0, r1 uintptr)

func JS_NewHostFunction

func JS_NewHostFunction(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr) (r0, r1 uintptr)

func JS_NewHostFunctionRelease

func JS_NewHostFunctionRelease(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr) (r0, r1 uintptr)

func JS_NewMurmur2Function

func JS_NewMurmur2Function(a0 uintptr, a1 uintptr) (r0, r1 uintptr)

func JS_NewObject

func JS_NewObject(a0 uintptr, a1 uintptr) (r0, r1 uintptr)

func JS_NewObjectClass

func JS_NewObjectClass(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_NewObjectFromShape

func JS_NewObjectFromShape(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_NewObjectProto

func JS_NewObjectProto(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_NewObjectProtoClass

func JS_NewObjectProtoClass(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_NewObjectProtoClassAlloc

func JS_NewObjectProtoClassAlloc(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_NewObjectProtoList

func JS_NewObjectProtoList(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_NewPromiseCapability

func JS_NewPromiseCapability(a0 uintptr, a1 uintptr, a2 uintptr) (r0, r1 uintptr)

func JS_NewRuntime

func JS_NewRuntime(a0 uintptr, a1 uintptr, a2 uintptr) uintptr

func JS_NewStartTagFunction

func JS_NewStartTagFunction(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr) (r0, r1 uintptr)

func JS_NewStringChars

func JS_NewStringChars(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr) (r0, r1 uintptr)

func JS_NewStringLen

func JS_NewStringLen(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr) (r0, r1 uintptr)

func JS_NewTypedArray

func JS_NewTypedArray(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_NewUint8ArrayCopy

func JS_NewUint8ArrayCopy(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_NumberIsNegativeOrMinusZero

func JS_NumberIsNegativeOrMinusZero(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_ObjectDefineProperties

func JS_ObjectDefineProperties(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_OrdinaryIsInstanceOf

func JS_OrdinaryIsInstanceOf(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_ParseJSON

func JS_ParseJSON(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ParseJSON2

func JS_ParseJSON2(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr) (r0, r1 uintptr)

func JS_ParseJSON3

func JS_ParseJSON3(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr)

func JS_PreventExtensions

func JS_PreventExtensions(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_PromiseResult

func JS_PromiseResult(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr) (r0, r1 uintptr)

func JS_PromiseState

func JS_PromiseState(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr) uintptr

func JS_ReadFunctionBytecode

func JS_ReadFunctionBytecode(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ReadFunctionTag

func JS_ReadFunctionTag(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_ReadModule

func JS_ReadModule(a0 uintptr, a1 uintptr)

func JS_ReadObject

func JS_ReadObject(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr) (r0, r1 uintptr)

func JS_ReadObjectRec

func JS_ReadObjectRec(a0 uintptr, a1 uintptr)

func JS_ReadSharedArrayBuffer

func JS_ReadSharedArrayBuffer(a0 uintptr, a1 uintptr)

func JS_ReadString

func JS_ReadString(a0 uintptr, a1 uintptr)

func JS_RegExpExec

func JS_RegExpExec(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_RegvmFuncStat

func JS_RegvmFuncStat(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr) uintptr

func JS_RegvmOpName

func JS_RegvmOpName(a0 uintptr, a1 uintptr)

func JS_RegvmRun

func JS_RegvmRun(a0 uintptr, a1 uintptr)

func JS_RegvmStat

func JS_RegvmStat(a0 uintptr, a1 uintptr, a2 uintptr) uintptr

func JS_RejectionMark

func JS_RejectionMark(a0 uintptr, a1 uintptr) uintptr

func JS_ReleaseNextChunk

func JS_ReleaseNextChunk(a0 uintptr, a1 uintptr) (r0, r1 uintptr)

func JS_ReleaseNextRange

func JS_ReleaseNextRange(a0 uintptr, a1 uintptr) (r0, r1 uintptr)

func JS_ReleaseStart

func JS_ReleaseStart(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_ResizeAtomHash

func JS_ResizeAtomHash(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_ResolveModule

func JS_ResolveModule(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr) uintptr

func JS_RunGC

func JS_RunGC(a0 uintptr, a1 uintptr)

func JS_RunYoungGC

func JS_RunYoungGC(a0 uintptr, a1 uintptr)

func JS_SameValue

func JS_SameValue(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_SameValueZero

func JS_SameValueZero(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_SetAsyncContext

func JS_SetAsyncContext(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_SetCallDepth

func JS_SetCallDepth(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_SetClassProto

func JS_SetClassProto(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_SetConstructor

func JS_SetConstructor(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_SetConstructor2

func JS_SetConstructor2(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_SetConstructorBit

func JS_SetConstructorBit(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_SetContextOpaque

func JS_SetContextOpaque(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_SetDirectCCalls

func JS_SetDirectCCalls(a0 uintptr, a1 uintptr, a2 uintptr) uintptr

func JS_SetFootprintLimit

func JS_SetFootprintLimit(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_SetFrontCache

func JS_SetFrontCache(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_SetFusedOps

func JS_SetFusedOps(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_SetGCThreshold

func JS_SetGCThreshold(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_SetHostPromiseRejectionTracker

func JS_SetHostPromiseRejectionTracker(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_SetHostRemap

func JS_SetHostRemap(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_SetInternalDepth

func JS_SetInternalDepth(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_SetIsHTMLDDA

func JS_SetIsHTMLDDA(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_SetLocaleArgs

func JS_SetLocaleArgs(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_SetMaxCallDepth

func JS_SetMaxCallDepth(a0 uintptr, a1 uintptr, a2 uintptr) uintptr

func JS_SetMemoryLimit

func JS_SetMemoryLimit(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_SetModuleExport

func JS_SetModuleExport(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_SetModuleExportList

func JS_SetModuleExportList(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_SetModuleLoaderFunc

func JS_SetModuleLoaderFunc(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_SetModuleLoaderFunc2

func JS_SetModuleLoaderFunc2(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_SetModulePrivateValue

func JS_SetModulePrivateValue(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_SetObjectData

func JS_SetObjectData(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_SetOpaque

func JS_SetOpaque(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_SetPropertyFunctionList

func JS_SetPropertyFunctionList(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_SetPropertyInt64

func JS_SetPropertyInt64(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr)

func JS_SetPropertyInternal

func JS_SetPropertyInternal(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr, a7, a8 uintptr, a9 uintptr) uintptr

JS_SetPropertyInternal stores its arguments in a block at the shadow pointer for JS_SetPropertyInternal_block (gen.PackedGo).

func JS_SetPropertyInternal_block

func JS_SetPropertyInternal_block(a0 uintptr, a1 uintptr) uintptr

func JS_SetPropertyStr

func JS_SetPropertyStr(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr) uintptr

func JS_SetPropertyUint32

func JS_SetPropertyUint32(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr)

func JS_SetPropertyValue

func JS_SetPropertyValue(a0 uintptr, a1 uintptr)

func JS_SetPrototype

func JS_SetPrototype(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr) uintptr

func JS_SetPrototypeInternal

func JS_SetPrototypeInternal(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr)

func JS_SetRegExpCache

func JS_SetRegExpCache(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_SetRuntimeInfo

func JS_SetRuntimeInfo(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_SetRuntimeOpaque

func JS_SetRuntimeOpaque(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_SetShapeCache

func JS_SetShapeCache(a0 uintptr, a1 uintptr, a2 uintptr) uintptr

func JS_SetSharedArrayBufferFunctions

func JS_SetSharedArrayBufferFunctions(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_SetStripInfo

func JS_SetStripInfo(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_SetUncatchableException

func JS_SetUncatchableException(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_SpeciesConstructor

func JS_SpeciesConstructor(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_StartCall

func JS_StartCall(a0 uintptr, a1 uintptr)

func JS_StrictEq

func JS_StrictEq(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_StringToBigInt

func JS_StringToBigInt(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_StringToBigIntErr

func JS_StringToBigIntErr(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_TakeDroppedRejections

func JS_TakeDroppedRejections(a0 uintptr, a1 uintptr) uintptr

func JS_TakeRejection

func JS_TakeRejection(a0 uintptr, a1 uintptr, a2 uintptr) (r0, r1 uintptr)

func JS_Throw

func JS_Throw(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr) (r0, r1 uintptr)

func JS_ThrowError2

func JS_ThrowError2(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr)

func JS_ThrowErrorKind

func JS_ThrowErrorKind(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr) (r0, r1 uintptr)

func JS_ThrowErrorf

func JS_ThrowErrorf(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ThrowInternalError

func JS_ThrowInternalError(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_ThrowInterrupted

func JS_ThrowInterrupted(a0 uintptr, a1 uintptr)

func JS_ThrowOutOfMemory

func JS_ThrowOutOfMemory(a0 uintptr, a1 uintptr) (r0, r1 uintptr)

func JS_ThrowRangeError

func JS_ThrowRangeError(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_ThrowReferenceError

func JS_ThrowReferenceError(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_ThrowReferenceErrorNotDefined

func JS_ThrowReferenceErrorNotDefined(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_ThrowReferenceErrorUninitialized

func JS_ThrowReferenceErrorUninitialized(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_ThrowReferenceErrorUninitialized2

func JS_ThrowReferenceErrorUninitialized2(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_ThrowSyntaxError

func JS_ThrowSyntaxError(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_ThrowTypeError

func JS_ThrowTypeError(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_ThrowTypeErrorInvalidClass

func JS_ThrowTypeErrorInvalidClass(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_ThrowTypeErrorNotAConstructor

func JS_ThrowTypeErrorNotAConstructor(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_ThrowTypeErrorOrFalse

func JS_ThrowTypeErrorOrFalse(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ThrowTypeErrorReadOnly

func JS_ThrowTypeErrorReadOnly(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_ToBigInt64

func JS_ToBigInt64(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ToBigInt64Free

func JS_ToBigInt64Free(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ToBool

func JS_ToBool(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_ToBoolFree

func JS_ToBoolFree(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_ToCStringLen2

func JS_ToCStringLen2(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr) uintptr

func JS_ToFloat64

func JS_ToFloat64(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ToIndex

func JS_ToIndex(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ToInt32

func JS_ToInt32(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ToInt32Clamp

func JS_ToInt32Clamp(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr, a7 uintptr)

func JS_ToInt32Sat

func JS_ToInt32Sat(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ToInt64

func JS_ToInt64(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ToInt64Clamp

func JS_ToInt64Clamp(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr, a7 uintptr)

func JS_ToInt64Ext

func JS_ToInt64Ext(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ToInt64Free

func JS_ToInt64Free(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ToInt64Sat

func JS_ToInt64Sat(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ToLengthFree

func JS_ToLengthFree(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ToNumberFree

func JS_ToNumberFree(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_ToNumberHintFree

func JS_ToNumberHintFree(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ToObject

func JS_ToObject(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_ToPrimitiveFree

func JS_ToPrimitiveFree(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ToPropertyKey

func JS_ToPropertyKey(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_ToQuotedString

func JS_ToQuotedString(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ToString

func JS_ToString(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr) (r0, r1 uintptr)

func JS_ToStringFree

func JS_ToStringFree(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_ToStringInternal

func JS_ToStringInternal(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_ToUint32

func JS_ToUint32(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr)

func JS_TrackRejections

func JS_TrackRejections(a0 uintptr, a1 uintptr, a2 uintptr) uintptr

func JS_VALUE_IS_NAN

func JS_VALUE_IS_NAN(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_ValueToAtom

func JS_ValueToAtom(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr) uintptr

func JS_WriteArray

func JS_WriteArray(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_WriteArrayBuffer

func JS_WriteArrayBuffer(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_WriteObject

func JS_WriteObject(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr) uintptr

func JS_WriteObject2

func JS_WriteObject2(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr, a4 uintptr, a5 uintptr, a6 uintptr, a7 uintptr)

func JS_WriteObjectRec

func JS_WriteObjectRec(a0 uintptr, a1 uintptr, a2 uintptr, a3 uintptr)

func JS_WriteObjectTag

func JS_WriteObjectTag(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_WriteSharedArrayBuffer

func JS_WriteSharedArrayBuffer(a0 uintptr, a1 uintptr, a2 uintptr)

func JS_WriteTypedArray

func JS_WriteTypedArray(a0 uintptr, a1 uintptr, a2 uintptr)

func Leaked

func Leaked() uint64

Leaked returns the blocks the runtimes of the VMs closed so far in the process still had in use when Close freed them, which is 0 when nothing leaked. A test reads it before and after the VMs it closes, and sees a leak of the engine where it has no *VM of this package, as with a *beastjs.VM.

func Malloc

func Malloc(sp, rt, n uintptr) uintptr

Malloc is js_malloc_rt: n bytes of the VM's heap, or 0.

func SetHostFunc

func SetHostFunc(f HostFunc)

SetHostFunc registers f, which answers the calls of every function of the host from then on. It is registered once, before any VM runs a script, as from an init function: it panics when f is nil or one is registered.

Types

type HostFunc

type HostFunc func(sp uintptr, vm uint32, this uintptr, argc int32, argv uintptr, id int32) (u, tag uintptr)

A HostFunc answers the calls of the functions of the host: id is what JS_NewHostFunction was given, vm the VM's id, this the address of the this value and argv that of argc values, all in the engine's memory. It returns the result as the two words of a JSValue, which the caller owns, or the exception after throwing one. sp is the first free byte of the shadow stack: what the function passes the engine by address, and the frames of a call back into the engine, go above it, since what is below holds the frames of the call. The engine finds the VM again by sp, so a call back into another VM from it is not allowed.

type JSError

type JSError struct {
	Message string // String(e)
	Stack   string // e.stack, when e is an object that has one
	// Uncatchable: the engine ended the call with an error no try catches,
	// "interrupted" (Interrupt) or "out of memory". Message is then
	// "InternalError: " and the message the engine made it with.
	Uncatchable bool
}

JSError is an exception thrown by the script, or one the engine ended the call with.

func (*JSError) Error

func (e *JSError) Error() string

type Options

type Options struct {
	// Seed is where Math.random starts.
	Seed uint64
	// StackSize is the size of the shadow stack, 0 for the region the
	// engine was generated for (-shadow-size-log2 of the generator). Any
	// other size fails New: the engine finds the base of its stack by
	// rounding its stack pointer down to that region.
	StackSize uintptr
}

Options are the settings of a new VM.

type Usage

type Usage struct {
	MemorySize uintptr // what the limit and the GC count: the blocks in use, with their headers
	Footprint  uintptr // the chunks, as the engine counts them
	Chunks     uintptr
	Host       hostmem.Usage // the chunks and the stack, as the host counts them
	Counts     gohost.Counts
}

Usage is what the engine and the host count of the memory of a VM.

type VM

type VM struct {
	// contains filtered or unexported fields
}

VM is one runtime of the engine with one context.

func New

func New(o Options) (_ *VM, err error)

New makes a runtime and a context. On windows/arm64 it makes none where the state of the CPU at a fault may not fit below a goroutine stack, and returns the error of internal/faultstate.

func (*VM) Close

func (v *VM) Close() (leaked uintptr, err error)

Close frees the context and the runtime and gives all the memory of the VM back to the OS. It returns the blocks the engine still had in use, which is 0 when nothing leaked. A broken VM is not freed by the engine, whose state is halfway: its memory is unmapped all the same. The engine is freed once: when the OS refuses some memory, Close returns the error and Close again only tries what is left. A chunk the engine gave back while it was freed that the OS refused stays counted, and the host's Close unmaps it with the rest: the error tells only of what is still held, and the refusal is in the counts and LastError of the host.

func (*VM) Context

func (v *VM) Context() uintptr

func (*VM) Eval

func (v *VM) Eval(src, file string) (out string, err error)

Eval runs src as a global script, then the jobs it queued, and returns String() of its completion value. It returns ErrClosed after Close began and ErrBroken after a panic in the engine. file names the script in the stack of an exception: it is at most maxFileName bytes, and a longer name is an error, not cut, so that two long names that differ only at their end are not taken for one.

func (*VM) Host

func (v *VM) Host() *gohost.VM

Host is the host side of the VM: its clock, interrupt, memory and counts.

func (*VM) Interrupt

func (v *VM) Interrupt()

Interrupt asks the running script to stop. Any goroutine may call it. The next poll of the engine sets its interrupt flag, and the engine throws the error "interrupted", which no try catches, where it next reads the flag: Eval returns it as a *JSError and the VM goes on. A script still running when the grace is over and gohost.KillPolls polls have come since the flag was set (gohost.VM.SetKillGrace) is killed at that poll: Eval returns ErrKilled and the VM takes only Close.

func (*VM) Place

func (v *VM) Place(k int) (err error)

Place allocates k small objects, each {a: i}, and holds them until Close. No script sees them: they are not in any global. They move where the heap puts what is allocated after them, which a timing uses to run a micro benchmark at several placements of its data (docs/internals/measuring.md). Place(0) does nothing.

func (*VM) ReleaseMemory

func (v *VM) ReleaseMemory(keep uintptr) (hostmem.Released, error)

ReleaseMemory gives the free memory of the VM back to the OS, keeping keep bytes of it for the next allocations: whole free chunks are unmapped, the pages of free blocks dropped, and the shadow stack above its first part. It returns ErrClosed after Close began and ErrBroken after a panic in the engine.

func (*VM) RunGC

func (v *VM) RunGC()

RunGC runs the engine's full garbage collection. It has no error to return: after Close began it panics with ErrClosed, and after a panic in the engine with ErrBroken.

func (*VM) Runtime

func (v *VM) Runtime() uintptr

Runtime and Context are the JSRuntime and the JSContext of the VM.

func (*VM) SP

func (v *VM) SP() uintptr

SP is where each entry into the engine starts on the shadow stack.

func (*VM) SetGCThreshold

func (v *VM) SetGCThreshold(n uintptr)

SetGCThreshold sets the size at which the engine starts a collection by itself (JS_SetGCThreshold), ^uintptr(0) for never.

func (*VM) SetTimeout

func (v *VM) SetTimeout(d time.Duration)

SetTimeout makes each Eval stop its script once it has run for d, as Interrupt at that moment would: with the error "interrupted", or killed when it runs on past the grace (gohost.VM.SetKillGrace). 0, as a new VM has, is no timeout.

func (*VM) SetWallClock

func (v *VM) SetWallClock(t time.Time, moving bool)

SetWallClock sets the clock Date reads: fixed at t, or moving on from t.

func (*VM) Usage

func (v *VM) Usage() Usage

Usage returns what the VM holds now. Like RunGC it panics with ErrClosed after Close began and with ErrBroken after a panic in the engine. The host side of a closed VM is still there to read: Host().Memory().Usage().

Directories

Path Synopsis
cmd
gcpause command
Command gcpause measures how long the Go garbage collector waits to stop the world while VMs run a script that stays in the engine.
Command gcpause measures how long the Go garbage collector waits to stop the world while VMs run a script that stays in the engine.
interrupt command
Command interrupt times how long a script takes to stop after Interrupt, for the scripts of package scenarios, each of which stays inside one long operation of the engine.
Command interrupt times how long a script takes to stop after Interrupt, for the scripts of package scenarios, each of which stays inside one long operation of the engine.
jsrun command
Command jsrun evaluates a JavaScript file and prints its result, how long the evaluation took and what memory the VM held.
Command jsrun evaluates a JavaScript file and prints its result, how long the evaluation took and what memory the VM held.
scenarios
Package scenarios holds the scripts that the commands gcpause and interrupt run: each stays inside one long operation of the engine.
Package scenarios holds the scripts that the commands gcpause and interrupt run: each stays inside one long operation of the engine.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL