apollovm library

A portable virtual machine for Dart, web (JavaScript), and Flutter.

ApolloVM enables parsing, translation, and execution of multiple programming languages, including Dart and Java. It also supports on-the-fly compilation to WebAssembly (Wasm).

Classes

ApolloCodeParser<T extends Object>
Base class for ApolloVM parsers.
ApolloExternalFunctionMapper
A mapper for a function that is external to the ApolloVM.
ApolloExternalGetterMapper
A mapper for a getter that is external to the ApolloVM.
ApolloGenerator<O extends Object, S extends ApolloCodeUnitStorage<D>, D extends Object>
Base class for generators.
ApolloImportManager
A package/library import manager.
ApolloParserCSharp
C# implementation of an ApolloParser.
ApolloParserDart
Dart implementation of an ApolloParser.
ApolloParserGo
Go implementation of an ApolloParser.
ApolloParserJava11
Java11 implementation of an ApolloParser.
ApolloParserWasm
Dart implementation of an ApolloParser.
ApolloRunner
Base class for ApolloVM runners.
ApolloRunnerCSharp
C# implementation of an ApolloRunner.
ApolloRunnerDart
Dart implementation of an ApolloRunner.
ApolloRunnerGo
Go implementation of an ApolloRunner.
ApolloRunnerJava11
Java11 implementation of an ApolloRunner.
ApolloRunnerWasm
WebAssembly (Wasm) implementation of an ApolloRunner.
ApolloSourceCodeParser
Base class for ApolloVM source code parsers.
ApolloVM
The Apollo VM.
ASTAnnotation
ASTAnnotationParameter
ASTBlock
An AST Block of code (statements).
ASTBranch
ASTStatement base for branches.
ASTBranchIfBlock
ASTBranch simple IF: if (exp) {}
ASTBranchIfElseBlock
ASTBranch IF,ELSE: if (exp) {} else {}
ASTBranchIfElseIfsElseBlock
ASTBranch IF,ELSE IF,ELSE: if (exp) {} else if (exp) {}* else {}
ASTCatchClause
A single catch clause of an ASTStatementTryCatch.
ASTClass<T>
AST base of a Class.
ASTClassConstructorDeclaration<T>
An AST Function Declaration.
ASTClassEnum
AST of an enum class (e.g. Dart/TypeScript enum).
ASTClassField<T>
ASTVariable for class fields.
ASTClassFieldWithInitialValue<T>
ASTVariable for class fields with initial values.
ASTClassFunctionDeclaration<T>
An AST Class Function Declaration.
ASTClassGetterDeclaration<T>
An AST Class Getter Declaration.
ASTClassInstance<V extends ASTValue>
ASTValue for an object class instance.
ASTClassNormal
AST of a normal VM Class.
ASTClassPrimitive<T>
AST of a primitive type VM Class.
ASTClassSetterDeclaration<T>
An AST Class Setter Declaration.
ASTClassStaticAccessor<C extends ASTClass<V>, V>
ASTValue for static access of class methods and fields.
ASTCodeRunner
An AST that can be run.
ASTConstructorParameterDeclaration<T>
ASTConstructorParametersDeclaration
An AST Constructor Parameters Declaration
ASTConstructorSet
Base AST Constructor Set.
ASTConstructorSetMultiple
ASTConstructorSet implementation, with multiple entries.
ASTConstructorSetSingle
ASTConstructorSet implementation, with 1 entry.
ASTEntryPointBlock
An ASTBlock that can have an entry-point method/function.
ASTEnumEntry
An entry of an ASTClassEnum.
ASTExpression
Base for AST expressions.
ASTExpressionAwait
ASTExpression that awaits another expression (await x).
ASTExpressionBitwiseNot
ASTExpression for the bitwise complement (~expression).
ASTExpressionCascade
ASTExpression for a Dart cascade (receiver..a()..b = c) and the null-aware cascade (receiver?..a()).
ASTExpressionChainFunctionInvocation
ASTExpression to call a class object function.
ASTExpressionConditional
ASTExpression for a conditional (ternary) expression: condition ? valueIfTrue : valueIfFalse in C-style languages, or valueIfTrue if condition else valueIfFalse in Python.
ASTExpressionFunctionInvocation
ASTExpression base class to call a function.
ASTExpressionGetterAccess
ASTExpression base class to call a function.
ASTExpressionGroupFunctionInvocation
ASTExpression to call a function from an expression. Example: (-d).toStringAsFixed(4)
ASTExpressionListLiteral
ASTExpression that declares a List literal.
ASTExpressionLiteral
ASTExpression that declares a literal (number, boolean and String).
ASTExpressionLiteralFunction
ASTExpression for an anonymous function / lambda / closure literal, e.g. (x) => x * 2, (x) { return x * 2; } or Python's lambda x: x * 2.
ASTExpressionLocalFunctionInvocation
ASTExpression to call a local context function.
ASTExpressionLocalGetterAccess
ASTExpression to call a local context function.
ASTExpressionLogical
Base for the short-circuiting logical operators && and ||.
ASTExpressionLogicalAnd
ASTExpression for a && b: expression2 runs only when a is true.
ASTExpressionLogicalOr
ASTExpression for a || b: expression2 runs only when a is false.
ASTExpressionMapLiteral
ASTExpression that declares a Map literal.
ASTExpressionNegation
ASTExpression that negates another expression.
ASTExpressionNegative
ASTExpression that makes another expression negative.
ASTExpressionNullAssertion
ASTExpression for the Dart null-assertion postfix operator (expr!): evaluates expression and throws ApolloVMNullPointerException if the value is null, otherwise returns the (non-null) value.
ASTExpressionNullCheck
ASTExpression for a comparison against the null literal — x == null and, when negated, x != null.
ASTExpressionNullCoalesce
ASTExpression for the null-coalescing operation a ?? b.
ASTExpressionNullValue
ASTExpression for null value.
ASTExpressionObjectEntryFunctionInvocation
ASTExpression to call a class object entry function. Code example:
ASTExpressionObjectFunctionInvocation
ASTExpression to call a class object function.
ASTExpressionObjectGetterAccess
ASTExpression to call a class object function.
ASTExpressionObjectSetterAssignment
ASTExpression that assigns to a class instance field: obj.field = value (and this.field = value), including compound operators (+=, -=, …).
ASTExpressionOperation
ASTExpression for an operation between 2 expressions.
ASTExpressionSetLiteral
ASTExpression that declares a Set literal: {1, 2} / <int>{}.
ASTExpressionVariable
An ASTVariable whose value is produced by evaluating an ASTExpression.
ASTExpressionVariableAccess
ASTExpression to access a variable.
ASTExpressionVariableAssignment
ASTExpression to assign the value of a variable.
ASTExpressionVariableDirectOperation
ASTExpression to directly apply a change to a variable.
ASTExpressionVariableEntryAccess
ASTExpression to access a variable entry, by index (foo[1]) or by key (foo[k]).
ASTExpressionVariableEntryAssignment
ASTExpression that assigns to a container entry: m[k] = v (map) or a[i] = v (list). Supports compound operators (+=, -=, …).
ASTExtension
AST of an extension: members declared for an existing type from outside its declaration. Sources: Dart extension E on T {}, Kotlin fun T.m() / val T.g: R get(), C# static class E { static R M(this T self) }.
ASTExternalClassFunction<T>
An AST External Class Function.
ASTExternalClassGetter<T>
An AST External Class Getter.
ASTExternalFunction<T>
An AST External Function.
ASTExternalGetter<T>
An AST External Getter.
ASTFunctionDeclaration<T>
An AST Function Declaration.
ASTFunctionParameterDeclaration<T>
An AST Function Parameter declaration.
ASTFunctionParametersDeclaration
An AST Function Parameters Declaration
ASTFunctionSet
Base AST Function Set.
ASTFunctionSetMultiple
ASTFunctionSet implementation, with multiple entries.
ASTFunctionSetSingle
ASTFunctionSet implementation, with 1 entry.
ASTFunctionSignature
An AST Function Signature.
ASTGetterDeclaration<T>
An AST getter Declaration.
ASTImportCombinator
A show/hide clause on an import or export, e.g. show User, Role or hide Internal. Language-agnostic: Dart show/hide, and the effect of TS/Python selective imports, normalize into this.
ASTImportedSymbol
A single imported/exported symbol with an optional local alias, e.g. User as U (TS { User as U }, Dart show User, Python from x import User as U). localName is the name the symbol is bound to in the importing module.
ASTInvocableDeclaration<T, P extends ASTParameterDeclaration, PS extends ASTParametersDeclaration<P>>
An AST of an invocable block declaration. See ASTClassConstructorDeclaration and ASTFunctionDeclaration.
ASTInvokableSet<P extends ASTParameterDeclaration, PS extends ASTParametersDeclaration<P>, F extends ASTInvocableDeclaration<dynamic, P, PS>>
Base AST Invokable Set.
ASTInvokableSetMultiple<P extends ASTParameterDeclaration, PS extends ASTParametersDeclaration<P>, F extends ASTInvocableDeclaration<dynamic, P, PS>>
Base ASTInvokableSet implementation, with multiple entries.
ASTInvokableSetSingle<P extends ASTParameterDeclaration, PS extends ASTParametersDeclaration<P>, F extends ASTInvocableDeclaration<dynamic, P, PS>>
Base ASTInvokableSet implementation, with 1 entry.
ASTModifiers
Modifiers of an ASTNode element.
ASTNode
An AST (Abstract Syntax Tree) Node.
ASTParameterDeclaration<T>
An AST Parameter declaration.
ASTParametersDeclaration<P extends ASTParameterDeclaration>
An AST Parameters Declaration
ASTRoot
An AST Root.
ASTRunStatus
The runtime status of execution.
ASTRuntimeVariable<T>
ASTVariable for a runtime value.
ASTScopeVariable<T>
ASTVariable for a variable visible in a scope context.
ASTSetterDeclaration<T>
An AST setter Declaration: set name(T value) { ... }.
ASTSingleLineStatementBlock
ASTStatement
An AST Statement.
ASTStatementAssert
An assert(condition) / assert(condition, message) statement.
ASTStatementBlock
ASTStatementBreak
ASTStatement for break; — interrupts the enclosing loop or switch.
ASTStatementContinue
ASTStatement for continue; — skips to the next loop iteration.
ASTStatementDoWhileLoop
ASTStatement for a do { } while (cond) loop: the body runs at least once.
ASTStatementExport
ASTStatement to export (or re-export) symbols from a module.
ASTStatementExpression
ASTStatementForEach
ASTStatementForLoop
ASTStatementFunctionDeclaration
ASTStatementImport
ASTStatement to import a package/library/module.
ASTStatementReturn
ASTStatement to return void.
ASTStatementReturnNull
ASTStatement to return null.
ASTStatementReturnValue
ASTStatement to return a value.
ASTStatementReturnVariable
ASTStatement to return a variable.
ASTStatementReturnWithExpression
ASTStatement to return an expression.
ASTStatementSwitch
ASTStatement for switch (exp) { case v: ... break; default: ... }.
ASTStatementThrow
ASTStatement for throw <expression>;.
ASTStatementTryCatch
ASTStatement for try { } catch ... { } finally { }.
ASTStatementTyped
ASTStatementValue
ASTStatementVariableDeclaration<V>
ASTStatement that declares a scope variable.
ASTStatementVariableDeclarationList
A variable declaration statement with more than one declarator, as parsed from num nr = 0.96, ng = 0.24, nb = 0.56;.
ASTStatementWhileLoop
ASTStaticClassAccessorVariable<T>
ASTVariable for static reference.
ASTStaticFieldVariable<T>
ASTVariable for a bare reference to a static field of clazz, e.g. count used inside a static method of the class that declares it. Reads and writes go to the class's static-field store (shared by all instances and by qualified ClassName.field access).
ASTSwitchCase
A single case <value>: (or default:) clause of an ASTStatementSwitch.
ASTThisVariable<T>
ASTVariable for this/self reference.
ASTType<V>
An AST Type.
ASTTypeAlias
A top-level type alias / typedef, e.g. Dart typedef UserId = int;, TypeScript type UserId = number;. A language-agnostic symbol whose resolved type is targetType.
ASTTypeArray<T extends ASTType<V>, V>
ASTType for an array/List.
ASTTypeArray2D<T extends ASTType<V>, V>
ASTType a for a 2D array/List.
ASTTypeArray3D<T extends ASTType<V>, V>
ASTType a for a 3D array/List.
ASTTypeBool
ASTType for booleans (bool).
ASTTypeConstructorThis
ASTType for constructor this parameter declaration.
ASTTypedNode
ASTTypeDouble
ASTType for double.
ASTTypedVariable<T>
ASTVariable with type.
ASTTypeDynamic
ASTType for dynamic declaration.
ASTTypeFunction<F extends Function>
ASTType for a Function.
ASTTypeFuture<T extends ASTType<V>, V>
ASTType a for a Future.
ASTTypeGenericVariable
Generic variable of an ASTType.
ASTTypeGenericWildcard
Generic wildcard (?) of an ASTType.
ASTTypeInt
ASTType for integer (int).
ASTTypeInterface<V>
ASTTypeMap<TK extends ASTType<K>, TV extends ASTType<V>, K, V>
ASTType for an array/List.
ASTTypeNull
ASTType for null.
ASTTypeNum<T extends num>
ASTType for numbers (num).
ASTTypeNumber<T extends num>
Base ASTType for primitive numbers.
ASTTypeObject
ASTType for Object.
ASTTypePrimitive<T>
Base ASTType for primitives.
ASTTypeSet<T extends ASTType<V>, V>
ASTType for a Set (Dart's set literal, {1, 2}).
ASTTypeString
ASTType for String.
ASTTypeVar
ASTType for var declaration.
ASTTypeVoid
ASTType for void.
ASTValue<T>
Base class for AST values.
ASTValueArray<T extends ASTType<V>, V>
ASTValue for an array/List.
ASTValueArray2D<T extends ASTType<V>, V>
ASTValue for a 2D array/List.
ASTValueArray3D<T extends ASTType<V>, V>
ASTValue for a 3D array/List.
ASTValueAsString<T>
ASTValue that should be converted to String.
ASTValueBool
ASTValue for booleans (bool).
ASTValueDouble
ASTValue for double.
ASTValueFunction<F extends Function>
ASTValue for a Function.
ASTValueFuture<T extends ASTType<V>, V>
ASTValue for a Future.
ASTValueInt
ASTValue for integer (int).
ASTValueMap<TK extends ASTType<K>, TV extends ASTType<V>, K, V>
ASTValue for a Map.
ASTValueNull
ASTValue for null.
ASTValueNum<T extends num>
ASTValue for numbers (num).
ASTValueObject
ASTValue for Object.
ASTValuePrimitive<T>
ASTValue for primitive types.
ASTValueReadIndex<T>
ASTValue for a variable read index: elem[1].
ASTValueReadKey<T>
ASTValue for a variable read key: elem[k].
ASTValueSet<T extends ASTType<V>, V>
ASTValue for a Set — the value of a Dart set literal ({1, 2}).
ASTValuesListAsString
ASTValue for lists that should be converted to String.
ASTValueStatic<T>
Static ASTValue. Useful for literals.
ASTValueString
ASTValue for String.
ASTValueStringConcatenation
ASTValue for a concatenations of other values.
ASTValueStringExpression<T>
ASTValue for expressions that should be converted to String.
ASTValueStringVariable<T>
ASTValue for a variable that should resolved and converted to String.
ASTValueVar
ASTValue declared with var.
ASTValueVoid
ASTValue for void.
ASTVariable
Base class for variable reference.
AsyncLoop<I>
An async loop, similar to a for loop block.
AsyncSequenceLoop
An async sequence loop, from i to limit (exclusive).
BinaryCodeUnit
A source code implementation of a CodeUnit.
BytesOutput
Generated Bytes.
CodeNamespace
A namespace that can have multiple loaded CodeUnit instances.
CodeUnit<T>
A Code Unit, with a source code in a specific language. See SourceCodeUnit and BinaryCodeUnit.
Completer<T>
A way to produce Future objects and to complete them later with a value or error.
ComputeIDs<D extends Object>
An ordered, comparable, and hashable set of IDs.
ComputeOnce<V>
Lazily computes a value at most once and caches either the result or error.
ComputeOnceCache<K extends Object, V>
Caches TimedComputeOnce instances by key, ensuring each computation is executed only once while retained.
ComputeOnceCachedIDs<D extends Object, V>
A ComputeOnceCache specialized for batched computations by ID.
CorePackageRegistry
Registry of built-in core packages (e.g. dart:math). Shared by the runtime ApolloImportManager and the resolution-layer VMModuleLoader, so both agree on what an import path resolves to as a core package.
DependencyGraph
A directed graph of module dependencies: an edge from → to means module from imports module to.
EventSink<T>
A Sink that supports adding errors.
Future<T>
The result of an asynchronous computation.
FutureOr<T>
A type representing values that are either Future<T> or T.
ImportDiagnostic
A structured diagnostic produced during module resolution.
ImportScope
The set of symbols visible inside one importing module: unprefixed named symbols and whole-module prefixed scopes (import ... as p → p.member).
LanguageNamespaces
Language specific namespaces.
LoadedModule
A module resolved to its parsed ASTRoot, identified by moduleId.
ModuleLoader
Resolves import paths to modules. Pluggable so alternative strategies (e.g. a filesystem loader) can be supplied without changing the resolver.
ModuleResolutionEngine
Facade for the module-resolution subsystem. Owns the ModuleLoader, DependencyGraph, ResolutionCache, and ModuleResolver, and exposes memoized resolution, incremental invalidation, and aggregated diagnostics.
ModuleResolver
Builds a module's own SymbolTable and, using a ModuleLoader and a recursive resolver callback, its ImportScope. Language-agnostic: it only reads the canonical AST (ASTStatementImport/ASTStatementExport).
MultiStreamController<T>
An enhanced stream controller provided by Stream.multi.
NullSafetyAnalyzer
A pragmatic, flow-aware Dart null-safety analyzer.
NullSafetyDiagnostic
A single null-safety finding produced by NullSafetyAnalyzer.
ParseResult<T>
ResolutionCache
Caches resolved modules by their canonical id, and invalidates only the modules affected by a change (the changed module plus its transitive importers) so re-resolution is incremental.
ResolvedModule
The result of resolving one module: its own symbol table, the import scope it sees, the modules it imports, and any diagnostics produced.
ResolvedSymbol
A resolved symbol: a name bound to a top-level AST declaration in a module.
SourceCodeUnit
A source code implementation of a CodeUnit.
Stream<T>
A source of asynchronous data events.
StreamConsumer<S>
Abstract interface for a "sink" accepting multiple entire streams.
StreamController<T>
A controller with the stream it controls.
StreamIterator<T>
An Iterator-like interface for the values of a Stream.
StreamSink<S>
A object that accepts stream events both synchronously and asynchronously.
StreamSubscription<T>
A subscription on events from a Stream.
StreamTransformer<S, T>
Transforms a Stream.
StreamTransformerBase<S, T>
Base class for implementing StreamTransformer.
StreamView<T>
Stream wrapper that only exposes the Stream interface.
SymbolTable
A chained symbol table for one SymbolScopeLevel. Lookups check this level then walk up to parent (module → package → global).
SynchronousStreamController<T>
A stream controller that delivers its events synchronously.
TimedComputeOnce<V>
A ComputeOnce that records when the computation is resolved.
Timer
A countdown timer that can be configured to fire once or repeatedly.
VMClassContext<T>
A runtime context, for classes, of the VM.
VMContext
Base class for a runtime context of the VM.
VMModuleLoader
Web-safe ModuleLoader that resolves imports against the CodeUnits already loaded into an ApolloVM. No filesystem access.
VMObject
An VM Object instance, with respective fields for class type.
VMScopeContext
A runtime context, for current scope, of the VM.
VMTypeResolver
WasmHostFunction
A host (Dart) function provided to satisfy a Wasm module import.
WasmModule
A WebAssembly (Wasm) Runtime module
WasmRuntime
A WebAssembly (Wasm) Runtime.
Zone
A zone represents an environment that remains stable across asynchronous calls.
ZoneDelegate
An adapted view of the parent zone.
ZoneSpecification
A parameter object with custom zone function handlers for Zone.fork.

Enums

ASTAssignmentOperator
ASTClassKind
The kind of an ASTClassNormal: a regular class, an abstract class, or an interface (e.g. a TypeScript interface).
ASTExpressionOperator
ASTImportCombinatorKind
The kind of an ASTImportCombinator: a show (allow-list) or hide (deny-list) clause on an import/export.
ASTNumType
ImportDiagnosticKind
The category of an import/resolution diagnostic.
ImportDiagnosticSeverity
Severity of an ImportDiagnostic.
NullSafetySeverity
Severity of a NullSafetyDiagnostic.
SymbolKind
The kind of a resolved ResolvedSymbol. Covers the symbol categories the import system must resolve across all languages.
SymbolScopeLevel
The four symbol-table scope levels, from widest to narrowest.
WasmValueType
A Wasm value type, for host import signatures.

Mixins

GeneratedOutput<O extends Object, T extends Object>
Base class for code generation output.
StrictType
WithCallChainFunction

Extensions

ASTTypeExtension on ASTType
AsyncExtensionErrorLoggerExtension on AsyncExtensionErrorLogger?
AsyncFunctionExtension on AsyncFunction<R>
AsyncFunctionExtension1 on AsyncFunction1<R, A>
AsyncFunctionExtension2 on AsyncFunction2<R, A, B>
AsyncFunctionExtension3 on AsyncFunction3<R, A, B, C>
AsyncFunctionExtension4 on AsyncFunction4<R, A, B, C, D>
AsyncFunctionExtension5 on AsyncFunction5<R, A, B, C, D, E>
AsyncFunctionExtension6 on AsyncFunction6<R, A, B, C, D, E, F>
AsyncFunctionExtension7 on AsyncFunction7<R, A, B, C, D, E, F, G>
AsyncFunctionExtension8 on AsyncFunction8<R, A, B, C, D, E, F, G, H>
AsyncFunctionExtension9 on AsyncFunction9<R, A, B, C, D, E, F, G, H, I>
AsyncFunctionExtensionG on AsyncFunctionGeneric
CompleterExtension on Completer
CreateListTypedExtension on List<T>
DoubleScientificNotationExtension on double
ExpandoFutureExtension on Expando<Future<T>>
ExpandoFutureOrExtension on Expando<FutureOr<T>>
FunctionArgs0Extension on FutureOr<R> Function()
FunctionArgs1Extension on FutureOr<R> Function(A a)
FunctionArgs2Extension on FutureOr<R> Function(A a, B b)
FutureDoubleExtension on Future<double>
FutureExtension on Future<T>
FutureExtensions on Future<T>
Convenience methods on futures.
FutureIntExtension on Future<int>
FutureIterable on Iterable<Future<T>>
FutureIterableExtension on Future<Iterable<T>>
FutureIterableNullableExtension on Future<Iterable<T>?>
FutureNonNullOnErrorExtension on Future<T>
FutureNullableExtension on Future<T?>
FutureNullableOnErrorExtension on Future<T?>
FutureNumExtension on Future<num>
FutureOnErrorExtension on Future<T>
FutureOrDoubleExtension on FutureOr<double>
FutureOrExtension on FutureOr<T>
Extension for FutureOr.
FutureOrFunctionArgs0Extension on FutureOr<FutureOr<R> Function()>
FutureOrFunctionArgs1Extension on FutureOr<FutureOr<R> Function(A a)>
FutureOrFunctionArgs2Extension on FutureOr<FutureOr<R> Function(A a, B b)>
FutureOrIntExtension on FutureOr<int>
FutureOrIterableExtension on FutureOr<Iterable<T>>
FutureOrIterableNullableExtension on FutureOr<Iterable<T>?>
FutureOrNullableExtension on FutureOr<T?>
FutureOrNumExtension on FutureOr<num>
FutureRecord2 on (Future<T1>, Future<T2>)
Parallel operations on a record of futures.
FutureRecord3 on (Future<T1>, Future<T2>, Future<T3>)
Parallel operations on a record of futures.
FutureRecord4 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>)
Parallel operations on a record of futures.
FutureRecord5 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>)
Parallel operations on a record of futures.
FutureRecord6 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>)
Parallel operations on a record of futures.
FutureRecord7 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>, Future<T7>)
Parallel operations on a record of futures.
FutureRecord8 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>, Future<T7>, Future<T8>)
Parallel operations on a record of futures.
FutureRecord9 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>, Future<T7>, Future<T8>, Future<T9>)
Parallel operations on a record of futures.
IterableASTConstructorParameterDeclarationExtension on Iterable<ASTConstructorParameterDeclaration>
IterableASTFunctionDeclarationExtension on Iterable<F>
IterableASTParameterDeclarationExtension on Iterable<P>
IterableAsyncExtension on Iterable<T>
IterableComputeOnceExtension on Iterable<ComputeOnce<V>>
Utilities to resolve multiple ComputeOnce instances.
IterableFutureExtension on Iterable<Future<T>>
Extension for Iterable<Future<T>>.
IterableFutureOrExtension on Iterable<FutureOr<T>>
Extension for Iterable<FutureOr<T>>.
IterableFutureOrExtensionNullable on Iterable<FutureOr<T?>>
Extensions that apply to iterables with a nullable element type.
IterableFutureOrNullableExtension on Iterable<FutureOr<T>?>
IterableMapEntryFutureExtension on Iterable<MapEntry<FutureOr<K>, FutureOr<V>>>
IterableMapEntryFutureKeyExtension on Iterable<MapEntry<FutureOr<K>, V>>
IterableMapEntryFutureValueExtension on Iterable<MapEntry<K, FutureOr<V>>>
ListIdValuePairExtension on List<(D, V)>
Binary-search utilities for lists of (ID, value) pairs.
ListTypedExtension on List<T>
MapComputeIDsExtension on Map<ComputeIDs<D>, TimedComputeOnce<V>>
Utilities to resolve all TimedComputeOnce values in a map keyed by ComputeIDs.
MapFutureExtension on Map<FutureOr<K>, FutureOr<V>>
MapFutureKeyExtension on Map<FutureOr<K>, V>
MapFutureValueExtension on Map<K, FutureOr<V>>
MapFutureValueNullableExtension on Map<K, FutureOr<V?>>
MapGetIgnoreCaseExtension on Map<K, V>
ObjectExtension on T
Extension for Object T.

