I rule this software but there's a lot of bugs in the way

thats why I need to always drink and write
This commit is contained in:
2026-07-05 15:21:42 +02:00
parent 9eae8e8fd2
commit cb862520de
5 changed files with 22 additions and 8 deletions

View File

@@ -22,7 +22,7 @@ public class NativeBindings {
eeprom.allocate();
nn_Component eepromCard = ncl_createEEPROM(universe, UUID.randomUUID().toString(), eeprom, "error('amog us')", false);
eeprom.free();
nn_Computer computer = nn_createComputer(universe, UUID.randomUUID().toString(), 4096, 100, 100);
nn_Computer computer = nn_createComputer(universe, UUID.randomUUID().toString(), 1048576, 100, 100);
nn_setCallBudget(computer, 0);
System.out.println("Arch: " + arch.name);
nn_setArchitecture(computer, arch);

View File

@@ -175,4 +175,4 @@ jobject Carbon::Map::To_nn_EnvironmentRequest(JNIEnv* env, nn_EnvironmentRequest
}
namespace Carbon::Exceptions {
CARBON_EXCEPTION_FUNC(ThrowNullPtr, "java/lang/NullPointerException");
}
}

View File

@@ -62,6 +62,7 @@ JNIEXPORT jobject JNICALL Java_org_neoflock_NeoNucleus_NativeBindings_nn_1create
NULLPTR_CHECK(nnCtx, nn_Context);
nn_Universe* universe = nn_createUniverse(nnCtx, NULL);
printf("created universe %p\n", universe);
/*jclass clazz = env->FindClass("org/neoflock/NeoNucleus/nn_Universe");
jmethodID creator = env->GetStaticMethodID(clazz, "createFromPointer", "(J)Lorg/neoflock/NeoNucleus/Universe;");
return env->CallStaticObjectMethod(clazz, creator, (jlong) universe);*/
@@ -235,7 +236,8 @@ JNIEXPORT jobject JNICALL Java_org_neoflock_NeoNucleus_NativeBindings_nn_1tick
(JNIEnv * env, jclass, jobject computer) {
nn_Computer* nnPC = (nn_Computer*) Carbon::PointerBacked::GetPointer(env, computer);
NULLPTR_CHECK(nnPC, nn_Computer);
return Carbon::Map::To_nn_Exit(env, nn_tick(nnPC));
nn_Exit e = nn_tick(nnPC);
return Carbon::Map::To_nn_Exit(env, e);
}
JNIEXPORT jobject JNICALL Java_org_neoflock_NeoNucleus_NativeBindings_nn_1tickSynchronized