Unsafe data conversion in the VM

2021-08-09 Thread haxscramper
I just wanted to make sure there is a built-in solution that would not require hacks in the VM implementation. I suppose I have to go with that as there are not much other options.

Unsafe data conversion in the VM

2021-08-09 Thread yglukhov
Could [variant](https://github.com/yglukhov/variant) help?

Unsafe data conversion in the VM

2021-08-09 Thread Araq
Not sure, why not patch the VM for this test?

Unsafe data conversion in the VM

2021-08-08 Thread haxscramper
Is there any way to do unsafe conversion of one ref object type to another in VM? I can't do `cast[B](a)` in a macros (not for arbitrary types `'cast' from tyRef to tyRef`). I tried doing it in several steps, like `a -> int -> b`, but this does not work either, (`'cast' from tyInt to tyRef`). A