[K/Wasm] Generate source-map for WAT-files

This commit is contained in:
Artem Kobzar
2024-01-05 14:16:32 +00:00
committed by Space Team
parent aea2e8052a
commit e4c244d5db
12 changed files with 265 additions and 75 deletions
@@ -147,8 +147,8 @@ class WasmBackendFacade(
wat = newWat,
jsUninstantiatedWrapper = jsUninstantiatedWrapper,
jsWrapper = jsWrapper,
sourceMap = null,
wasm = newWasm
wasm = newWasm,
debugInformation = null
)
}
}
@@ -178,7 +178,7 @@ class WasmDebugRunner(testServices: TestServices) : AbstractWasmArtifactsCollect
}
private val WasmCompilerResult.parsedSourceMaps: SourceMap
get() = when (val parseResult = SourceMapParser.parse(sourceMap ?: error("Expect to have source maps for stepping test"))) {
get() = when (val parseResult = SourceMapParser.parse(debugInformation?.sourceMapForBinary ?: error("Expect to have source maps for stepping test"))) {
is SourceMapSuccess -> parseResult.value
is SourceMapError -> error(parseResult.message)
}