CompiledCode.st
changeset 13427 6a957644862b
parent 12160 48e09b1971f3
child 13640 d5ffef38fdd8
--- a/CompiledCode.st	Tue Jun 28 20:23:49 2011 +0200
+++ b/CompiledCode.st	Tue Jun 28 20:28:58 2011 +0200
@@ -1460,6 +1460,27 @@
     "Created: 13.4.1997 / 00:01:11 / cg"
 !
 
+marked: aBoolean
+
+    "Sets the mark bit. You may use it for whatever you want. Actually,
+     it's used for marking profiled methods"
+
+%{  /* NOCONTEXT */
+
+    INT newFlags = __intVal(__INST(flags));
+
+    /* made this a primitive to get define in stc.h */
+    if (aBoolean == true)
+        newFlags |= F_MARKBIT;
+    else
+        newFlags &= ~F_MARKBIT;
+
+    __INST(flags) = __mkSmallInteger(newFlags);
+%}
+
+    "Created: / 29-11-2010 / 21:20:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 numberOfArgs:aNumber
     "set the number of arguments, the codeObject expects.
      WARNING: for internal use by the compiler only.     
@@ -1586,6 +1607,19 @@
     "Modified: 30.7.1997 / 16:37:14 / cg"
 !
 
+isChecked
+    "return true, if this method has been analyzed for jitting"
+
+%{  /* NOCONTEXT */
+
+    /* made this a primitive to get define in stc.h */
+
+    RETURN (( (INT)(__INST(flags)) & __MASKSMALLINT(F_CHECKED)) ? true : false);
+%}
+
+    "Created: / 29-11-2010 / 21:16:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 isDynamic
     "return true, if the machine code was created
      dynamically (from bytecode); false if the machine code was
@@ -1611,6 +1645,19 @@
     "Modified: / 13.11.1998 / 23:18:01 / cg"
 !
 
+isMarked
+    "return true, if this method has been marked (for whatever reason)"
+
+%{  /* NOCONTEXT */
+
+    /* made this a primitive to get define in stc.h */
+
+    RETURN (( (INT)(__INST(flags)) & __MASKSMALLINT(F_MARKBIT)) ? true : false);
+%}
+
+    "Created: / 29-11-2010 / 21:17:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 isUnloaded
     "return true, if the methods machine code has been unloaded
      from the system (i.e. it is not executable)."
@@ -1768,10 +1815,10 @@
 
 !CompiledCode class methodsFor:'documentation'!
 
-version
-    ^ '$Header: /cvs/stx/stx/libbasic/CompiledCode.st,v 1.108 2009-10-06 14:59:40 fm Exp $'
+version_CVS
+    ^ '$Header: /cvs/stx/stx/libbasic/CompiledCode.st,v 1.109 2011-06-28 18:28:58 vrany Exp $'
 !
 
-version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/CompiledCode.st,v 1.108 2009-10-06 14:59:40 fm Exp $'
+version_SVN
+    ^ ' Id: CompiledCode.st 10643 2011-06-08 21:53:07Z vranyj1  '
 ! !