The key to the project is the IL to JavaScript decompiler. This went through two rewrites because of the branching code. After the first pass, it handled only simple conditionals (ifs) and loops (whiles). The second pass added the ability to handle multiple conditions (a && b), which are implemented as shortcuts in assembly-like language. So if the first part of the && fails, it doesn't evaluate the rest. The third pass deftly handles nested conditionals and loops, which look a lot like the shortcuts and is currently being used. Reflector and the add-in Reflexil helped, but there was a lot of copying from the Visual Studio into notepad and detecting patterns.

I'd be glad to explain it to anyone willing to learn how it works in more detail.

Last edited Aug 6, 2008 at 12:28 AM by thasmin, version 1


No comments yet.