dowdiness/js_engine/interpreter/runtime does not have a README file
pub(open) trait ExecutorActivationFrame {
fn step(Self, Interpreter) -> ExecutorActivationStep raise
fn deliver_activation_completion(Self, ExecutorActivationCompletion) -> Unit raise
}pub(open) trait ExecutorCode {
fn start(Self, Interpreter, PreparedExecutorActivation) -> &ExecutorActivationFrame raise
}pub(all) struct ArrayData {
elements : Array[Value]
bag : PropertyBag
length_writable : Bool
holes : Map[Int, Unit]
extensible : Bool
}pub(all) struct Binding {
value : Value
kind : BindingKind
initialized : Bool
annex_b_hoisted : Bool
is_parameter : Bool
}pub(all) enum BuiltinCtorPrototypeInstall {
FrozenAtInstall
PreBagged
AssignAtInstall
}pub(all) enum Callable {
UserFunc(FuncData)
ArrowFunc(FuncData)
UserFuncExt(FuncDataExt)
ArrowFuncExt(FuncDataExt)
NativeCallable(String, (Array[Value]) -> Value raise)
NativeCallableWithContext(String, (CallContext, Array[Value]) -> Value raise)
NonConstructableCallable(String, (Array[Value]) -> Value raise)
BoundFunc(Value, Value, Array[Value])
FuncCallMethod(Value)
FuncApplyMethod(Value)
MethodCallable(String, (Value, Array[Value]) -> Value raise)
InterpreterCallable(String, (Interpreter, Value, Array[Value]) -> Value raise)
InterpreterCallableWithContext(String, (Interpreter, CallContext, Value, Array[Value]) -> Value raise)
ExecutorCallable(ExecutorCallableData)
NonConstructableInterpreterCallable(String, (Interpreter, Array[Value]) -> Value raise)
ConstructorOnlyCallable(String, (Interpreter, Array[Value]) -> Value raise)
ClassConstructor(ClassConstructorData)
}pub(all) struct ClassConstructorData {
name : String
proto : Value
super_ctor : Value?
ctor_fn : (Array[Param], String?, Array[Stmt])?
closure : Environment
super_proto : Value
instance_fields : Array[ClassFieldInit]
private_instance_fields : Array[ClassFieldInit]
materializer : FunctionMaterializer?
source_text : String?
private_brand : Value
private_methods : Map[String, Value]
}pub(all) struct ClassFieldInit {
key : Value
initializer : Expr?
closure : Environment
materializer : FunctionMaterializer?
}pub struct CompiledScriptEarlyErrorSettlement {
// private fields
}pub struct CompiledScriptLexicalBinding {
// private fields
}fn CompiledScriptLexicalBinding::CompiledScriptLexicalBinding(kind~ : BindingKind, name~ : String) -> CompiledScriptLexicalBindingpub struct CompiledScriptPreparation {
// private fields
}fn CompiledScriptPreparation::CompiledScriptPreparation(strict~ : Bool, var_names~ : Array[String], function_names~ : Array[String], lexical_bindings~ : Array[CompiledScriptLexicalBinding]) -> CompiledScriptPreparationfn CompiledScriptPreparation::with_early_error_settlement(strict~ : Bool, var_names~ : Array[String], function_names~ : Array[String], lexical_bindings~ : Array[CompiledScriptLexicalBinding], settlement~ : CompiledScriptEarlyErrorSettlement) -> CompiledScriptPreparationpub(all) enum ConsoleOutputKind {
Log
Debug
Info
Warn
Error
}pub(all) struct Environment {
bindings : Map[String, Binding]
parent : Environment?
is_var_scope : Bool
with_object : Value?
realm_state : RealmState?
interpreter_context : Interpreter?
error_class_names : Map[String, Unit]
markers : Map[String, Bool]
}fn Environment::def(self : Environment, name : String, value : Value, kind : BindingKind) -> Unit raisepub struct EnvironmentSlot {
// private fields
}pub(all) struct ExecutionPolicy {
// private fields
}fn ExecutionPolicy::new(step_budget : Int64, stack_depth_limit : Int64, interruption : InterruptionHandle) -> Result[ExecutionPolicy, ExecutionPolicyError]pub(all) struct ExecutionPolicyError {
// private fields
}pub struct ExecutorActivationCapabilitySummary {
// private fields
}pub enum ExecutorActivationCompletion {
ExecutorActivationCompletionNormal(Value)
ExecutorActivationCompletionAbrupt(Error)
ExecutorActivationCompletionReference(ResolvedBindingReference)
}pub enum ExecutorActivationStep {
ExecutorActivationContinue
ExecutorActivationNormal(Value)
ExecutorActivationReturn(Value)
ExecutorActivationCall(ExecutorCallRequest)
ExecutorActivationConstruct(ExecutorConstructRequest)
ExecutorActivationPropertyGet(ExecutorPropertyGetRequest)
ExecutorActivationPropertyKey(ExecutorPropertyKeyRequest)
ExecutorActivationComputedPropertyGet(ExecutorComputedPropertyGetRequest)
ExecutorActivationPropertySet(ExecutorPropertySetRequest)
ExecutorActivationPropertyUpdate(ExecutorPropertyUpdateRequest)
ExecutorActivationCoercingAddition(ExecutorCoercingAdditionRequest)
ExecutorActivationCoercingRelational(ExecutorCoercingRelationalRequest)
ExecutorActivationCoercingSubtraction(ExecutorCoercingSubtractionRequest)
ExecutorActivationCoercingMultiplicative(ExecutorCoercingMultiplicativeRequest)
ExecutorActivationNumericConversion(ExecutorNumericConversionRequest)
ExecutorActivationPropertyDelete(ExecutorPropertyDeleteRequest)
ExecutorActivationIterableSpread(ExecutorIterableSpreadRequest)
ExecutorActivationCopyDataProperties(ExecutorCopyDataPropertiesRequest)
ExecutorActivationBinding(ExecutorBindingRequest)
ExecutorActivationBindingReference(ExecutorBindingReferenceRequest)
ExecutorActivationBindingReferenceAccess(ExecutorBindingReferenceAccessRequest)
ExecutorActivationBindingUpdate(ExecutorBindingUpdateRequest)
ExecutorActivationReference(ResolvedBindingReference)
}pub struct ExecutorBindingReferenceAccessRequest {
// private fields
}pub struct ExecutorBindingReferenceRequest {
// private fields
}pub enum ExecutorBindingStart {
ExecutorBindingCompleted(Value)
ExecutorBindingSuspended(ExecutorBindingRequest)
}pub enum ExecutorBindingUpdateStart {
ExecutorBindingUpdateCompleted(Value)
ExecutorBindingUpdateSuspended(ExecutorBindingUpdateRequest)
}pub struct ExecutorCallableData {
// private fields
}fn ExecutorCallableData::start_frame(self : ExecutorCallableData, interp : Interpreter, prepared : PreparedExecutorActivation) -> &ExecutorActivationFrame raisepub struct ExecutorCoercingAdditionRequest {
// private fields
}pub enum ExecutorCoercingAdditionStart {
ExecutorCoercingAdditionCompleted(Value)
ExecutorCoercingAdditionSuspended(ExecutorCoercingAdditionRequest)
}pub struct ExecutorCoercingLessThanOrEqualRequest {
// private fields
}pub enum ExecutorCoercingLessThanOrEqualStart {
ExecutorCoercingLessThanOrEqualCompleted(Value)
ExecutorCoercingLessThanOrEqualSuspended(ExecutorCoercingLessThanOrEqualRequest)
}pub struct ExecutorCoercingMultiplicativeRequest {
// private fields
}pub enum ExecutorCoercingMultiplicativeStart {
ExecutorCoercingMultiplicativeCompleted(Value)
ExecutorCoercingMultiplicativeSuspended(ExecutorCoercingMultiplicativeRequest)
}pub struct ExecutorCoercingRelationalRequest {
// private fields
}pub enum ExecutorCoercingRelationalStart {
ExecutorCoercingRelationalCompleted(Value)
ExecutorCoercingRelationalSuspended(ExecutorCoercingRelationalRequest)
}pub struct ExecutorCoercingSubtractionRequest {
// private fields
}pub enum ExecutorCoercingSubtractionStart {
ExecutorCoercingSubtractionCompleted(Value)
ExecutorCoercingSubtractionSuspended(ExecutorCoercingSubtractionRequest)
}pub enum ExecutorComputedCallPreparationStart {
ExecutorComputedCallPreparationCompleted(Value)
ExecutorComputedCallPreparationSuspended(ExecutorComputedPropertyGetRequest)
}pub struct ExecutorComputedPropertyGetRequest {
// private fields
}pub enum ExecutorComputedPropertyGetStart {
ExecutorComputedPropertyGetCompleted(Value)
ExecutorComputedPropertyGetSuspended(ExecutorActivationStep)
}pub enum ExecutorComputedPropertySetStart {
ExecutorComputedPropertySetCompleted(Value)
ExecutorComputedPropertySetSuspended(ExecutorActivationStep)
}pub struct ExecutorCopyDataPropertiesRequest {
// private fields
}pub enum ExecutorCopyDataPropertiesStart {
ExecutorCopyDataPropertiesCompleted
ExecutorCopyDataPropertiesSuspended(ExecutorCopyDataPropertiesRequest)
}pub enum ExecutorIterableSpreadStart {
ExecutorIterableSpreadCompleted(Array[Value])
ExecutorIterableSpreadSuspended(ExecutorIterableSpreadRequest)
}pub(all) enum ExecutorMultiplicativeOperator {
ExecutorMultiplicativeMultiply
ExecutorMultiplicativeDivide
ExecutorMultiplicativeRemainder
}pub struct ExecutorNumericConversionRequest {
// private fields
}pub enum ExecutorNumericConversionStart {
ExecutorNumericConversionCompleted(Value)
ExecutorNumericConversionSuspended(ExecutorNumericConversionRequest)
}pub enum ExecutorPropertyDeleteStart {
ExecutorPropertyDeleteCompleted(Value)
ExecutorPropertyDeleteSuspended(ExecutorPropertyDeleteRequest)
}pub enum ExecutorPropertyKeyStart {
ExecutorPropertyKeyCompleted(Value)
ExecutorPropertyKeySuspended(ExecutorPropertyKeyRequest)
}pub(all) enum ExecutorRelationalOperator {
ExecutorRelationalLessThan
ExecutorRelationalGreaterThan
ExecutorRelationalGreaterThanOrEqual
ExecutorRelationalLessThanOrEqual
}pub(all) struct FuncData {
name : String?
params : Array[String]
body : Array[Stmt]
closure : Environment
strict : Bool
has_name_binding : Bool
is_method : Bool
source_text : String?
materializer : FunctionMaterializer?
}pub(all) struct FuncDataExt {
name : String?
params : Array[Param]
rest_param : String?
body : Array[Stmt]
closure : Environment
strict : Bool
has_name_binding : Bool
is_method : Bool
source_text : String?
materializer : FunctionMaterializer?
}pub struct FunctionExecutionHooks {
// private fields
}fn FunctionExecutionHooks::FunctionExecutionHooks(start~ : () -> Unit raise, complete~ : (Bool) -> Unit raise) -> FunctionExecutionHookspub(all) enum FunctionMaterializationForm {
FunctionDeclaration
FunctionExpression
NamedFunctionExpression
MethodFunction
ComputedMethodFunction
ArrowFunction
} derive(Eq)fn FunctionMaterializationForm::equal(FunctionMaterializationForm, FunctionMaterializationForm) -> Boolfn FunctionMaterializationForm::not_equal(x : FunctionMaterializationForm, y : FunctionMaterializationForm) -> Boolpub struct FunctionMaterializationRequest {
form : FunctionMaterializationForm
site : Loc
name : String?
parameters : FunctionMaterializationParameters
body : Array[Stmt]
closure : Environment
strict : Bool
source_text : String?
}fn FunctionMaterializationRequest::FunctionMaterializationRequest(form~ : FunctionMaterializationForm, site~ : Loc, name~ : String?, parameters~ : FunctionMaterializationParameters, body~ : Array[Stmt], closure~ : Environment, strict~ : Bool, source_text~ : String?) -> FunctionMaterializationRequestpub struct FunctionMaterializer {
// private fields
}fn FunctionMaterializer::FunctionMaterializer(begin~ : () -> FunctionMaterializer, materialize~ : (Interpreter, FunctionMaterializationRequest) -> Value raise, hooks? : FunctionExecutionHooks?) -> FunctionMaterializerfn FunctionRealmProtos::FunctionRealmProtos(function_proto? : Value?, object_proto? : Value?, string_proto? : Value?, number_proto? : Value?, boolean_proto? : Value?, symbol_proto? : Value?, array_proto? : Value?, map_proto? : Value?, set_proto? : Value?, promise_proto? : Value?, constructor_prototype_registry? : Value?) -> FunctionRealmProtospub(all) enum GenState {
SuspendedStart
Executing
SuspendedYield
Completed
}pub(all) struct GeneratorObject {
id : Int
state : GenState
body : Array[Stmt]
strict : Bool
params : Array[String]
params_ext : Array[Param]?
rest_param : String?
closure : Environment
is_async : Bool
name : String?
interpreter : Interpreter
args : Array[Value]
this_val : Value
env : Environment?
pc : Int
yield_value : Value
resuming : Bool
resume_action : ResumeAction
try_resume_phase : Int
try_resume_yield_base : Int
try_resume_error : Value
try_resume_result : Signal
try_resume_pending_error : Error?
loop_env_stack : Array[Environment]
loop_yield_base_stack : Array[Int]
stmt_resume_index_stack : Array[Int]
stmt_resume_env_stack : Array[Environment]
stmt_resume_value_stack : Array[Value]
for_of_iterator : Value
for_of_next : Value
for_of_iterator_stack : Array[Value]
for_of_next_stack : Array[Value]
for_of_resume : Bool
for_of_awaiting_next : Bool
dstr_iterator_stack : Array[Value]
delegate_iterator : Value
delegate_next : Value
delegating : Bool
yield_index : Int
resume_at_yield : Int
yield_resume_values : Map[Int, Value]
}pub(all) struct HostEnv {
output : Array[String]
console_output_sink : (ConsoleOutputKind, String) -> Unit raise?
microtask_queue : Array[Microtask]
timer_queue : PriorityQueue[TimerTask]
timer_id_counter : Ref[Int]
timer_insertion_counter : Ref[Int]
cancelled_timer_ids : Map[Int, Bool]
module_loader : ModuleLoader?
}fn HostEnv::emit_console_output(self : HostEnv, kind : ConsoleOutputKind, text : String) -> Unit raisepub(all) enum InternalSlotKey {
StringData
NumberData
BooleanData
SymbolData
PrimitiveValue
ArrayLength
TypedArrayName
ViewedArrayBuffer
ArrayBufferID
ByteOffset
ByteLength
ArrayBufferByteLength
DateValue
ExportName
NamespaceObject
ExportValue
SyncIterator
SyncNextMethod
SourceText
PrivateBrandStore
} derive(Eq, Hash, Debug)pub(all) struct Interpreter {
host : HostEnv
global : Environment
global_this : Value
annex_b : Bool
realm_state : RealmState
module_registry : Map[String, Map[String, Value]]
module_exports : Map[String, Value]
module_export_bindings : Array[(String, String)]
generator_objects : Map[Int, GeneratorObject]
gen_id_counter : Ref[Int]
symbols : SymbolState
stdlib_hooks : StdlibHooks
in_nonarrow_param_default_eval : Bool
param_default_eval_var_conflicts : Set[String]?
active_function_materializer : FunctionMaterializer?
}fn Interpreter::array_define_own_property(self : Interpreter, arr : ArrayData, key : Value, partial : PartialDescriptor, loc : Loc) -> Bool raisefn Interpreter::array_set_length(self : Interpreter, arr : ArrayData, partial : PartialDescriptor) -> Bool raisefn Interpreter::assign_compiled_name(self : Interpreter, ctx : ExecContext, env : Environment, name : String, value : Value) -> Value raisefn Interpreter::call_direct_eval_or_shadowed(self : Interpreter, callee : Value, args : Array[Value], env : Environment, loc : Loc, caller_strict~ : Bool) -> Value raisefn Interpreter::call_value(self : Interpreter, callee : Value, this_val : Value, args : Array[Value], loc : Loc) -> Value raisefn Interpreter::construct_value(self : Interpreter, ctor : Value, args : Array[Value], loc : Loc, proto_override? : Value?, new_target? : Value?) -> Value raisefn Interpreter::copy_object_spread_properties(self : Interpreter, target : Value, source : Value, loc : Loc) -> Unit raisefn Interpreter::define_compiled_binding(self : Interpreter, env : Environment, kind : VarKind, name : String, value : Value, has_initializer : Bool) -> Unit raisefn Interpreter::define_own_property(self : Interpreter, val : Value, key : Value, partial : PartialDescriptor, loc : Loc) -> Bool raisefn Interpreter::define_simple_arguments_object(self : Interpreter, env : Environment, args : Array[Value], callee : Value, strict : Bool, params : Array[String]) -> Unit raisefn Interpreter::define_unmapped_arguments_object(self : Interpreter, env : Environment, args : Array[Value], callee : Value, strict : Bool) -> Unit raisefn Interpreter::delete_property_key(self : Interpreter, obj : Value, key : Value, strict? : Bool) -> Bool raisefn Interpreter::enqueue_microtask(self : Interpreter, callback : Value, args : Array[Value]) -> Unitfn Interpreter::eval_destructure_assign(self : Interpreter, ctx : ExecContext, pattern : Pattern, value : Value, env : Environment) -> Value raisefn Interpreter::eval_destructure_assign_plan(self : Interpreter, ctx : ExecContext, plan : DestructurePlan, value : Value, env : Environment) -> Value raisefn Interpreter::eval_super_computed_call_reference(self : Interpreter, env : Environment, key : Value, loc : Loc) -> (Value, Value) raisefn Interpreter::eval_super_computed_property(self : Interpreter, env : Environment, key : Value, loc : Loc) -> Value raisefn Interpreter::eval_super_property(self : Interpreter, env : Environment, prop : String, loc : Loc) -> Value raisefn Interpreter::eval_super_property_call_reference(self : Interpreter, env : Environment, prop : String, loc : Loc) -> (Value, Value) raisefn Interpreter::eval_update_computed_property(self : Interpreter, ctx : ExecContext, obj : Value, key : Value, op : UpdateOp, prefix : Bool, member_loc : Loc, loc : Loc) -> Value raisefn Interpreter::eval_update_property(self : Interpreter, ctx : ExecContext, obj : Value, prop : String, op : UpdateOp, prefix : Bool, member_loc : Loc, loc : Loc) -> Value raisefn Interpreter::get_cached_tagged_template_object(self : Interpreter, key : String, quasis : Array[(String, String?)]) -> Valuefn Interpreter::get_compiled_name(self : Interpreter, env : Environment, name : String) -> Value raisefn Interpreter::get_computed_property(self : Interpreter, obj : Value, key : Value, loc : Loc) -> Value raisefn Interpreter::get_iterator_next_method(self : Interpreter, iterator : Value, loc : Loc) -> Value raisefn Interpreter::get_own_property(self : Interpreter, val : Value, key : Value) -> (PropDescriptor, Value)? raisefn Interpreter::get_property(self : Interpreter, obj : Value, prop : String, loc : Loc) -> Value raisefn Interpreter::get_property_key_with_receiver(self : Interpreter, target : Value, key : Value, receiver : Value, loc : Loc) -> Value raisefn Interpreter::get_prototype_from_constructor(self : Interpreter, ctor : Value, loc : Loc) -> Value raisefn Interpreter::iterator_result_value(self : Interpreter, iter_result : Value, loc : Loc) -> Value raisefn Interpreter::iterator_step_result(self : Interpreter, iterator : Value, next_method : Value, loc : Loc) -> Value? raisefn Interpreter::iterator_step_value(self : Interpreter, iterator : Value, next_method : Value, loc : Loc) -> Value? raisefn Interpreter::new(annex_b? : Bool, module_loader? : ModuleLoader?, console_enabled? : Bool, console_output_sink? : (ConsoleOutputKind, String) -> Unit raise?, setup_builtins? : (Environment, Array[String], RealmState, Bool) -> Unit, setup_harness? : (Environment, Array[String], Value) -> Unit, stdlib_hooks? : StdlibHooks) -> Interpreterfn Interpreter::ordinary_define_own_property(self : Interpreter, val : Value, key : Value, partial : PartialDescriptor, loc : Loc) -> Bool raisefn Interpreter::partial_descriptor_from_attrs(self : Interpreter, attrs : Value, loc : Loc) -> PartialDescriptor raisefn Interpreter::perform_eval(self : Interpreter, code : String, caller_env : Environment, direct : Bool, caller_strict? : Bool) -> Value raisefn Interpreter::prepare_executor_callable_call(self : Interpreter, executable : ExecutorCallableData, callee : Value, this_value : Value, args : Array[Value]) -> PreparedExecutorActivation raisefn Interpreter::register_module(self : Interpreter, specifier : String, exports : Map[String, Value]) -> Unitfn Interpreter::run_bounded(self : Interpreter, stmts : Array[Stmt], policy : ExecutionPolicy) -> Value raisefn Interpreter::run_compiled_script(self : Interpreter, stmts : Array[Stmt], eval : (ExecContext, Environment) -> Value raise) -> Value raisefn Interpreter::run_executor_activation_coordinator(self : Interpreter, root : &ExecutorActivationFrame) -> ExecutorActivationStep raisefn[T] Interpreter::run_materialized_function(self : Interpreter, materializer : FunctionMaterializer?, thunk : () -> T raise) -> T raisefn Interpreter::run_microtasks_observed(self : Interpreter) -> Result[Unit, MicrotaskRunFailure] raisefn Interpreter::run_modules(self : Interpreter, modules : Array[(String, String)]) -> Map[String, Value] raisefn Interpreter::run_prepared_compiled_script(self : Interpreter, preparation : CompiledScriptPreparation, eval : (ExecContext, Environment) -> Value raise) -> Value raisefn Interpreter::run_with_function_materializer(self : Interpreter, stmts : Array[Stmt], materializer : FunctionMaterializer) -> Value raisefn Interpreter::set_computed_property(self : Interpreter, obj : Value, key : Value, value : Value, loc : Loc, strict? : Bool, receiver? : Value) -> Value raisefn Interpreter::set_property(self : Interpreter, obj : Value, prop : String, value : Value, loc : Loc, strict? : Bool, receiver? : Value) -> Value raisefn Interpreter::to_primitive_default(self : Interpreter, obj_val : Value, data : ObjectData) -> Value raisefn Interpreter::typeof_compiled_name(self : Interpreter, ctx : ExecContext, env : Environment, name : String) -> Value raisefn Interpreter::update_compiled_name(self : Interpreter, ctx : ExecContext, env : Environment, name : String, op : UpdateOp, prefix : Bool, loc : Loc) -> Value raisefn Interpreter::validate_block_early_errors(_self : Interpreter, stmts : Array[Stmt], strict_context : Bool) -> Unit raisefn[T] Interpreter::with_execution_policy(self : Interpreter, policy : ExecutionPolicy, action : () -> T raise) -> T raisefn[T] Interpreter::with_function_materializer(self : Interpreter, materializer : FunctionMaterializer?, thunk : () -> T raise) -> T raisepub(all) struct InterruptionHandle {
// private fields
}pub struct MicrotaskRunFailure {
cause_ : Error
source_identity_ : String?
}pub struct NumericUpdatePlan {
// private fields
}pub(all) struct ObjectData {
bag : PropertyBag
prototype : Value
callable : Callable?
class_name : String
extensible : Bool
arraybuffer_state : ArrayBufferState?
}pub(all) struct PromiseData {
state : PromiseState
result : Value
fulfill_reactions : Array[PromiseReaction]
reject_reactions : Array[PromiseReaction]
is_handled : Bool
bag : PropertyBag
extensible : Bool
prototype : Value?
}fn PromiseIntrinsics::await_value(self : PromiseIntrinsics, interp : Interpreter, value : Value, on_fulfill : Value, on_reject : Value) -> Unit raisefn PromiseIntrinsics::new_capability(self : PromiseIntrinsics, interp : Interpreter) -> (Value, Value, Value)pub(all) struct PromiseReaction {
handler : Value?
resolve : Value
reject : Value
reaction_type : PromiseReactionType
}pub(all) enum PromiseState {
Pending
Fulfilled
Rejected
}pub(all) struct PropertyBag {
properties : Map[String, Value]
symbol_properties : Map[Int, Value]
descriptors : Map[String, PropDescriptor]
symbol_descriptors : Map[Int, PropDescriptor]
internal_slots : Map[InternalSlotKey, Value]
host_slots : Map[Int, Value]
}pub(all) struct RealmState {
symbols : SymbolState
well_known_symbols : WellKnownSymbols
runtime_iterator_prototypes : RuntimeIteratorPrototypeCaches
active_overrides : Ref[FunctionRealmProtos?]
active_source_identity : Ref[String?]
constructor_prototype_registry : Value
observing_source_failure : Ref[Bool]
observed_source_failure : Ref[Error?]
observed_source_identity : Ref[String?]
object_prototype : Ref[Value?]
function_prototype : Ref[Value?]
string_prototype : Ref[Value?]
number_prototype : Ref[Value?]
boolean_prototype : Ref[Value?]
symbol_prototype : Ref[Value?]
array_prototype : Ref[Value?]
map_prototype : Ref[Value?]
set_prototype : Ref[Value?]
regexp_prototype : Ref[Value?]
promise_prototype : Ref[Value?]
weakmap_prototype : Ref[Value?]
weakset_prototype : Ref[Value?]
arraybuffer_state : ArrayBufferState
arraybuffer_id_counter : Ref[Int]
arraybuffer_store : Map[Int, Array[Int]]
detached_buffers : Map[Int, Bool]
weakmap_id_counter : Ref[Int]
weakmap_storage : Map[Int, Array[(Value, Value)]]
weakmap_id_table : Array[(ObjectData, Int)]
weakset_id_counter : Ref[Int]
weakset_storage : Map[Int, Array[Value]]
weakset_id_table : Array[(ObjectData, Int)]
// private fields
}fn RealmState::register_constructor_prototype(self : RealmState, name : String, constructor_value : Value) -> Unitpub(all) struct RuntimeIteratorPrototypeCaches {
iterator_proto : Ref[Value?]
array_iterator_proto : Ref[Value?]
string_iterator_proto : Ref[Value?]
map_iterator_proto : Ref[Value?]
set_iterator_proto : Ref[Value?]
regexp_string_iterator_proto : Ref[Value?]
async_iterator_proto : Ref[Value?]
async_from_sync_iterator_proto : Ref[Value?]
}pub(all) struct SetData {
values : Array[Value]
tombstones : Set[Int]?
iteration_depth : Int
prototype : Value?
bag : PropertyBag
extensible : Bool
}pub struct SourceObservedFailure {
cause_ : Error
source_identity_ : String?
}pub(all) struct StdlibHooks {
get_string_method : (String, String, RealmState, Bool) -> Value
get_number_method : (Value, String, RealmState) -> Value
get_array_method_with_interp : (ArrayData, String, RealmState) -> Value
get_map_method : (MapData, String, RealmState) -> Value
get_set_method : (SetData, String, RealmState) -> Value
get_promise_method : (PromiseData, String, RealmState) -> Value
make_regexp_object : (RealmState, String, String) -> Value raise
typedarray_get_index : (ObjectData, Int, RealmState) -> Value
typedarray_set_index : (ObjectData, Int, Double, RealmState) -> Unit
typedarray_is_valid_index : (ObjectData, Int, RealmState) -> Bool
create_realm : () -> Interpreter
}pub(all) struct SymbolData {
id : Int
description : String?
}pub(all) struct SymbolState {
symbol_id_counter : Ref[Int]
all_symbols : Map[Int, SymbolData]
global_symbol_registry : Map[String, SymbolData]
symbol_registry_reverse : Map[Int, String]
well_known_symbols_cache : Ref[WellKnownSymbols?]
}pub struct TimerRunFailure {
cause_ : Error
phase_ : TimerRunFailurePhase
source_identity_ : String?
}pub enum TimerRunFailurePhase {
TimerQueueDispatch
TimerCallback
IntervalCallback
MicrotaskCheckpoint
}pub(all) enum Value {
Number(Double)
String_(String)
Bool(Bool)
Null
Undefined
Object(ObjectData)
Array(ArrayData)
Symbol(SymbolData)
Map(MapData)
Set(SetData)
Promise(PromiseData)
Proxy(ProxyData)
}pub(all) struct WellKnownSymbols {
iterator : SymbolData
async_iterator : SymbolData
has_instance : SymbolData
is_concat_spreadable : SymbolData
to_primitive : SymbolData
to_string_tag : SymbolData
match_sym : SymbolData
match_all : SymbolData
replace : SymbolData
search : SymbolData
species : SymbolData
split : SymbolData
unscopables : SymbolData
}fn begin_executor_binding_assignment_load(interp : Interpreter, ctx : ExecContext, env : Environment, name : String, loc : Loc) -> ExecutorBindingStart raisefn begin_executor_binding_direct_eval(interp : Interpreter, ctx : ExecContext, env : Environment, loc : Loc) -> ExecutorBindingStart raisefn begin_executor_binding_load(interp : Interpreter, ctx : ExecContext, env : Environment, name : String, loc : Loc) -> ExecutorBindingStart raisefn begin_executor_binding_store(interp : Interpreter, ctx : ExecContext, env : Environment, name : String, value : Value, loc : Loc) -> ExecutorBindingStart raisefn begin_executor_binding_typeof(interp : Interpreter, ctx : ExecContext, env : Environment, name : String, loc : Loc) -> ExecutorBindingStart raisefn begin_executor_binding_update(interp : Interpreter, ctx : ExecContext, env : Environment, name : String, op : UpdateOp, prefix : Bool, loc : Loc) -> ExecutorBindingUpdateStart raisefn begin_executor_coercing_addition(left : Value, right : Value, loc : Loc) -> ExecutorCoercingAdditionStart raisefn begin_executor_coercing_less_than_or_equal(left : Value, right : Value, loc : Loc) -> ExecutorCoercingLessThanOrEqualStart raisefn begin_executor_coercing_multiplicative(operator : ExecutorMultiplicativeOperator, left : Value, right : Value, loc : Loc) -> ExecutorCoercingMultiplicativeStart raisefn begin_executor_coercing_relational(left : Value, right : Value, loc : Loc, operator : ExecutorRelationalOperator) -> ExecutorCoercingRelationalStart raisefn begin_executor_coercing_subtraction(left : Value, right : Value, loc : Loc) -> ExecutorCoercingSubtractionStart raisefn begin_executor_computed_call_preparation(target : Value, raw_key : Value, loc : Loc) -> ExecutorComputedCallPreparationStart raisefn begin_executor_computed_property_get(target : Value, raw_key : Value, loc : Loc) -> ExecutorComputedPropertyGetStart raisefn begin_executor_computed_property_set(target : Value, property_key : Value, value : Value, loc : Loc, strict : Bool) -> ExecutorComputedPropertySetStart raisefn begin_executor_copy_data_properties(_interp : Interpreter, target : Value, source : Value, excluded_keys : Array[Value], loc : Loc) -> ExecutorCopyDataPropertiesStartfn begin_executor_numeric_conversion(interp : Interpreter, value : Value, loc : Loc) -> ExecutorNumericConversionStart raisefn begin_executor_property_delete_computed(interp : Interpreter, target : Value, raw_key : Value, strict : Bool, loc : Loc) -> ExecutorPropertyDeleteStart raisefn begin_executor_property_delete_static(interp : Interpreter, target : Value, property_name : String, strict : Bool, loc : Loc) -> ExecutorPropertyDeleteStart raisefn compiled_script_preparation_matches(preparation : CompiledScriptPreparation, strict : Bool, var_names : Array[String], function_names : Array[String], lexical_bindings : Array[CompiledScriptLexicalBinding], expected_settlement : CompiledScriptEarlyErrorSettlement, provenance_token? : Ref[Unit]?) -> Boolfn create_data_property_or_throw(interp : Interpreter, target : Value, index : Int64, value : Value) -> Unit raisefn destructure_plan_array(elements : Array[DestructurePlan?], rest : DestructurePlan?) -> DestructurePlanfn destructure_plan_object(properties : Array[DestructurePropertyPlan], rest : DestructurePlan?) -> DestructurePlanfn enqueue_promise_reaction_job(interp : Interpreter, reaction : PromiseReaction, argument : Value) -> Unitfn eval_delete_computed_property(interp : Interpreter, obj : Value, key : Value, strict : Bool) -> Value raisefn eval_delete_identifier(interp : Interpreter, ctx : ExecContext, env : Environment, name : String) -> Value raisefn eval_delete_property(interp : Interpreter, obj : Value, prop : String, strict : Bool) -> Value raisefn eval_unary_value_op(op : UnaryOp, value : Value, loc : Loc, interp? : Interpreter?) -> Value raisefn execution_control_failure_code(error : Error) -> String?fn executor_activation_binding_reference_get(reference : ResolvedBindingReference) -> ExecutorActivationStepfn executor_activation_binding_reference_put(reference : ResolvedBindingReference, value : Value) -> ExecutorActivationStepfn executor_activation_binding_reference_resolution(ctx : ExecContext, env : Environment, name : String, loc : Loc) -> ExecutorActivationStep raisefn executor_activation_binding_update_request(request : ExecutorBindingUpdateRequest) -> ExecutorActivationStepfn executor_activation_capability_summary_equal(left : ExecutorActivationCapabilitySummary?, right : ExecutorActivationCapabilitySummary?) -> Boolfn executor_activation_coercing_addition(left : Value, right : Value, loc : Loc) -> ExecutorActivationStepfn executor_activation_coercing_addition_request(request : ExecutorCoercingAdditionRequest) -> ExecutorActivationStepfn executor_activation_coercing_less_than_or_equal(left : Value, right : Value, loc : Loc) -> ExecutorActivationStepfn executor_activation_coercing_less_than_or_equal_request(request : ExecutorCoercingLessThanOrEqualRequest) -> ExecutorActivationStepfn executor_activation_coercing_multiplicative(left : Value, right : Value, operator : ExecutorMultiplicativeOperator, loc : Loc) -> ExecutorActivationStepfn executor_activation_coercing_multiplicative_request(request : ExecutorCoercingMultiplicativeRequest) -> ExecutorActivationStepfn executor_activation_coercing_relational(left : Value, right : Value, loc : Loc, operator : ExecutorRelationalOperator) -> ExecutorActivationStepfn executor_activation_coercing_relational_request(request : ExecutorCoercingRelationalRequest) -> ExecutorActivationStepfn executor_activation_coercing_subtraction(left : Value, right : Value, loc : Loc) -> ExecutorActivationStepfn executor_activation_coercing_subtraction_request(request : ExecutorCoercingSubtractionRequest) -> ExecutorActivationStepfn executor_activation_computed_property_get_if_admitted(target : Value, key : Value, loc : Loc) -> ExecutorActivationStep?fn executor_activation_computed_property_get_request(request : ExecutorComputedPropertyGetRequest) -> ExecutorActivationStepfn executor_activation_construct(ctor : Value, args : Array[Value], loc : Loc) -> ExecutorActivationStepfn executor_activation_copy_data_properties_request(request : ExecutorCopyDataPropertiesRequest) -> ExecutorActivationStepfn executor_activation_iterable_spread_request(request : ExecutorIterableSpreadRequest) -> ExecutorActivationStepfn executor_activation_numeric_conversion_request(request : ExecutorNumericConversionRequest) -> ExecutorActivationStepfn executor_activation_property_decrement(target : Value, property_name : String, prefix : Bool, member_loc : Loc, loc : Loc, strict : Bool) -> ExecutorActivationStepfn executor_activation_property_delete_request(request : ExecutorPropertyDeleteRequest) -> ExecutorActivationStepfn executor_activation_property_get(target : Value, property_name : String, loc : Loc) -> ExecutorActivationStepfn executor_activation_property_increment(target : Value, property_name : String, prefix : Bool, member_loc : Loc, loc : Loc, strict : Bool) -> ExecutorActivationStepfn executor_activation_property_key_request(request : ExecutorPropertyKeyRequest) -> ExecutorActivationStepfn executor_activation_property_set(target : Value, property_name : String, value : Value, loc : Loc, strict : Bool) -> ExecutorActivationStepfn get_array_iterator_override(arr : ArrayData, well_known_symbols~ : WellKnownSymbols) -> (Value?, Value?)fn install_builtin_accessor(data : ObjectData, name : String, getter : Value?, setter : Value?) -> Unitfn install_realm_pinned_builtin_constructor(env : Environment, realm_proto_cache : Ref[Value?], ctor_name : String, ctor : Value, proto : Value, prototype_install? : BuiltinCtorPrototypeInstall, wire_proto_constructor? : Bool) -> Unitfn is_js_catchable_error(err : Error) -> Boolfn is_typedarray_class(name : String) -> Boolfn lookup_symbol_property_chain(obj_val : Value, data : ObjectData, sym_id : Int, interp? : Interpreter?) -> Value? raisefn[T : ExecutorCode] make_classified_executor_arrow_function(params : Array[String], closure : Environment, strict : Bool, code : T, source_body : Array[Stmt], rest_param? : String?) -> Valuefn[T : ExecutorCode] make_classified_executor_function(name : String?, params : Array[String], closure : Environment, strict : Bool, code : T, source_body : Array[Stmt], rest_param? : String?, constructable? : Bool, call_self_name? : Bool, define_arguments_object? : Bool) -> Valuefn[T : ExecutorCode] make_executor_arrow_function(params : Array[String], closure : Environment, strict : Bool, code : T, rest_param? : String?) -> Valuefn[T : ExecutorCode] make_executor_function(name : String?, params : Array[String], closure : Environment, strict : Bool, code : T, rest_param? : String?, constructable? : Bool, call_self_name? : Bool, define_arguments_object? : Bool) -> Valuefn make_interp_method_func(name~ : String, length? : Int, realm_state? : RealmState?, func : (Interpreter, Value, Array[Value]) -> Value raise) -> Valuefn make_interp_method_func_with_context(name~ : String, length? : Int, func : (Interpreter, CallContext, Value, Array[Value]) -> Value raise) -> Valuefn make_interp_static_func(name~ : String, length? : Int, func : (Interpreter, Array[Value]) -> Value raise) -> Valuefn make_materialized_tree_function(request : FunctionMaterializationRequest, child_materializer : FunctionMaterializer?) -> Valuefn make_native_func(name~ : String, length? : Int, realm_state? : RealmState?, func : (Array[Value]) -> Value raise) -> Valuefn[T : ExecutorCode] make_prepared_executor_arrow_function(params : Array[String], closure : Environment, strict : Bool, code : T, activation_capability_summary : ExecutorActivationCapabilitySummary?, source_text? : String?, rest_param? : String?) -> Valuefn[T : ExecutorCode] make_prepared_executor_function(name : String?, params : Array[String], closure : Environment, strict : Bool, code : T, activation_capability_summary : ExecutorActivationCapabilitySummary?, source_text? : String?, rest_param? : String?, constructable? : Bool, call_self_name? : Bool, define_arguments_object? : Bool, needs_own_environment? : Bool) -> Valuefn[T] observe_source_failure(realm_state : RealmState, eval : () -> T raise) -> Result[T, SourceObservedFailure]fn prepare_compiled_script_early_error(stmts : Array[Stmt], strict : Bool, provenance_token? : Ref[Unit]?) -> CompiledScriptEarlyErrorSettlementfn prepare_executor_activation_capability(params : Array[String], body : Array[Stmt]) -> ExecutorActivationCapabilitySummary?fn proxy_define_property(interp : Interpreter, proxy_data : ProxyData, key : Value, partial : PartialDescriptor) -> Bool raisefn proxy_get(interp : Interpreter, proxy_data : ProxyData, key : String, receiver : Value) -> Value raisefn proxy_get_own_property(interp : Interpreter, proxy_data : ProxyData, key : Value) -> (PropDescriptor, Value)? raisefn proxy_set(interp : Interpreter, proxy_data : ProxyData, key : String, value : Value, receiver : Value, strict : Bool) -> Value raisefn proxy_set_prototype_of(interp : Interpreter, proxy_data : ProxyData, proto : Value) -> Bool raisefn set_array_iterator_override(arr : ArrayData, well_known_symbols~ : WellKnownSymbols, getter : Value?, value : Value?) -> Unitfn setup_async_function_constructor(env : Environment, well_known_symbols~ : WellKnownSymbols) -> Unitfn setup_async_generator_function_constructor(env : Environment, well_known_symbols~ : WellKnownSymbols) -> Unitfn setup_generator_function_constructor(env : Environment, global_this : Value, well_known_symbols~ : WellKnownSymbols) -> Unitfn utf16_length(s : String) -> Intfn validate_non_configurable(existing : PropDescriptor, prop_display : String, is_accessor : Bool, is_data : Bool, has_value : Bool, new_writable : Bool?, new_enumerable : Bool?, new_configurable : Bool?, new_getter : Value?, new_setter : Value?, get_old_value : () -> Value, get_new_value : () -> Value?) -> Unit raisefn verify_executor_activation_capability(params : Array[String], body : Array[Stmt], summary : ExecutorActivationCapabilitySummary?) -> Boolfn[T] with_source_identity(realm_state : RealmState, source_identity : String?, eval : () -> T raise) -> T raiseInstall
Download zipPure MoonBit cross-target embedded JavaScript engine
Dependencies