Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: "Rod Pemberton" Newsgroups: comp.lang.forth Subject: Re: Static Single Assignment form to Stack allocation Date: Sat, 07 Feb 2015 21:10:42 -0500 Organization: Aioe.org NNTP Server Lines: 19 Message-ID: References: <82c4c3dc-7692-4d03-a447-9bdd54ff9387@googlegroups.com> <2015Feb6.142225@mips.complang.tuwien.ac.at> <26b59aed-f1a6-4ccb-90ad-69c36b1abb89@googlegroups.com> <45da3660-ad44-4d81-9142-e8582e5d66d2@googlegroups.com> <2fWdnbgKv_RXH0vJnZ2dnUU7-TGdnZ2d@supernews.com> <9b851120-bcf2-41ba-851a-49dcf5654736@googlegroups.com> NNTP-Posting-Host: n4wpt9zq8xR26Ttf9mo2BA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:36379 On Sat, 07 Feb 2015 21:04:07 -0500, Rod Pemberton wrote: > On Sat, 07 Feb 2015 17:51:57 -0500, Aliaksei Chapyzhenka > wrote: >> : DROP DUP XOR XOR ; > > That doesn't do what you think it does. DUP creates two stack > items. XOR XOR converts one of them to zero. But, you still > have two items on the stack, the second one being a zero. > DROP needs to _reduce_ the number of items on the stack. > Reducing or increasing the number of items on a stack usually > requires a "primitive" or low-level Forth word or operation. > Correction. Scratch that. That was two XOR's. One item. Rod Pemberton