[[a,b,c] Adrian Prantl **20090126181007] { hunk ./compiler.fs 303 - \ lowermode + lowermode hunk ./compiler.fs 321 - \ lowermode + lowermode hunk ./compiler.fs 393 -: getput-variable ( -- ) - head? if s" get_variable" else s" put_variable" endif push-xt ; -: getput-value ( -- ) head? if s" get_value" else s" put_value" endif push-xt ; -: getput-nil ( -- ) head? if s" get_nil" else s" put_nil" endif push-xt ; -: getput-list ( -- ) head? if s" get_list" else s" put_list" endif push-xt ; -: getput-structure ( -- ) - head? if s" get_structure" else s" put_structure" endif push-xt ; + +: getput ( -- ) head? if s" get_" else s" put_" endif push-xt, ; +: getunify ( -- ) head? if s" get_" else s" unify_" endif push-xt, ; + +: getput-variable ( -- ) getput s" variable" push-xt ; +: getput-value ( -- ) getput s" value" push-xt ; +: getput-list ( -- ) getput s" list" push-xt ; +: getput-atom ( -- ) getput s" atom" push-xt ; +: getput-structure ( -- ) getput s" structure" push-xt ; + +: getunify-value ( -- ) getunify s" value" push-xt ; +: getunify-nil ( -- ) getunify s" nil" push-xt ; hunk ./compiler.fs 434 - reg? if Xreg getput-value 2drop push-cr else + reg? if Xreg getunify-value 2drop push-cr else hunk ./compiler.fs 436 - nil? if 3drop getput-nil push-cr else + nil? if 3drop getunify-nil push-cr else hunk ./compiler.fs 446 - nil? if 2drop Areg getput-nil push-cr else + nil? if 2drop Areg getunify-nil push-cr else hunk ./compiler.fs 471 +\ Argument order: +\ head? -> outer .. inner +\ query,clause? -> inner .. outer + hunk ./compiler.fs 477 + + nargs 0 = if s\" s\"" push-xt addrF uF push-xt, s\" \"" push-xt endif + hunk ./compiler.fs 485 - - nargs addrF uF isList? if getput-list - else addrF uF nargs push-functor getput-structure endif + + nargs 0 = if getput-atom else + nargs addrF uF isList? if getput-list else + addrF uF nargs push-functor getput-structure endif + endif hunk ./compiler.fs 720 -s" :- f(.(a,.(b,.(c,[]))))" test-compile -s" :- f([a,b,c])" test-compile hunk ./compiler.fs 721 -s" :- f([X])" test-compile \ s" f" 1 put_structure +s" :- f([X])" test-compile +s" :- f(.(a,.(b,.(c,[]))))" test-compile +s" :- f([a,b,c])" test-compile bye hunk ./compiler.fs 739 - -s" a" put_atom - }