[Vm-dev] Interpreter>>isContextHeader: optimization

Yoshiki Ohshima yoshiki at vpri.org
Mon Feb 23 06:48:43 UTC 2009


At Sat, 21 Feb 2009 09:37:29 +0200,
Igor Stasenko wrote:
> 
>  
> i think it wouldn't hurt to rewrite it as:
> 
> isContextHeader: aHeader
> 	self inline: true.
>  | hdr |
>   hdr := aHeader bitAnd: (16r1F << 12).
> 	^ hdr = (13 << 12)			"MethodContext"
> 		or: [ hdr = (14 << 12)		"BlockContext"
> 		or: [ hdr = (4 << 12)]]	 "PseudoContext"

  This is totally tangent but I was supposed to relay a message from
somebody (IIRC it was originally from Dave Ungar but a few hops in
between) pointed out that "13" is BlockContext and "14" is
MethodContext in the image.

  (This level of nitpicking may not have anything to do with average
Squeakers but for VM hackers I understand it could be crucial^^;)

-- Yoshiki



More information about the Vm-dev mailing list