Same PR as #50, but rebased off runtime-refactor to make final merging easier. I made some small changes while I rebased the branch, but the general gist is the same.
In that PR @j-hui noted that instead of a new initialization function, it would be better if the program entry-point contains the initialization code of the global references. I agree that this is perhaps a nicer way of doing it, but perhaps that change should be done in a PR of its own (mainly since the RTS has changed a lot since I last worked on it, and it would take a little time for me to really look at it before I dare make such a change to the generated code).
Since #50 was approved by @j-hui and this one contains only minor cosmetic changes, I'll go ahead and merge it. Let me know if anything looks odd though, John.
Same PR as #50, but rebased off runtime-refactor to make final merging easier. I made some small changes while I rebased the branch, but the general gist is the same.
In that PR @j-hui noted that instead of a new initialization function, it would be better if the program entry-point contains the initialization code of the global references. I agree that this is perhaps a nicer way of doing it, but perhaps that change should be done in a PR of its own (mainly since the RTS has changed a lot since I last worked on it, and it would take a little time for me to really look at it before I dare make such a change to the generated code).