JavaScript:ActionMonkey: Difference between revisions
(preliminary Windows/Linux build instructions (untested)) |
mNo edit summary |
||
Line 43: | Line 43: | ||
echo -e '[ui]\nmerge = ~/.hgmerge' > ~/.hgrc | echo -e '[ui]\nmerge = ~/.hgmerge' > ~/.hgrc | ||
chmod +x ~/. | chmod +x ~/.hgmerge | ||
* Install Mercurial from http://www.selenic.com/mercurial/wiki/index.cgi/BinaryPackages (use the first Windows site), and make sure the "change environment" checkbox in the installer's final page is checked. | * Install Mercurial from http://www.selenic.com/mercurial/wiki/index.cgi/BinaryPackages (use the first Windows site), and make sure the "change environment" checkbox in the installer's final page is checked. | ||
Line 60: | Line 60: | ||
echo -e '[ui]\nmerge = ~/.hgmerge' > ~/.hgrc | echo -e '[ui]\nmerge = ~/.hgmerge' > ~/.hgrc | ||
chmod +x ~/. | chmod +x ~/.hgmerge | ||
* <tt>hg clone http://hg.mozilla.org/actionmonkey</tt> | * <tt>hg clone http://hg.mozilla.org/actionmonkey</tt> |
Revision as of 18:27, 26 July 2007
ActionMonkey is the code-name for the project to integrate Tamarin and SpiderMonkey as part of Mozilla 2.
Want to help? Write to jason dot orendorff at gmail dot com. Or visit irc://irc.mozilla.org/jslang and say hi.
Goals
The goals are:
- Preservation (with necessary additions and as few deletions as possible) of jsapi.h.
- SpiderMonkey's thread safety and property tree integrated/reimplemented in Tamarin.
- Replacement of SpiderMonkey's decompiler with a better decompiler that can work with ABC.
- Replacement of SpiderMonkey's GC with Tamarin:MMgc, evolved as needed.
- Replacement of SpiderMonkey's interpreter by an evolved version of Tamarin's.
- Advanced JIT optimization for hot paths and untyped code, inspired by Trace Trees.
- Information flow VM support for better security models.
Building ActionMonkey
All ActionMonkey work is happening in the http://hg.mozilla.org/actionmonkey and http://hg.mozilla.org/actionmonkey-tamarin Mercurial repositories.
(These repositories are a hard hat area, one step removed from the primary mozilla-central repository. This is because we expect things will break intermittently. Also because some of the people working on this aren't CVS committers yet, myself included. -jorendorff)
How to build
Things work slightly differently in Mercurial-land. The following might make more sense if you're already familiar with building Mozilla in the old-school CVS world. But even if you're not, you can give it a try:
Mac
- Install Python 2.4 or later. (sudo port install python24)
- Install Mercurial perquisites (ASCIIDOC and a three way merge program) http://www.selenic.com/mercurial/
- Install Mercurial. (On Mac with MacPorts, sudo port install mercurial)
- Install GNU make 3.81 or later. (sudo port install gmake, but watch out: an older version is probably still in your PATH.)
- hg clone http://hg.mozilla.org/actionmonkey
- cd actionmonkey
- python client.py checkout (The actionmonkey repository doesn't contain all the source files you need. This Python script grabs all the other source files (from other repositories, both CVS and hg) and puts them into your tree in the right places.)
- Then build as you normally would. (Hint: For a quick debug build of js, try cd js/src; make -f Makefile.ref.)
Windows
- Install MozillaBuild, from the Mozilla build instructions
- Use xemacs to add the contents of the script at [1] to ~/.hgmerge using the command
xemacs ~/.hgmerge
. - Run the following command in MozillaBuild to hook up merge functionality:
echo -e '[ui]\nmerge = ~/.hgmerge' > ~/.hgrc chmod +x ~/.hgmerge
- Install Mercurial from http://www.selenic.com/mercurial/wiki/index.cgi/BinaryPackages (use the first Windows site), and make sure the "change environment" checkbox in the installer's final page is checked.
- Log out of and back into Windows to pick up Mercurial's environment changes.
- hg clone http://hg.mozilla.org/actionmonkey
- cd actionmonkey
- python client.py checkout (The actionmonkey repository doesn't contain all the source files you need. This Python script grabs all the other source files (from other repositories, both CVS and hg) and puts them into your tree in the right places.)
- Then build as you normally would. (Hint: For a quick debug build of js, try cd js/src; make -f Makefile.ref.)
Linux
- Make sure you have Python 2.4, Mercurial, and GNU make installed, via whatever system your distribution uses (as well as gcc and g++).
- Use xemacs to add the contents of the script at [2] to ~/.hgmerge using the command
xemacs ~/.hgmerge
. - Run the following command in MozillaBuild to hook up merge functionality:
echo -e '[ui]\nmerge = ~/.hgmerge' > ~/.hgrc chmod +x ~/.hgmerge
- hg clone http://hg.mozilla.org/actionmonkey
- cd actionmonkey
- python client.py checkout (The actionmonkey repository doesn't contain all the source files you need. This Python script grabs all the other source files (from other repositories, both CVS and hg) and puts them into your tree in the right places.)
- Then build as you normally would. (Hint: For a quick debug build of js, try cd js/src; make -f Makefile.ref.)
You should be able to build a working JS shell, Firefox, or other app this way. If it doesn't work for you, please file a bug with "ActionMonkey" in the summary and assign it to jorendorff.
Common errors
- Users/kaitlin/dev/actionmonkey/js/tamarin/manifest.mk:48: *** missing `endif'. Stop. - You're using an older version of GNU make. Install GNU make 3.81 or later, and make sure you don't still have an old version in your PATH.
- no module named subprocess - You're using an older version of Python to run client.py.
Stage 0
Replace SpiderMonkey's GC with Tamarin's GC (MMgc). See JavaScript:ActionMonkey:Stage 0 Whiteboard.
Stage 1
Integrate SpiderMonkey more closely with MMgc.
- Make
MMgc::Mark()
call SpiderMonkeytrace()
methods. The plan is to add a per-page type tag to MMgc; this takes over the job of the type bits in SpiderMonkey'sGCThingFlags
.
- Get rid of js_GetGCThingFlags.
- The type bits: move to an MMgc page-level type tag. (Note: The cycle collector sneakily uses these, in nsXPConnect.cpp; it will be changed.)
- The
GCF_LOCK
bit: mainly replaced by allowing MMgc to scanrt->gcLocksHash
. There is also a string optimization that uses this bit. It's yet to be determined what to do about that. - The
GCF_MUTABLE
bit: move intoJSString
. - The
GCF_SYSTEM
bit: To be determined.
- Drop weak roots, newborns, and local root scopes (if they're not already gone in stage 0). These will be replaced by MMgc's conservative stack scanning.