On 08/26/2010 05:45 PM, Mathieu Suen wrote:
Hi,

AFAIK sp in a context take in account the temporaries.
This mean the if you have 1 temp sp is equal to 1 at the beginning of the
function (minus the fact the is lazily sync but that is not my point)
 From that there is something I don't understand:
In smalltalk I got the following example:

     | method |
     method := (STInST.RBParser parseMethod: 'foo ^12') jitMethodIn: A.
     A methodDictionary at: #foo put: method.
     A new foo printNl

I would expected to be FROM_INT(2) aka 5 since you have (A new) push on the
stack.
What did I miss-understood?

Temporaries in the REPL are kind of special because they must survive multiple evaluations. So, they are treated as globals (or as instance variables in VisualGST).

Try wrapping your test with Eval [ ... ], which will delimit the scope of the "method" variable, and sp will be 2 as expected.

Paolo

_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to