Skip to content
igraves edited this page Apr 8, 2012 · 3 revisions

Assembler

Left-factor the assembler grammar

The assembler grammar was hastily written and needs to be left factored so Parsec can work more quickly. Left-factoring will eliminate the necessity for look-aheads (i.e. all the "try"'s) currently in the parser

Add short label jumps to increase code efficiency

Speaks for itself. Notch mentioned this in the spec for 0x10c and noted that he hadn't added this at the time of writing spec v1.1. This isn't overly complicated, but requires some bookkeeping.

Interpreters

###IR Interpreter Writing an Interpreter, or the basis for an interpreter of the IR is handy for a few reasons. First, an interpreter will let us check to see how our code runs. Secondly, an interpreter for our code that is faithful to the spec will let us model how the code runs in 0x10c in a more formal fashion. A symbolic interpreter, for example, can form the basis of a superoptimizer for 0x10c code. A superoptimizer and supercompiler may be viable for 0x10c because the instruction set, though this remains to be seen.

Disassembler

Is already implemented from the typeclass instance of Data.Binary. Functions get and put in Binary are isomorphic in early tests. Bugs will have to be noted and ironed out, however.

Higher-Level Language Functions and Runtime

Require more thought and more information from Notch when we learn more about the 0x10c computer!