I just saw your commit, bravo! ;)
Some comments:
1) Perhaps some names could be more concise:
a.assembleToMachineCodeBlock
Is this function only meant to generate an executable byte stream from already encoded instructions? What's the difference between it and assemble? Its name should perhaps reflect its purpose more directly.
2) Some things could perhaps be made more OOP:
execMachineCodeBlock(block) ==> block.exec() freeMachineCodeBlock(block) ==> block.free()
3) In the spirit of keeping names short and simple, perhaps a.immediateValue could become a.imm, and a.label(a.codeBlock.label('string')) could simply be a.label('string').
4) I wish you had more JSDoc-style comments to document what your functions do
- Maxime
Erick Lavoie wrote:
A hand-coded version of Fibonacci is shown in "test-x86-fibonacci.js". To run a test of fib(40) and show the corresponding listing of the assembly code, run:
./fib.sh
in the codegen directory, assuming the extension made by Marc to d8 has been applied.
I've merged all my changes in the master branch and those are available on the repository. I'll test everything thoroughly for the rest of the day, I've found that it is pretty easy to introduce typo bugs in Javascript ;-).
Erick _______________________________________________ Tachyon-list mailing list Tachyon-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/tachyon-list