Tamarin ããã¸ã§ã¯ãã«ã¤ãã¦äººã«èª¬æãããã¨ãã¦ãã£ã±ãããåãã£ã¦ãªãã£ãäºã«æ°ãä»ããã®ã§ã調ã¹ã¦ã¿ããç¥ãããã£ãäºã¯ãçµå± Flash ããªã¼ãã³ã½ã¼ã¹ã«ãªããã¨ããäºã ã£ãããªããªãã¨ããã®ãçµè«ãããããjavascript ã«ãã javascript ã³ã³ãã¤ã©ãå«ã¾ãã¦ãã¦ãããªãé¢ç½ãããã¸ã§ã¯ãã§ããäºãåãã£ãã
Tamarin ã¨ã¯ä½ãï¼
話ã¯æ¨å¹´ã«é¡ããAdobe 㯠Flash ã®ã¹ã¯ãªããã¨ã³ã¸ã³ Tamarin ããªã¼ãã³ã½ã¼ã¹åããMozilla ã«æä¾ããã¨çºè¡¨ããããããåãã¦ãå°æ¥ã®ãã¼ã¸ã§ã³ã® Firefox ã«ã¯ãAdobe 製㮠Javascript ã¨ã³ã¸ã³ãæè¼ãããã¨è¨ãããã®çºè¡¨ã®åããã«ããæã¯ãä¸ä½ä½ããªã¼ãã³ã½ã¼ã¹åãããã®ãã¨ããæãFlash ãã¬ã¤ã¤ãªã®ãï¼éçºç°å¢ãªã®ãï¼ã¹ã¯ãªããã¨ã³ã¸ã³ã£ã¦ä¸ä½ä½ãªã®ï¼
ã¾ãããããå ¬éããã¦ãã®ã¯ç¾å¨ã® Flash9 ç¨ã®ã¨ã³ã¸ã³ AVM1 ã§ã¯ç¡ããéçºä¸ã® AVM2ã
ä¸èº«ã¯ AVM2 ã¨å¼ã°ãããã¼ãã£ã«ãã·ã³ã§ãéçºç°å¢ã¯ä»å±ããªããã¨ããäºã¯ããã®ã¾ã¾ãã Javascript ã®å®è¡ã¯åºæ¥ãªãã¨ããäºï¼ActionScript èªèº«ã§æ¸ãããã³ã³ãã¤ã©ãéçºä¸ã¨ããã
- http://developer.mozilla.org/ja/docs/Tamarin_Build_Documentation
- http://safari.oreilly.com/0596526946/compilation
Tamarin ã®ä¸å¿ã¯ãavmplus ã¨ããã³ãã³ããabc ã¨å¼ã°ãããã¤ãã³ã¼ããã¡ã¤ã«ãå®è¡ããç©ããããFlash ã¯ãswf ãã¡ã¤ã«ã«åãè¾¼ã¾ãã abc ãã¡ã¤ã«ãå®è¡ãã¦ããããããããã®é¨åã ãæ½åºããç©ã
Tamarin ããã«ãããã
èªãã ãããåãããªãã®ã§ãå®éã« Windows + VS2003 ã§ãã«ããã¦ã¿ãã
Tamarin ã®ã½ã¼ã¹ã¯ mercurial ã¨ãããã¼ã«ã§ç®¡çããã¦ããã®ã§ãã¾ããã¡ããç¨æãã¾ã(http://www.selenic.com/mercurial/wiki/index.cgi)ãç§ã¯ cygwin ã§ã½ã¼ã¹ãã make all ã㦠make install ãã¾ããããã®å¾å¥å¦ãªäºã«
$ export PYTHONPATH=/usr/local/lib/python2.5/site-packages:${PYTHONPATH}
ãå¿ è¦ã§ãããå¾ã¯æ¸ãã¦ããéãã«ã
$ hg clone http://hg.mozilla.org/mozilla-central mozilla-central $ mkdir ../modules $ cp -r mozilla-central/modules/zlib ../modules/zlib $ hg clone http://hg.mozilla.org/tamarin-central
avmplus ã使ã
ãã¨ã¯ã ã¢ããªã±ã¼ã·ã§ã³ã®ã³ã³ãã¤ã«ã¨å®è¡ ã®ã¨ããã«ããã°è¯ãã§ããããTamarin ã«å«ã¾ããã«ã¯ VM ã ããªã®ã§ãããã°ã©ã ãéçºããã«ã¯å¥é FlexSDK ã java ãå¿ è¦ã§ãã
javascript ã§æ¸ããã javascript ã³ã³ãã¤ã© esc ã試ãã
ãã¼ Flex ãè¦ãã®ï¼ï¼ï¼ãããªã¼ãã³ããç¡ãï¼ã¨è¨ãæ½ççã®çããã«æå ±ãjavascript ã§æ¸ããã javascript ã³ã³ãã¤ã© esc ãéçºä¸ã§ããã¾ããã¡ãã£ã¨éã¶ç¨åº¦ã«ã¯å åã§ããããã¯è¶ 楽ãã¿ãavmplus_d.exe ã tamarin-central/esc/build ã«ã³ãã¼ãã¦ãã以ä¸ã®ããã«ãã¾ãã
$ cd tamarin-central/esc/build/ $ ./avmplus_d.exe ../bin/debug.es.abc ../bin/ast.es.abc ../bin/ast-decode.es.abc ../bin/ast-encode.es.abc ../bin/util.es.abc ../bin/lex-char.es.abc ../bin/lex-token.es.abc ../bin/lex-scan.es.abc ../bin/parse.es.abc ../bin/util-tamarin.es.abc ../bin/bytes-tamarin.es.abc ../bin/util-tamarin.es.abc ../bin/asm.es.abc ../bin/abc.es.abc ../bin/emit.es.abc ../bin/cogen.es.abc ../bin/cogen-stmt.es.abc ../bin/cogen-expr.es.abc ../bin/main.es.abc es> print (3 + 4) 7