portableExecutionImage method

String portableExecutionImage({
  1. CacheExecutionImageFormat format = CacheExecutionImageFormat.json,
})

Encodes complete state for compatible Dart instances or backends.

Only the built-in round-robin policy and backing store are supported. The simulator must be settled, and external channel state is excluded. JSON is the default; CacheExecutionImageFormat.stream is shared with generated Verilog and SystemC models.

Implementation

String portableExecutionImage({
  CacheExecutionImageFormat format = CacheExecutionImageFormat.json,
}) {
  final json = _encodeCacheImage(this);
  return format == CacheExecutionImageFormat.json
      ? json
      : _cacheJsonToStream(json);
}