[squeak-dev] detecting if method has an prim error code
Igor Stasenko
siguctua at gmail.com
Fri Feb 10 17:56:37 UTC 2012
Is there a simple way to detect that given method using:
myMethod
<primitive: #primFoo module: #moduleBar error: errorCode>
but not:
myMethod
<primitive: #primFoo module: #moduleBar>
?
should i use a method's pragmas to see if it has
#primitive:module:error: pragma?
And if this check is ok, do i remember correctly, that temp which is
used for storing an error is first temp in context, i.e.:
err := context tempAt: 1
?
(ok i checked, it is actually always last temp), no matter if i
declare temps before pragma or not.
i.e. the order is same for:
myMethod
| a b c |
<primitive: #primFoo module: #moduleBar error: errorCode>
and
myMethod
<primitive: #primFoo module: #moduleBar error: errorCode>
| a b c |
--
Best regards,
Igor Stasenko.
More information about the Squeak-dev
mailing list
|