2010-06-01ãã1ã¶æéã®è¨äºä¸è¦§
ããã°ã©ãã³ã°è¨èªã®é«ç´åã¯ãã¦ãã¦ããã°ã©ã ãè¤éåãæé©åãé»å®³ãã¦ãã¾ãã¾ãã rowlã®éçºã§ã¯ãã®ãã¬ã¼ããªãã«ã¤ãã¦ç¥çµè³ªã«ãªããã¨æã£ã¦ãã¾ãã æé©åã®åºæ¬ æé©åã«ã¯å½ä»¤æ°åæ¸ã»ä¸¦ååã»ãã¤ãã©ã¤ã³æé©åã»ã¬ã¸ã¹ã¿å²ãå½ã¦ã»ã¹ã±â¦
æ§é ä½ã¨ãé åã¨ãã©ããªè¨èªã«ã大ä½ãããã®ã¯é¤ãã¾ããããã¾ã§ç§ã®ä¸»è¦³ã§ãã lex/yacc/gperfãªã©ã®ãã¼ã« ç¹ã«yaccããªãã¨è¤éãªè¨èªã®ãã¼ã¹ã¯å¤§å¤ã ããªã¢ã³ã æ§ææ¨ã®è¡¨ç¾ã«ä¸çªé©ãã¦ããã¨æãã ãã¿ã¼ã³ããã ã³ã³ãã¤ã©å é¨ã¯ãã¿ã¼ã³ãâ¦
é¢æ°åè¨èªã¨ããã¨åã·ã¹ãã ãªã©ããã³ãã¨ã³ãé¨ã«æ³¨ç®ãéã¾ããããã¨æãã¾ãããç§ã¯ããã¯ã¨ã³ãã®å®è£ ã«èå³ãããã¾ãã ããã§å°ããªç´ç²é¢æ°åè¨èªã®å¦çç³»ãä½ããã¨ã«ãã¾ãããååã¯å®ç´ã§ããpurefã«ãã¾ããæ¹é åå¼·ç¨ã®å®è£ 飾ãã¯ä»ãâ¦
æ§ææ¨ã¯æç§æ¸7ãã¼ã¸ã«æ¸ãã¦ããã¾ããé常ã«ã·ã³ãã«ã§ããHaskellã®ãããªè¤éãªè¨èªãæ§æç³è¡£ãåãé¤ãã¨,åæ§ã®è¨èªã¾ã§åç´åããã¾ãããããªãã«ãªã¨æã人ã¯,GHCã®ã½ã¼ã¹ã®ghc/compiler/coreSyn/CoreSyn.lhsãèªãã§ã¿ã¦ä¸ããã ã¬ããµ/ãã¼ãµâ¦
Cè¨èªã®ã½ã¼ã¹ãcppã«ãããã¨çæããããã£ã¬ã¯ãã£ãã®æå³ã # 1 "/usr/include/math.h" 1 3 4 æåã®æ°åã¯ãã¡ã¤ã«ã®è¡çªå·ã§ãæ«å°¾ã®æ°å㯠1 : includeãéå§ãã¦æ°ããªãã¡ã¤ã«ã«ç§»ã (ENTERãã©ã°) 2 : includeãçµäºãã¦å ã®ãã¡ã¤ã«ã«æ»ã (LEAVâ¦
ä»æ¥ãµã¨é«æ ¡æ代ã«é»åéã³ã«ããã£ã¦ããäºãæãåºããã®ã§ãã¡ã¢ãã¦ããã¾ããâã®ãªãè¨ç®æ©ã§Nã®å¹³æ¹æ ¹ãæ±ãããå ´å㯠[N(æ°å)][M+]ã¨æ¼ããã㨠[MR][x][MR][-][N][/][2][/][MR][M-]ãç¹°ãè¿ãã¾ãã Nã®mä¹æ ¹ã®å ´å㯠[N][M+]ã¨æ¼ããã㨠[MR][xâ¦
ãããããã¼ãã¹ãã©ããã³ã°ã®æ¬¡ã®ã¹ãããã§ããrowl1è¨èªéçºã«çæãã¾ãããrowl1è¨èªã³ã³ãã¤ã©ã¯rowlVMä¸ã§åä½ããããã°ã©ã ã¨ãã¦ä½æãã¾ãã rowl1ã³ã³ãã¤ã©è¨è¿°è¨èªã®ã¢ã»ã³ããªè¨èªã®ã¢ã»ã³ãã© http://github.com/nineties ä¸ã®rowl-assembâ¦
ã¢ã»ã³ããª(gas)ã§rowl0è¨èªã®ã³ã³ãã¤ã©ãä½æãã rowl0è¨èªã§rowl1è¨èªã®ã³ã³ãã¤ã©(åã·ã¹ãã å«ã)ãå®è£ ãããããã°å¤çºã§ãã£ããç½ç´ã«æ»ãã rowl0è¨èªã§LISP風rowl-coreè¨èªã®ã¤ã³ã¿ããªã¿ãä½æãã rowl-coreè¨èªã§vmè¨è¿°è¨èªãå®ç¾©ãvmè¨è¿°è¨â¦
å®è¡å¯è½ãã¡ã¤ã«(æ¡å¼µå.rlx)ããã®ãã¼ãã»å®è¡ãå®è£ ãã¾ãããhttp://github.com/nineties/rowl/commit/c454fd019919dee0526ecc96b256091ca1da9771å®è¡å¯è½ãã¡ã¤ã«ã®ãã©ã¼ãããã¯å é ãã 1ã¯ã¼ã : ãã¡ã¤ã«ã®ç·ãã¤ãæ°(=N) 1ã¯ã¼ã : ã°ãã¼ãã«åâ¦
ä»ææ¸ããã®ã¯ç¶ºéºã§ã¯ãªãã£ãã®ã§èããªããã¾ããå¤åè»è¼ªã®åçºæã ã¨æãã¾ããã ãã¤ã³ãã¯ãã¼ã¸âãã¼ã¸ãã¹ã¯ãªãã¿éã®ã¢ãã¬ã¹å¤æã®ã·ã³ãã«åã§ãã ãã¼ã¸ãã¹ã¯ãªãã¿ã»ãã¼ã¸ã®é ç½®ã以ä¸ã®ããã«ãã¾ãã |<---------------------- 1 Mbytâ¦
ãã®è«æ Compacting Garbage Collection with Ambiguous Roots ã§ã¯ãããããåºå®é·ã®ã¡ã¢ãªãããã¯ããã£ã¦åå®æ°ã®ãã¼ã¸ããããããªå®è£ ã«ãªã£ã¦ããã®ã§ç´ãã¾ãã GHCã®ã¢ãã±ã¼ã¿å®è£ ãåèã«ãã¦ãã¾ããã¾ããã¡ã¢ãªã¯ãããã¯åä½(1Mbyte)ã§ã¢â¦
ç¾å¨rowlVMã«GCãå®è£ ä¸ã§ããåã®ãªãè¨èªã§æ¸ãã¦ããã®ããã£ã¦ãã³ã¼ãã¯æ±ããªã£ã¦ãã¾ããããã®ã¾ã¾ããã¾ãã å®è£ ããGCã¯é度ãæ°ã«ãªãã¾ãããã¨ããããã¯Mostly Copying GCã§è¡ããã¨æãã¾ããä¸ãåèã«ãã¦ãèªåãªãã«ä¿®æ£ããã¦å®è£ ãã¾â¦
ç¾å¨ã®ãã·ã³ã¬ã¸ã¹ã¿ã®å²ãå½ã¦ç¶æ³ã®ã¡ã¢ã %eax æ±ç¨ã¬ã¸ã¹ã¿ %ebx æ±ç¨ã¬ã¸ã¹ã¿ %ecx ããã°ã©ã ã«ã¦ã³ã¿ %edx ã¼ãã¬ã¸ã¹ã¿(常ã«0ãå ¥ã£ã¦ãã) %esi ã¹ã¿ãã¯ãã¤ã³ã¿ %edi ãã¼ã¹ãã¤ã³ã¿ %ebxã¨%esiï¼%ediã®å¤ã¯ä¿åããªããã°ãªããªãçºé¢æ°ã®å é â¦
ã³ã³ãã¤ã©ã»ã¤ã³ã¿ããªã¿ä½æã«ç¹åããåã»å½ä»¤(consã»ã«ããããé å)ãç¨æãã¦åæ§ãåºãæ¹éã1ãã¤ãã§è¶³ããã ããããçµã¿è¾¼ã¿å ãã¼ã«å æ´æ° (8bitã»16bitã»32bitã»64bit) æµ®åå°æ°ç¹æ° (å精度ã»å精度) 以ä¸éããã¯ã¹åå ã·ã³ãã« consã»ã« â¦
rowlVMä¸ã§é¢æ°å®ç¾©ãåºæ¥ãããã«ãªãã¾ããã 以ä¸ã¯fibonacciã®å®ç¾©ããã¤ãã³ã¼ãé·ã¯22ãã¤ãã§ããä»ã¯ææ¸ãã ãã©ãå¾ã§ã³ã³ãã¤ã©ä½ãã¾ãã (byte[] 100 fib @(assemble `( arg0 imm_i3 isub (if_lt hoge) arg0 imm_i1 isub (vcall 0 4) ; 0çª(fibâ¦
ç¾å¨VM/GCã®å®è£ ä¸ã§ãã ããã¾ã§ã®éçºçµéã§ãã 1. rowl-coreã¤ã³ã¿ããªã¿ãéçº LISPã®æ§ãªSå¼ã§æ¸ãããrowl-coreè¨èªãå¦çããç°¡æã¤ã³ã¿ããªã¿ã以åä½ã£ãrowl0ã§å®è£ ãã¾ããã è¨èªæ©è½ãä½ããã¡ã¯ã¤ã³ã¿ããªã¿ã®æ¹ãç°¡åã«ä½ããã®ã§ãéçºãâ¦