[Vm-dev] VMMaker-oscog issues on RISC OS

tim Rowledge tim at rowledge.org
Tue Apr 9 22:25:52 UTC 2013

I'm making a start at building the RISC OS StackVM and running into some fun problems.

First one was the code in VMMaker class>generateConfiguration that builds directory names by means of evil URI related methods. Strange and ugly results occur for RISC OS and tracing the code reveals many strange and ugly things happening for every platform - it's just that on an OS where something like / is  acceptable as a root directory it sort of ends up ok. RISC OS does not do that and I'm a little surprised that it doesn't cause problems on Windows too. My perfectly nice SDFS:RISCOSPi.$ root gets mangled to something like /SDFS%3ARISCOSPi%2F%2a/ or whatever. A simple fix for that is to change to "(FileDirectory default directoryNamed:'foo/bar') fullName"

My next problem is that RISC OS must do the minor manglings seen in methods such as RiscOSVMMaker>export:forExternalPlugin: in order to get all its ducks in a row. Right now we have an explicit creation of a CrossPlatformVMMaker  in the #createCodeGenerator method; I'll see if over-riding #forPlatform: will work. There simply isn't any way I can squeeze things within the constraints of the Cross way of making files for everything; RISC OS is just too different.

In CCodeGenerator>generateInlineCppIfElse:asArgument:on:indent: we have" aStream ensureCr" which appears to upset a NullStream. Adding #ensureCr to the list in VMPluginCodeGenerator>emitCCodeOn:doInlining:doAssertions: gets us past that but I'm surprised it hasn't bitten people before.

More news as it happens from the frontline of this spectacular battlefield engagement...

tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: AII: Add Insult to Injury

More information about the Vm-dev mailing list