hasInstVarRef

Bergel, Alexandre bergel at iam.unibe.ch
Fri Sep 21 14:14:16 UTC 2007


Hi Adrian,

I wish to know whether a compiled method references any variable.

Defined on CompiledMethod in Squeak-dev 7143:
-=-=--=-=-=--=-=-=--=-=-=--=-=-=--=-=-=--=
md 4/27/2006 15:12 ¥ CompiledMethod ¥ scanning ¥ 3 implementors ¥ in  
no change set
hasInstVarRef
	"Answer whether the method references an instance variable."

	| scanner end printer |

	scanner _ InstructionStream on: self.
	printer _ InstVarRefLocator new.
	end _ self endPC.

	[scanner pc <= end] whileTrue: [
		(printer interpretNextInstructionUsing: scanner) ifTrue: [^true].
	].
	^false
-=-=--=-=-=--=-=-=--=-=-=--=-=-=--=-=-=--=

Cheers,
Alexandre

On 21 Sep 2007, at 10:00, Adrian Lienhard wrote:

> Hi Alex,
>
> In the image I have open right now, there is no #hasInstVarRef  
> defined for CompiledMethod.
> Maybe you are looking for (Point >> #x) readsField: 1 ==> true?
>
> Cheers,
> Adrian
>
>
> On Sep 21, 2007, at 09:46 , Bergel, Alexandre wrote:
>
>> Dear all,
>>
>> Is this a bug?
>> (Point >> #x) hasInstVarRef ==> false
>>
>> I haven't seen any related entry in http://bugs.squeak.org
>> Should I add it?
>>
>> Cheers,
>> Alexandre
>>
>> -- 
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>
>

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






More information about the Squeak-dev mailing list