Oops, I meant these bytecodes:
<4B> push 2 <4D> store local 1; pop <D8 03> push 3 <4C> store local 0; pop <10> push local 0 <11> push local 1 <4C> store local 0; pop <10> push local 0 <A0> send + <4D> store local 1; pop <11> push local 1 <65> return
r
-----Original Message----- From: Withers, Robert Sent: Wednesday, January 09, 2002 8:40 PM To: 'squeak-dev@lists.squeakfoundation.org' Subject: RE: [OT] Writing a parser for BASIC in Smalltalk/Squeak ? (<CSOTD> included)
Tim, I don't agree. Don't rely on books so much {raspberry sound effects} ;-) Consider that in:
| m n | n := 2. m := 3. n := m + (m := n).
m is the receiver of the plus message and not another argument, as in your example, so it gets pushed onto the stack before the arguments are evaluated, inline. My C++ example was really wrong, and let's just forget about that, please.
check out these bytecodes:
<77> pushConstant: 2 <69> popIntoTemp: 1 <20> pushConstant: 3 <68> popIntoTemp: 0 <10> pushTemp: 0 <11> pushTemp: 1 <81 40> storeIntoTemp: 0 <B0> send: + <81 41> storeIntoTemp: 1 <7C> returnTop
rob
-----Original Message----- From: Tim Rowledge [mailto:tim@sumeru.stanford.edu] Sent: Wednesday, January 09, 2002 7:22 PM To: squeak-dev@lists.squeakfoundation.org Subject: Re: [OT] Writing a parser for BASIC in Smalltalk/Squeak ? (<CSOTD> included)
Sorry guys, but by inspection, deduction, induction, reductio ad absurdum, bivariant algorithmic analysis, flim-flam and
fiat, you are
wrong. So there. {raspberry sound effects}
Expressions in () are supposed to be _completed_ before the rest of the expression is executed.
foo doThisWith: a and: (a _ fribble slander) should be identical to a_ fribble slander. foo doThisWith: a and: a
Suggesting anything else is a symptom of advanced senility.
It says so
in this book right here.
tim
-- Tim Rowledge, tim@sumeru.stanford.edu,
http://sumeru.stanford.edu/tim
Useful random insult:- Couldn't balance a checkbook if Einstein helped.
squeak-dev@lists.squeakfoundation.org