From: Alex M. <ale...@us...> - 2007-01-22 21:51:43
|
Update of /cvsroot/win32forth/win32forth-stc/src/kernel In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30472 Modified Files: gkernel.f gmeta-compiler.f Log Message: arm: 2nd pass: more support for type system Index: gmeta-compiler.f =================================================================== RCS file: /cvsroot/win32forth/win32forth-stc/src/kernel/gmeta-compiler.f,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** gmeta-compiler.f 15 Dec 2006 12:21:48 -0000 1.11 --- gmeta-compiler.f 22 Jan 2007 21:51:40 -0000 1.12 *************** *** 545,548 **** --- 545,556 ---- ; + : t-tfa! ( type -- ) \ set the type + last-h @ n>tfa tsys-c! ; + + : in/out ( n m -- ) + 2dup + ste-o ! ste-i ! + last-h @ n>ste dup>r 1+ tsys-c! r> tsys-c! ; + \ resolution of cts \ points to execute and compile, *************** *** 666,669 **** --- 674,678 ---- init-assembler tcode-here to ofa-h \ save code address in ofa + tcol t-tfa! ; *************** *** 681,686 **** tcode-, ; \ the value ! : t-dogen ( xt <-name-> -- ) \ generate do code ! >r code r> t-align t-here t-ecxaddr make-tjmp, \ name -> mov ecx, # here | jmp xt macro[ c; ]macro --- 690,696 ---- tcode-, ; \ the value ! : t-dogen ( xt type-of-name <-name-> -- ) \ generate do code ! 2>r code 2r> ! t-tfa! \ type t-align t-here t-ecxaddr make-tjmp, \ name -> mov ecx, # here | jmp xt macro[ c; ]macro *************** *** 726,729 **** --- 736,741 ---- ]macro r>drop in-application + 0 0 in/out + tvoc t-tfa! ; *************** *** 1005,1015 **** : variable ( -<name>- ) \ create a variable (changable) t-align t-here meta-constant ! s" 't-ptr dovar" evaluate t-dogen 0 t-, ; : create ( -<name>- ) \ create a ptr to here t-align t-here meta-constant ! s" 't-ptr dovar" evaluate t-dogen ; --- 1017,1029 ---- : variable ( -<name>- ) \ create a variable (changable) t-align t-here meta-constant ! s" 't-ptr dovar" evaluate tvar t-dogen 0 t-, + 0 1 in/out ; : create ( -<name>- ) \ create a ptr to here t-align t-here meta-constant ! s" 't-ptr dovar" evaluate tvar t-dogen ! 0 1 in/out ; *************** *** 1017,1027 **** dup meta-constant >r code r@ t-literal macro[ next c; ]macro r>drop ; : value ( n -<name>- ) \ create a self fetching changeable value ! s" 't-ptr doval" evaluate t-dogen t-, ; --- 1031,1044 ---- dup meta-constant >r code + tcon t-tfa! r@ t-literal macro[ next c; ]macro r>drop + 0 1 in/out ; : value ( n -<name>- ) \ create a self fetching changeable value ! s" 't-ptr doval" evaluate tval t-dogen t-, + 0 1 in/out ; *************** *** 1057,1060 **** --- 1074,1079 ---- next c; \ this can be called in interpreter ]macro r> drop + tusr t-tfa! + 0 1 in/out ; *************** *** 1069,1072 **** --- 1088,1092 ---- c; ]macro r> drop ofa-meta + tdef t-tfa! ; *************** *** 1096,1099 **** --- 1116,1121 ---- next c; \ this can be called in interpreter ]macro r> drop + toff t-tfa! + 0 1 in/out ; *************** *** 1110,1118 **** ; - : in/out ( n m -- ) - 2dup - ste-o ! ste-i ! - last-h @ n>ste dup>r 1+ tsys-c! r> tsys-c! ; - \ ====================================================================== \ Meta compiler Branching & Looping --- 1132,1135 ---- Index: gkernel.f =================================================================== RCS file: /cvsroot/win32forth/win32forth-stc/src/kernel/gkernel.f,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** gkernel.f 15 Dec 2006 12:21:48 -0000 1.28 --- gkernel.f 22 Jan 2007 21:51:40 -0000 1.29 *************** *** 2480,2486 **** 7 constant tcol 8 constant tvoc ! 9 constant tflt ! 10 constant tstr ! 11 constant tobj : mov-tos,#n ( n -- ) \ generate a mov eax, # n --- 2480,2487 ---- 7 constant tcol 8 constant tvoc ! 9 constant toff ! 10 constant tflt ! 11 constant tstr ! 12 constant tobj : mov-tos,#n ( n -- ) \ generate a mov eax, # n *************** *** 2533,2538 **** create 0 , ['] (comp-cons) compiles-last ! 0 0 in/out ! ; 0 1 in/out : (comp-val) ( n -- ) --- 2534,2539 ---- create 0 , ['] (comp-cons) compiles-last ! 0 1 in/out ! ; 0 0 in/out : (comp-val) ( n -- ) *************** *** 3647,3651 **** : user ( n -<name>- ) \ create a user variable ['] dousr tusr dogen , ! ; : newuser ( n -<name>- ) \ creates a user. a user can be --- 3648,3653 ---- : user ( n -<name>- ) \ create a user variable ['] dousr tusr dogen , ! 0 1 in/out ! ; 1 0 in/out : newuser ( n -<name>- ) \ creates a user. a user can be *************** *** 4905,4909 **** : lexicon ( -- ) \ like a vocabulary, but in app space ! lexthreads #lexicon ; : #vocabulary ( #threads -<name>- ) --- 4907,4913 ---- : lexicon ( -- ) \ like a vocabulary, but in app space ! lexthreads #lexicon ! 0 0 in/out ! ; 0 0 in/out : #vocabulary ( #threads -<name>- ) *************** *** 4913,4917 **** : vocabulary ( -- ) ! vthreads #vocabulary ; : case-asis ( -- ) \ case insenstive vocabulary --- 4917,4923 ---- : vocabulary ( -- ) ! vthreads #vocabulary ! 0 0 in/out ! ; 0 0 in/out : case-asis ( -- ) \ case insenstive vocabulary |