loadBytecode method
dynamic
loadBytecode({})
Load a bytecode module and immediately run a function in it.
Implementation
dynamic loadBytecode(
{required Uint8List bytes,
required String moduleName,
bool globallyImport = false,
String? invokeFunc,
List<dynamic> positionalArgs = const [],
Map<String, dynamic> namedArgs = const {},
List<HTType> typeArgs = const []}) {
final result = interpreter.loadBytecode(
bytes: bytes,
moduleName: moduleName,
globallyImport: globallyImport,
invokeFunc: invokeFunc,
positionalArgs: positionalArgs,
namedArgs: namedArgs,
typeArgs: typeArgs,
printPerformanceStatistics: config.printPerformanceStatistics,
);
if (config.doStaticAnalysis &&
interpreter.currentBytecodeModule.namespaces.isNotEmpty) {
analyzer.globalNamespace.import(
interpreter.currentBytecodeModule.namespaces.values.last,
idOnly: true);
}
return result;
}