Got it to compile to WASM

This commit is contained in:
lax1dude 2024-11-03 14:12:00 -08:00
parent d86ab08843
commit e204a0ecd0
2 changed files with 4 additions and 4 deletions

View File

@ -129,7 +129,8 @@ public class WasmGCTypeMapper {
} }
if (result == null) { if (result == null) {
if (className.equals(Address.class.getName())) { if (className.equals(Address.class.getName())) {
typeCache.put(className, WasmType.INT32); result = WasmType.INT32;
typeCache.put(className, result);
} else { } else {
var cls = classes.get(className); var cls = classes.get(className);
if (cls == null) { if (cls == null) {

View File

@ -187,9 +187,8 @@ public class WasmGCIntrinsics implements WasmGCIntrinsicProvider {
private void fillLaxMalloc() { private void fillLaxMalloc() {
laxMallocIntrinsic = new LaxMallocIntrinsic(); laxMallocIntrinsic = new LaxMallocIntrinsic();
add(new MethodReference(LaxMalloc.class, "laxMalloc", int.class, Address.class), laxMallocIntrinsic); add(new MethodReference(LaxMalloc.class, "addrHeap", int.class, Address.class), laxMallocIntrinsic);
add(new MethodReference(LaxMalloc.class, "laxCalloc", int.class, Address.class), laxMallocIntrinsic); add(new MethodReference(LaxMalloc.class, "growHeapOuter", int.class, int.class), laxMallocIntrinsic);
add(new MethodReference(LaxMalloc.class, "laxFree", Address.class, void.class), laxMallocIntrinsic);
add(new MethodReference(LaxMalloc.class, "getHeapMinAddr", Address.class), laxMallocIntrinsic); add(new MethodReference(LaxMalloc.class, "getHeapMinAddr", Address.class), laxMallocIntrinsic);
add(new MethodReference(LaxMalloc.class, "getHeapMaxAddr", Address.class), laxMallocIntrinsic); add(new MethodReference(LaxMalloc.class, "getHeapMaxAddr", Address.class), laxMallocIntrinsic);
} }