[Wasm][Stdlib] Add public APIs for linear memory access

Needed for interop with APIs that use linear memory.
This commit is contained in:
Svyatoslav Kuzmich
2022-12-29 19:25:23 +00:00
committed by Space Team
parent fbf06b5495
commit 9bc6b420a9
20 changed files with 702 additions and 56 deletions
+5 -2
View File
@@ -1,4 +1,4 @@
// EXPECTED_REACHABLE_NODES: 1273
// EXPECTED_REACHABLE_NODES: 1490
// DONT_TARGET_EXACT_BACKEND: WASM
// WASM_MUTE_REASON: UNSUPPORTED_JS_INTEROP
// KJS_WITH_FULL_RUNTIME
@@ -9,7 +9,10 @@ import kotlin.js.Date
fun box(): String {
assertEquals("1970-01-01T00:00:00.000Z", Date(0L).toISOString())
assertEquals("10/4/1995, 12:00:00 AM", Date(1995, 9, 4, 0, 0, 0, 0L).toLocaleString("en-US"))
assertTrue(Date(1995, 9, 4, 0, 0, 0, 0L).toLocaleString("en-US") in listOf(
"10/4/1995, 12:00:00 AM",
"10/4/1995, 12:00:00AM" // New v8 uses NNBSP
))
assertEquals(812764800000.0, Date.UTC(1995, 9, 4, 0, 0, 0, 0L))
return "OK"