Behavior.st
branchjv
changeset 17936 dca64de9f809
parent 17928 8e8dad2e6269
child 17944 084a2c804b87
--- a/Behavior.st	Thu Apr 05 13:28:03 2012 +0100
+++ b/Behavior.st	Fri Apr 06 13:43:09 2012 +0100
@@ -337,6 +337,17 @@
 
 !Behavior class methodsFor:'flag bit constants'!
 
+flagAlien
+    "Return the flag code for Alien objects for Translucent Object implementation"
+
+%{  /* NOCONTEXT */
+    /* this is defined as a primitive to get defines from stc.h */
+
+    RETURN ( __mkSmallInteger(ALIENPOINTERS) );
+%}
+!
+
+
 flagBehavior
     "return the flag code which marks Behavior-like instances.
      Inline C-code and the VM check this single bit in the flag value when
@@ -3773,7 +3784,16 @@
 
     ^ 0
 
-!
+!    
+
+isAlienBehavior
+    "Returns true iff I'm an alien behavior."
+%{
+    RETURN( ( (INT)(__INST(flags)) & __MASKSMALLINT(ALIENPOINTERS)) ? true : false )
+%}.
+
+!
+
 
 isBits
     "return true, if instances have indexed byte or short instance variables.
@@ -4755,5 +4775,5 @@
 !
 
 version_SVN
-    ^ '$Id: Behavior.st 10792 2012-03-21 17:45:38Z vranyj1 $'
+    ^ '$Id: Behavior.st 10801 2012-04-06 12:43:09Z kursjan $'
 ! !