Functions

applyASTAssignmentOperator(VMContext context, ASTAssignmentOperator operator, ASTValue current, ASTValue value) → FutureOr<ASTValue>
Applies a compound assignment operator: the current OP value half of target OP= value.
astExpressionOperation(ASTExpression e1, ASTExpressionOperator op, ASTExpression e2) → ASTExpression
Builds the ASTExpression for the binary operation e1 <op> e2, specializing the shapes that have a dedicated node:
asyncRetry<R>(FutureOr<R?> tryBlock(), {R? defaultValue, bool throwOnRetryExhaustion = false, int maxRetries = 3, Duration? retryDelay, Duration? computeDelay(int retry)?, bool? onError(Object error, StackTrace stackTrace, int retries)?}) → FutureOr<R?>
Executes an asynchronous operation with retry logic.
asyncTry<R>(FutureOr<R?> tryBlock(), {FutureOr<R?> then(R? r)?, Function? onError, FutureOr<void> onFinally()?}) → FutureOr<R?>
Executes a tryBlock with a try, then, catch, and finally flow.
getASTAssignmentDirectOperator(String op) → ASTAssignmentOperator
getASTAssignmentDirectOperatorText(ASTAssignmentOperator op) → String
getASTAssignmentOperator(String op) → ASTAssignmentOperator
getASTAssignmentOperatorText(ASTAssignmentOperator op) → String
getASTExpressionOperator(String op) → ASTExpressionOperator
getASTExpressionOperatorText(ASTExpressionOperator op) → String
resolveGeneric<T>() → Type
runZoned<R>(R body(), {Map<Object?, Object?>? zoneValues, ZoneSpecification? zoneSpecification, Function? onError}) → R
Runs body in its own zone.
runZonedGuarded<R>(R body(), void onError(Object error, StackTrace stack), {Map<Object?, Object?>? zoneValues, ZoneSpecification? zoneSpecification}) → R?
Runs body in its own error zone.
scheduleMicrotask(void callback()) → void
Runs a function asynchronously.
unawaited(Future<void>? future) → void
Explicitly ignores a future.

