Closed dmcclean closed 13 years ago
I had to read up on the unaligned
prefix, as I've never used it.
Your proposed addition looks good, I'd definitely merge a commit for that.
I've never really like that the tail call syntax allowed for nonsensical opcodes, but I guess that's part of the design of CIL itself.
I did add two opcodes for tail calls: Tail
(to properly reflect the fact that its a separate opcode in CIL), and Tailcall
(for nicer ASTs in Haskell).
Issue is being resolved in a pull request.
Hi Tom, Would you take a commit that added syntax for the unaligned opcode prefix (see Partition III, Section 2.5)?
It would be adding something like:
and the resulting changes to parsing, pretty-printing, ...
The prefix is only legal before ldind, stind, ldfld, stfld, ldobj, stobj, initblk, cpblk instructions, but there is a similar issue with the tail prefix which is handled in this same way (allow construction of nonsense in Syntax.hs, use error to report construction of nonsense through Build.hs).