[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Questions regarding thisContext
From: |
Paolo Bonzini |
Subject: |
Re: [Help-smalltalk] Questions regarding thisContext |
Date: |
Mon, 04 Apr 2011 08:22:58 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 |
On 04/03/2011 04:11 PM, Holger Hans Peter Freyther wrote:
Hi Paolo,
one quick question (can't reproduce the other thing)
thisContext ip: (thisContext ip). Should it work? For me it complains that the
result is no SmallInteger but if I print it it tells it is a SmallInteger? Any
idea how this could happen?
That's correct:
0: source line 1
push Global Variable[0] = ContextPart
2: send special message #thisContext
4: push Global Variable[0] = ContextPart
6: send special message #thisContext
8: send selector 1, 0 args = #ip
10: send selector 2, 1 args = #ip:
12: return stack top
The stack after bytecode 8 is
thisContext, 10
The stack after bytecode 10 is
thisContext
So the stack underflows when sending #ip: for the second time. All bets
are off with respect to what happens afterwards.
Paolo