WASM: Implement wasm-native strings part 1
There are several changes here but they all required for at least one test to pass. - Implemented String class and several utility functions using built-in CharArray - Added new constant memory segment to hold string literals and required funcs to work with them - Added very crude mostly incorrect rudimentary ability to pass strings back to javascript
This commit is contained in:
committed by
TeamCityServer
parent
9ccdffe8ad
commit
0f84525bdc
@@ -151,7 +151,7 @@ abstract class BasicWasmBoxTest(
|
||||
const wasmModule = new WebAssembly.Module(wasmBinary);
|
||||
const wasmInstance = new WebAssembly.Instance(wasmModule, { runtime, js_code });
|
||||
|
||||
const actualResult = wasmInstance.exports.$testFunction();
|
||||
const actualResult = runtime.importStringToJs(wasmInstance.exports.$testFunction(), wasmInstance.exports.memory);
|
||||
if (actualResult !== "OK")
|
||||
throw `Wrong box result '${'$'}{actualResult}'; Expected "OK"`;
|
||||
""".trimIndent()
|
||||
|
||||
Reference in New Issue
Block a user