[WAM: misc. Adrian Prantl **20090126145741] { hunk ./compiler.fs 109 - s\" >\"" push-xt; + s\" >\n\"" push-xt; + s" wam-allocate" push-xt; hunk ./compiler.fs 392 +: query? ( -- b ) s" (toplevel)/0" last-clause last-clause-u @ compare not ; hunk ./compiler.fs 399 - head? if s" get_structure" else s" put_structure" endif push-xt ; + head? if s" get_structure" else s" put_structure" endif push-xt ; hunk ./compiler.fs 405 - endif + else query? if + newX addr u bind-new-var + lastX yreg i areg getput-variable push-cr + addr u lastX register-query-var + endif endif hunk ./compiler.fs 488 + s" wam-deallocate" push-xt; hunk ./compiler.fs 564 + + clear-query-vars + hunk ./compiler.fs 582 - s" ; " push-xt; + s" ;" push-xt; hunk ./compiler.fs 638 + s" wam-deallocate" push-xt; hunk ./compiler.fs 658 - s" (toplevel)/0" last-clause last-clause-u @ compare if + query? if hunk ./compiler.fs 695 + ( Debug print ) + compile-buf-start compile-buf @ over - type + hunk ./compiler.fs 709 -s" :- f([X])" test-compile \ -\ wam-allocate -\ A1 put_list -\ Y3 unify_variable -\ unify-nil -\ f/1 execute <- letztes Ziel -\ wam-deallocate +s" :- f([X])" test-compile \ s" f" 1 put_structure +s" :- do(parse(s(np,vp),[birds,fly,[]))" test-compile hunk ./compiler.fs 717 +s" :- concatenate([],X,X)." test-compile run-clause + +s" :- concatenate([a,b],[c],X)." test-compile run-clause +s" :- concatenate(A,B,[a,b])." test-compile run-clause + +s" :- compare_terms(Y,a,b)." test-compile run-clause + + + +s" a" put_atom hunk ./compiler.fs 728 -\ s" qsort([],R,R)." test-compile -\ s" qsort([X|L],R0,R) :- split(L,X,L1,L2), qsort(L1,R0,[X|R1]), qsort(L2,R1,R)." test-compile +s" qsort([],R,R)." test-compile +s" qsort([X|L],R0,R) :- split(L,X,L1,L2), qsort(L1,R0,[X|R1]), qsort(L2,R1,R)." test-compile hunk ./wam.fs 122 - \ dup tag ." tag: " . cr + \ dup ." ptr: " . cr + \ dup tag ." tag: " . cr hunk ./wam.fs 368 - 2drop exit + drop exit hunk ./wam.fs 710 + \ ." *** register " -rot 2dup type ." with regnum " rot dup . cr hunk ./wam.fs 719 + \ dup 2dup -1 <> 0 <> and if ." foo = " unparse cr else drop endif hunk ./wam.fs 768 +wam-instr: put_variable ( vn ai -- ) + { vn ai } + create-unbound dup vn ! ai ! + ;binary-wam-instr + hunk ./wam.fs 807 + \ ." vn = " vn @ . cr + \ ." ai = " ai @ . cr hunk ./wam.fs 1497 +: compareterms/3-clause-1 compare_terms ; + }