Typedefs

ApolloLanguageRunner = ApolloRunner
ASTPrintFunction = void Function(Object? o)
AsyncExtensionErrorLogger = void Function(Object? e, StackTrace? s)?
AsyncFunction<R> = FutureOr<R> Function()
AsyncFunction1<R, A> = FutureOr<R> Function(A a)
AsyncFunction2<R, A, B> = FutureOr<R> Function(A a, B b)
AsyncFunction3<R, A, B, C> = FutureOr<R> Function(A a, B b, C c)
AsyncFunction4<R, A, B, C, D> = FutureOr<R> Function(A a, B b, C c, D d)
AsyncFunction5<R, A, B, C, D, E> = FutureOr<R> Function(A a, B b, C c, D d, E e)
AsyncFunction6<R, A, B, C, D, E, F> = FutureOr<R> Function(A a, B b, C c, D d, E e, F f)
AsyncFunction7<R, A, B, C, D, E, F, G> = FutureOr<R> Function(A a, B b, C c, D d, E e, F f, G g)
AsyncFunction8<R, A, B, C, D, E, F, G, H> = FutureOr<R> Function(A a, B b, C c, D d, E e, F f, G g, H h)
AsyncFunction9<R, A, B, C, D, E, F, G, H, I> = FutureOr<R> Function(A a, B b, C c, D d, E e, F f, G g, H h, I i)
AsyncFunctionGeneric = Function
ComputeCall<V> = FutureOr<V> Function()
Signature for a computation executed by ComputeOnce.
ComputeCallIDs<D extends Object, V> = FutureOr<List<V>> Function(List<D> ids)
Signature for computing values for a list of IDs.
ComputeIDCompare<D> = int Function(D a, D b)
Comparator used to order and compare IDs.
ComputeIDHash<D> = int Function(D e)
Hash function used to compute a stable hash for an ID.
ControllerCallback = void Function()
Type of a stream controller's onListen, onPause and onResume callbacks.
ControllerCancelCallback = FutureOr<void> Function()
Type of stream controller onCancel callbacks.
CreatePeriodicTimerHandler = Timer Function(Zone self, ZoneDelegate parent, Zone zone, Duration period, void f(Timer timer))
The type of a custom Zone.createPeriodicTimer implementation function.
CreateTimerHandler = Timer Function(Zone self, ZoneDelegate parent, Zone zone, Duration duration, void f())
The type of a custom Zone.createTimer implementation function.
ErrorCallbackHandler = AsyncError? Function(Zone self, ZoneDelegate parent, Zone zone, Object error, StackTrace? stackTrace)
The type of a custom Zone.errorCallback implementation function.
ForkHandler = Zone Function(Zone self, ZoneDelegate parent, Zone zone, ZoneSpecification? specification, Map<Object?, Object?>? zoneValues)
The type of a custom Zone.fork implementation function.
HandleUncaughtErrorHandler = void Function(Zone self, ZoneDelegate parent, Zone zone, Object error, StackTrace stackTrace)
The type of a custom Zone.handleUncaughtError implementation function.
ParameterValueResolver = FutureOr Function(ASTValue? paramVal, VMContext context)
PosComputeCall<V> = FutureOr<V> Function(V? value, Object? error, StackTrace? stackTrace)
Callback invoked after a computation completes.
PrintHandler = void Function(Zone self, ZoneDelegate parent, Zone zone, String line)
The type of a custom Zone.print implementation function.
RegisterBinaryCallbackHandler = ZoneBinaryCallback<R, T1, T2> Function<R, T1, T2>(Zone self, ZoneDelegate parent, Zone zone, R f(T1 arg1, T2 arg2))
The type of a custom Zone.registerBinaryCallback implementation function.
RegisterCallbackHandler = ZoneCallback<R> Function<R>(Zone self, ZoneDelegate parent, Zone zone, R f())
The type of a custom Zone.registerCallback implementation function.
RegisterUnaryCallbackHandler = ZoneUnaryCallback<R, T> Function<R, T>(Zone self, ZoneDelegate parent, Zone zone, R f(T arg))
The type of a custom Zone.registerUnaryCallback implementation function.
RunBinaryHandler = R Function<R, T1, T2>(Zone self, ZoneDelegate parent, Zone zone, R f(T1 arg1, T2 arg2), T1 arg1, T2 arg2)
The type of a custom Zone.runBinary implementation function.
RunHandler = R Function<R>(Zone self, ZoneDelegate parent, Zone zone, R f())
The type of a custom Zone.run implementation function.
RunUnaryHandler = R Function<R, T>(Zone self, ZoneDelegate parent, Zone zone, R f(T arg), T arg)
The type of a custom Zone.runUnary implementation function.
ScheduleMicrotaskHandler = void Function(Zone self, ZoneDelegate parent, Zone zone, void f())
The type of a custom Zone.scheduleMicrotask implementation function.
TryCallOnError<R> = FutureOr<R> Function(Object error, StackTrace stackTrace)
WasmHostImports = Map<String, Map<String, WasmHostFunction>>
Host imports to provide at instantiation, keyed by module name then import name (e.g. {'env': {'print': WasmHostFunction(...)}}).
WasmModuleFunction<F extends Function> = ({F function, bool varArgs})
Represents a WebAssembly-exported function with metadata.
WasmRuntimeProvider = WasmRuntime Function()
Builds a WasmRuntime. See WasmRuntime.registerProvider.
ZoneBinaryCallback<R, T1, T2> = R Function(T1, T2)
A two-argument function, like the argument to Zone.runBinary.
ZoneCallback<R> = R Function()
A no-argument function, like the argument to Zone.run.
ZoneUnaryCallback<R, T> = R Function(T)
A one-argument function, like the argument to Zone.runUnary.

Exceptions / Errors

ApolloVMCastException
When a cast error happens while executing some code.
ApolloVMNullPointerException
When a NPE happens while executing some code.
ApolloVMRuntimeError
When an error happens while executing some code (ASTNode).
ApolloVMThrownException
A value thrown by a user throw statement, carrying the thrown value. Caught by an ASTStatementTryCatch.
AsyncError
An error and a stack trace.
DeferredLoadException
Thrown when a deferred library fails to load.
NullSafetyError
Thrown when loading a CodeUnit whose AST has null-safety errors, if the ApolloVM was created with nullSafetyChecks: true.
ParallelWaitError<V, E>
Error thrown when waiting for multiple futures, when some have errors.
SyntaxError
Syntax Error while parsing.
TimeoutException
Thrown when a scheduled timeout happens while waiting for an async result.
UnsupportedSyntaxError
Unsupported syntax Error while parsing.
UnsupportedTypeError
Unsupported type Error while parsing.
UnsupportedValueOperationError
Unsupported value operation Error while parsing.
WasmModuleError
WasmModule error.
WasmModuleExecutionError
Thrown when WasmModule execution fails.
WasmModuleLoadError
Thrown when WasmModule fails to load.