Fixing the README to refer to the renamed project Whalesong

This commit is contained in:
Danny Yoo 2011-05-13 23:23:17 -04:00
parent 1f9b870b91
commit 178f247c34
2 changed files with 64 additions and 53 deletions

50
NOTES
View File

@ -63,25 +63,25 @@ Before introducing the multiple-value jumps
(172b1d9e5de823b53a6705fc87babfdd61152924), test-conform-browser (172b1d9e5de823b53a6705fc87babfdd61152924), test-conform-browser
reports the following times: reports the following times:
fermi ~/work/js-sicp-5-5 $ racket test-conform-browser.rkt fermi ~/work/whalesong $ racket test-conform-browser.rkt
running test... ok (5248 milliseconds) running test... ok (5248 milliseconds)
fermi ~/work/js-sicp-5-5 $ racket test-conform-browser.rkt fermi ~/work/whalesong $ racket test-conform-browser.rkt
running test... ok (5478 milliseconds) running test... ok (5478 milliseconds)
fermi ~/work/js-sicp-5-5 $ racket test-conform-browser.rkt fermi ~/work/whalesong $ racket test-conform-browser.rkt
running test... ok (5501 milliseconds) running test... ok (5501 milliseconds)
fermi ~/work/js-sicp-5-5 $ racket test-conform-browser.rkt fermi ~/work/whalesong $ racket test-conform-browser.rkt
running test... ok (5853 milliseconds) running test... ok (5853 milliseconds)
fermi ~/work/js-sicp-5-5 $ racket test-conform-browser.rkt fermi ~/work/whalesong $ racket test-conform-browser.rkt
running test... ok (5532 milliseconds) running test... ok (5532 milliseconds)
fermi ~/work/js-sicp-5-5 $ racket test-conform-browser.rkt fermi ~/work/whalesong $ racket test-conform-browser.rkt
running test... ok (5498 milliseconds) running test... ok (5498 milliseconds)
fermi ~/work/js-sicp-5-5 $ racket test-conform-browser.rkt fermi ~/work/whalesong $ racket test-conform-browser.rkt
running test... ok (5351 milliseconds) running test... ok (5351 milliseconds)
fermi ~/work/js-sicp-5-5 $ racket test-conform-browser.rkt fermi ~/work/whalesong $ racket test-conform-browser.rkt
running test... ok (5464 milliseconds) running test... ok (5464 milliseconds)
fermi ~/work/js-sicp-5-5 $ racket test-conform-browser.rkt fermi ~/work/whalesong $ racket test-conform-browser.rkt
running test... ok (5545 milliseconds) running test... ok (5545 milliseconds)
fermi ~/work/js-sicp-5-5 $ racket test-conform-browser.rkt fermi ~/work/whalesong $ racket test-conform-browser.rkt
running test... ok (5405 milliseconds) running test... ok (5405 milliseconds)
@ -91,23 +91,23 @@ reporting the following times:
running test... ok (5281 milliseconds) running test... ok (5281 milliseconds)
fermi ~/work/js-sicp-5-5 $ racket test-conform-browser.rkt fermi ~/work/whalesong $ racket test-conform-browser.rkt
running test... ok (5554 milliseconds) running test... ok (5554 milliseconds)
fermi ~/work/js-sicp-5-5 $ racket test-conform-browser.rkt fermi ~/work/whalesong $ racket test-conform-browser.rkt
running test... ok (5588 milliseconds) running test... ok (5588 milliseconds)
fermi ~/work/js-sicp-5-5 $ racket test-conform-browser.rkt fermi ~/work/whalesong $ racket test-conform-browser.rkt
running test... ok (5509 milliseconds) running test... ok (5509 milliseconds)
fermi ~/work/js-sicp-5-5 $ racket test-conform-browser.rkt fermi ~/work/whalesong $ racket test-conform-browser.rkt
running test... ok (5428 milliseconds) running test... ok (5428 milliseconds)
fermi ~/work/js-sicp-5-5 $ racket test-conform-browser.rkt fermi ~/work/whalesong $ racket test-conform-browser.rkt
running test... ok (5387 milliseconds) running test... ok (5387 milliseconds)
fermi ~/work/js-sicp-5-5 $ racket test-conform-browser.rkt fermi ~/work/whalesong $ racket test-conform-browser.rkt
running test... ok (5539 milliseconds) running test... ok (5539 milliseconds)
fermi ~/work/js-sicp-5-5 $ racket test-conform-browser.rkt fermi ~/work/whalesong $ racket test-conform-browser.rkt
running test... ok (5355 milliseconds) running test... ok (5355 milliseconds)
fermi ~/work/js-sicp-5-5 $ racket test-conform-browser.rkt fermi ~/work/whalesong $ racket test-conform-browser.rkt
running test... ok (5551 milliseconds) running test... ok (5551 milliseconds)
fermi ~/work/js-sicp-5-5 $ racket test-conform-browser.rkt fermi ~/work/whalesong $ racket test-conform-browser.rkt
running test... ok (5331 milliseconds) running test... ok (5331 milliseconds)
@ -468,7 +468,7 @@ the prompt splicing.
---------------------------------------------------------------------- ----------------------------------------------------------------------
May 13, May 13, 2011
begin0 is still broken; I'm a bit unsatisfied with the way that it's begin0 is still broken; I'm a bit unsatisfied with the way that it's
coded, and I know it's not correct yet. coded, and I know it's not correct yet.
@ -496,3 +496,13 @@ One should be able to say:
where all translated paths are either from collections, or reachable where all translated paths are either from collections, or reachable
from the root. That way, we get predictable paths. from the root. That way, we get predictable paths.
js-sicp-5-5 is an uninspired name for the project. I'm renaming it to
"Whalesong". Whale, because it's related to the Moby-Scheme project,
and song because, well, some songs can be called a "Racket". :)
----------------------------------------------------------------------

