dotnow-interpreter icon indicating copy to clipboard operation
dotnow-interpreter copied to clipboard

StackData struct should not store a managed object reference

Open scottyboy805 opened this issue 3 years ago • 1 comments

The current StackData structure stores an 'object' field for references to heap objects needed by some instructions. In order to support unsafe code in the future, this should be removed and a replacement found. The stack data should simply store the object address as an integer which will allow the StackData type to be used in an unsafe context. This will require many changes to the code base and a suitable system for tracking managed objects by address will need to be implemented. The current ByRef implementation may also need to change or be redesigned to support this.

scottyboy805 avatar Aug 22 '21 10:08 scottyboy805

Created enhancements branch to work on this feature. 2aca9a9 runs tests and demos correctly but will continuously grow memory so needs further work.

scottyboy805 avatar Oct 28 '21 16:10 scottyboy805