InterpretedFunction class
Constructors
-
InterpretedFunction.constructor(SConstructorDeclaration declaration, Environment closure, RuntimeType? owner)
-
-
InterpretedFunction.declaration(SFunctionDeclaration declaration, Environment closure, RuntimeType? declaredReturnType, bool isNullable, {AppliedRuntimeType? declaredReturnTypeApplied, bool lenientBounds = false})
-
-
InterpretedFunction.expression(SFunctionExpression expression, Environment closure)
-
-
InterpretedFunction.method(SMethodDeclaration declaration, Environment closure, RuntimeType? owner, {bool lenientBounds = false})
-
Methods
-
bind(RuntimeValue instance)
→ Callable
-
Binds 'this' to a specific instance, returning a new callable
where the closure has 'this' defined.
-
call(InterpreterVisitor visitor, List<Object?> positionalArguments, [Map<String, Object?> namedArguments = const {}, List<RuntimeType>? typeArguments])
→ Object?
-
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveDeferredReturnType(RuntimeType? type, {AppliedRuntimeType? applied})
→ void
-
GitHub #20 — a top-level function's return type may name a class of a
library in the same import cycle that has not declared it yet; the
interpreter builds the function without it and sets it here once the
outermost module load returns.
applied is the DFUB6 applied return
type, resolved at the same time.
-
runAsBoundBody(InterpreterVisitor visitor, Environment environment)
→ Object?
-
ghissues77: runs this function's body, its parameters already bound
into
environment (an extension method's), as the async function or
sync* / async* generator it is; notSuspending for a plain function,
which the caller runs itself. An extension method ran an async body
synchronously: the first await handed back a suspension nothing
resumed, so nothing after it ran (Slang's loadLocale never stored the
translations it loaded).
-
toString()
→ String
-
A string representation of this object.
override
Static Methods
-
checkBindingType(Environment env, STypeAnnotation? typeNode, Object? value, {String? describedAs})
→ Object?
-
The value to bind to a written type
typeNode, after checking it and
applying the one conversion Dart applies here.
-
checkForEachBinding(Environment env, SAstNode? loopVariable, Object? element)
→ Object?
-
The value to bind to a for-each loop variable for one iteration, checked
against the variable's written type.
-
resolveBinding(Environment env, STypeAnnotation? typeNode, {String? describedAs})
→ ResolvedBinding?
-
The value-independent half of a binding check, resolved once.
-
resolveForEachBinding(Environment env, SAstNode? loopVariable)
→ ResolvedBinding?
-
resolveBinding for a for-each loop variable: the resolved check, or null
when the loop needs none.
-
resolveTypeParameterBounds(STypeParameterList? typeParameters, Environment env)
→ Map<String, RuntimeType?>
-
The bounds of
typeParameters resolved STRICTLY in env: an undefined
bound throws.