mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-11 21:51:50 +09:00
kotlin update 1.8.20, coroutines are broken now :(
This commit is contained in:
@@ -3,7 +3,8 @@ package net.torvald.tsvm
|
||||
/**
|
||||
* Created by minjaesong on 2022-12-30.
|
||||
*/
|
||||
inline class ThreeFiveMiniUfloat(val index: Int = 0) {
|
||||
@JvmInline
|
||||
value class ThreeFiveMiniUfloat(val index: Int = 0) {
|
||||
|
||||
init {
|
||||
if (index and 0xffffff00.toInt() != 0) throw IllegalArgumentException("Index not in 0..255 ($index)")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package net.torvald.tsvm
|
||||
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlin.coroutines.Job
|
||||
import net.torvald.UnsafeHelper
|
||||
import net.torvald.UnsafePtr
|
||||
import net.torvald.terrarum.modulecomputers.virtualcomputer.tvd.toHex
|
||||
@@ -15,7 +15,8 @@ import kotlin.math.ceil
|
||||
|
||||
class ErrorIllegalAccess(vm: VM, addr: Long) : RuntimeException("Segmentation fault at 0x${addr.toString(16).padStart(8, '0')} on VM id ${vm.id}")
|
||||
|
||||
inline class VmId(val text: String) {
|
||||
@JvmInline
|
||||
value class VmId(val text: String) {
|
||||
override fun toString() = text
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package net.torvald.tsvm
|
||||
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlin.coroutines.GlobalScope
|
||||
import kotlin.coroutines.Job
|
||||
import kotlin.coroutines.launch
|
||||
import net.torvald.UnsafeHelper
|
||||
import net.torvald.UnsafePtr
|
||||
import net.torvald.terrarum.modulecomputers.virtualcomputer.tvd.toUlong
|
||||
|
||||
@@ -3,10 +3,7 @@ package net.torvald.tsvm
|
||||
import com.badlogic.gdx.Gdx
|
||||
import com.badlogic.gdx.utils.GdxRuntimeException
|
||||
import com.badlogic.gdx.utils.JsonValue
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.cancel
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlin.coroutines.*
|
||||
import net.torvald.tsvm.peripheral.BlockTransferInterface
|
||||
import net.torvald.tsvm.peripheral.GraphicsAdapter
|
||||
import net.torvald.tsvm.peripheral.PeriBase
|
||||
@@ -23,7 +20,7 @@ object VMSetupBroker {
|
||||
* @param vm VM to initialise
|
||||
* @param gpu Display device to attach
|
||||
* @param vmRunners Hashmap on the host of VMs that holds the instances of the VMRunners for the given VM. Key: Int(VM's identifier), value: [net.torvald.tsvm.VMRunner]
|
||||
* @param coroutineJobs Hashmap on the host of VMs that holds the coroutine-job object for the currently running VM-instance. Key: Int(VM's identifier), value: [kotlinx.coroutines.Job]
|
||||
* @param coroutineJobs Hashmap on the host of VMs that holds the coroutine-job object for the currently running VM-instance. Key: Int(VM's identifier), value: [kotlin.coroutines.Job]
|
||||
*/
|
||||
fun initVMenv(vm: VM, profileJson: JsonValue, profileName: String, gpu: GraphicsAdapter, vmRunners: HashMap<VmId, VMRunner>, coroutineJobs: HashMap<VmId, Job>, whatToDoOnVmException: (Throwable) -> Unit) {
|
||||
vm.init()
|
||||
@@ -58,7 +55,7 @@ object VMSetupBroker {
|
||||
*
|
||||
* @param vm VM to initialise
|
||||
* @param vmRunners Hashmap on the host of VMs that holds the instances of the VMRunners for the given VM. Key: Int(VM's identifier), value: [net.torvald.tsvm.VMRunner]
|
||||
* @param coroutineJobs Hashmap on the host of VMs that holds the coroutine-job object for the currently running VM-instance. Key: Int(VM's identifier), value: [kotlinx.coroutines.Job]
|
||||
* @param coroutineJobs Hashmap on the host of VMs that holds the coroutine-job object for the currently running VM-instance. Key: Int(VM's identifier), value: [kotlin.coroutines.Job]
|
||||
*/
|
||||
fun killVMenv(vm: VM, vmRunners: HashMap<VmId, VMRunner>, coroutineJobs: HashMap<VmId, Job>) {
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration
|
||||
import com.badlogic.gdx.graphics.OrthographicCamera
|
||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.glutils.ShaderProgram
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlin.coroutines.GlobalScope
|
||||
import kotlin.coroutines.Job
|
||||
import kotlin.coroutines.launch
|
||||
import net.torvald.terrarum.DefaultGL32Shaders
|
||||
import net.torvald.tsvm.*
|
||||
import net.torvald.tsvm.peripheral.GraphicsAdapter
|
||||
|
||||
Reference in New Issue
Block a user