63
README
View File

@ -1,6 +1,7 @@
Compiler from Racket to JavaScript. Whalesong: a compiler from Racket to JavaScript.
======================================================================
Prerequisite: Racket 5.1.1. The majority of the project is written Prerequisite: Racket 5.1.1. The majority of the project is written
@ -9,21 +10,29 @@ that's at least 5.1.1; otherwise, compilation may take an unusual
amount of time. amount of time.
======================================================================
Example usage
[FIXME]
====================================================================== ======================================================================
Architecture: Architecture:
The basic idea is to reuse most of the Racket compiler infrastructure. The basic idea is to reuse most of the Racket compiler infrastructure.
The underlying Racket compiler will produce bytecode from Racket We use the underlying Racket compiler to produce bytecode from Racket
source, and perform macro expansion and module-level optimizations for source; it also performs macro expansion and module-level
us. We will parse that bytecode using the compiler/zo-parse optimizations for us. We parse that bytecode using the
collection to get an AST, compile that to an intermediate language, compiler/zo-parse collection to get an AST, compile that to an
and finally assemble JavaScript. intermediate language, and finally assemble JavaScript.
AST IL JS AST IL JS
bytecode.rkt ----------> compiler.rkt --------> assembler.rkt -------> parse-bytecode.rkt ----------> compiler.rkt --------> assembler.rkt ------->
(todo) (todo)
@ -36,44 +45,36 @@ controlled environment.
====================================================================== ======================================================================
bytecode.rkt parse-bytecode-5.1.1.rkt
dyoo is currently working on bytecode.rkt. Not done yet. This is
intended to reuse the Racket compiler to produce the AST structures
defined in compiler/zo-parse.
For the moment there's a hacky parser in parse.rkt that produces the
AST expression structures that are consumed by the rest of the system.
This is intended to reuse the Racket compiler to produce the AST
structures defined in compiler/zo-parse.
====================================================================== ======================================================================
compiler.rkt translates the AST to the intermediate language. The compiler.rkt translates the AST to the intermediate language. The
compiler is similar to that of the register compiler in Structure and compiler has its origins in the register compiler in Structure and
Interpretation of Computer Programs: Interpretation of Computer Programs:
http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-35.html#%_sec_5.5 http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-35.html#%_sec_5.5
but with some significant modifications. Since this is a stack with some significant modifications. Since this is a stack machine,
machine, we don't need any of the register-saving infrastructure in we don't need any of the register-saving infrastructure in the
the original compiler. We also need to support slightly different original compiler. We also need to support slightly different linkage
linkage structures, since we want to support multiple value contexts. structures, since we want to support multiple value contexts. We're
We're trying to generate code that works effectively on a machine like trying to generate code that works effectively on a machine like the
the one described in: one described in:
http://plt.eecs.northwestern.edu/racket-machine/ http://plt.eecs.northwestern.edu/racket-machine/
The intermediate language is defined in il-structs.rkt, and a The intermediate language is defined in il-structs.rkt, and a
simulator for the IL in simulator.rkt. See test-simulator.rkt to see simulator for the IL in simulator/simulator.rkt. See
the simulator in action, and test-compiler.rkt to see how the output test-simulator.rkt to see the simulator in action, and
of the compiler can be fed into the simulator. test-compiler.rkt to see how the output of the compiler can be fed
into the simulator.
@ -94,8 +95,8 @@ and two stack registers:
====================================================================== ======================================================================
The JavaScript assembler is playing a few tricks to make things like The JavaScript assembler (js-assembler/assemble.rkt) plays a few
tail calls work: tricks to make things like tail calls work:
* Each basic block is translated to a function taking a MACHINE * Each basic block is translated to a function taking a MACHINE