You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/library.js
+10-13Lines changed: 10 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -2872,34 +2872,31 @@ addToLibrary({
2872
2872
while(ch=HEAPU8[sigPtr++]){
2873
2873
#if ASSERTIONS
2874
2874
varchr=String.fromCharCode(ch);
2875
-
varvalidChars=['d','f','i'];
2875
+
varvalidChars=['d','f','i','p'];
2876
2876
#if WASM_BIGINT
2877
2877
// In WASM_BIGINT mode we support passing i64 values as bigint.
2878
2878
validChars.push('j');
2879
-
#endif
2880
-
#if MEMORY64
2881
-
// In MEMORY64 mode we also support passing i64 pointer types which
2882
-
// get automatically converted to int53/Double.
2883
-
validChars.push('p');
2884
2879
#endif
2885
2880
assert(validChars.includes(chr),`Invalid character ${ch}("${chr}") in readEmAsmArgs! Use only [${validChars}], and do not specify "v" for void return argument.`);
2886
2881
#endif
2887
2882
// Floats are always passed as doubles, so all types except for 'i'
2888
2883
// are 8 bytes and require alignment.
2889
-
buf+=(ch!={{{charCode('i')}}})&&buf%8 ? 4 : 0;
2890
-
readEmAsmArgsArray.push(
2891
-
#if MEMORY64
2892
-
// Special case for pointers under wasm64 which we read as int53 Numbers.
if(deserialized!=num)warnOnce(`writeI53ToI64() out of range: serialized JS Number ${num} to Wasm heap as bytes lo=${ptrToString(HEAPU32[ptr/4])}, hi=${ptrToString(HEAPU32[ptr/4+1])}, which deserializes back to ${deserialized} instead!`);
27
+
varoffset={{{getHeapOffset('ptr','u32')}}};
28
+
if(deserialized!=num)warnOnce(`writeI53ToI64() out of range: serialized JS Number ${num} to Wasm heap as bytes lo=${ptrToString(HEAPU32[offset])}, hi=${ptrToString(HEAPU32[offset+1])}, which deserializes back to ${deserialized} instead!`);
0 commit comments