ExpressionCompilerService class

Service that handles expression compilation requests.

Expression compiler service spawns a dartdevc in expression compilation mode in an isolate and communicates with the isolate via send/receive ports. It also handles full dill file read requests from the isolate and redirects them to the asset server.

Uses _address and _port to communicate and to redirect asset requests to the asset server.

Configuration created by sdkConfigurationProvider describes the locations of SDK files used in expression compilation (summaries, libraries spec, compiler worker snapshot).

Users need to stop the service by calling stop.

Implemented types

Constructors

ExpressionCompilerService(String _address, FutureOr<int> _port, {bool verbose = false, required SdkConfigurationProvider sdkConfigurationProvider})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sdkConfigurationProvider SdkConfigurationProvider
final

Methods

compileExpressionToJs(String isolateId, String libraryUri, String scriptUri, int line, int column, Map<String, String> jsModules, Map<String, String> jsFrameValues, String moduleName, String expression) Future<ExpressionCompilationResult>
Compiles expression in libraryUri at line:column to JavaScript in moduleName.
override
initialize(CompilerOptions options) Future<void>
Initializes the compiler with the app build settings.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
stop() Future<void>
toString() String
A string representation of this object.
inherited
updateDependencies(Map<String, ModuleInfo> modules) Future<bool>
Trigger (re-)load of kernel files for modules.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited