Re: [Oopic-compiler-devel] OOpic firmware versions and code generation impact
Status: Planning
Brought to you by:
ndurant
From: D. D. M. <dd...@mc...> - 2004-06-05 13:59:45
|
Neil, > > 3. How would the project accomodate different versions of the firmware? Is > > it a matter of a different code generator for each firmware, or does one > > generator handle the differences conditionally? > > I think we should be able to use the same code generator. I would suggest > that we pass in a parameter to the compiler to specify the firmware > version, and the parser will throw an error if the input code includes > stuff not allowed for that firmware version. Once the parser has > successfully parsed the input code and generated an internal > representation, the code generator should just be able to do its stuff, > regardless of the firmware version (I think). It sounds to me as though > the code generator should generate exactly the same code irrespective of > firmware version setting, as long as the input code is legal on the > respective firmware versions. > > If I'm right about this, all we need to do is put some conditional logic in > the parser to disallow certain things, which I imagine would simply be the > instantiation of VC objects that aren't supported on a given version. I think you are partly right. The parser will need to filter by firmware so as to not allow unsupported objects. However, since the firmware commands (the op-codes) also vary by version, won't the generator also need to be firmware aware? Daniel |