ObjectMemory.st
branchjv
changeset 17835 67648e9f2814
parent 17834 04ff72c5039a
child 17836 525ed10af75a
--- a/ObjectMemory.st	Sat Apr 09 18:19:04 2011 +0100
+++ b/ObjectMemory.st	Sat Apr 23 11:55:48 2011 +0100
@@ -3748,6 +3748,43 @@
 
 !
 
+optimizeContexts
+    "return the setting of the optimize contexts flag"
+
+%{  /* NOCONTEXT */
+    extern int __optimizeContexts();
+
+    RETURN (__optimizeContexts(-1) ? true : false);
+%}
+    "
+     ObjectMemory optimizeContexts
+    "
+
+!
+
+optimizeContexts:aBoolean
+    "enable/disable restartable contexts for the just-in-time-compiled code.
+     If off, contexts that does not contain blocks are not restartable.
+     Execution is a bit slower if enabled."
+
+%{  /* NOCONTEXT */
+    extern int __optimizeContexts();
+    int prev;
+
+    prev = __optimizeContexts(aBoolean == true
+				   ? 1
+				   : (aBoolean == false)
+					? 0
+					: -1);
+    RETURN (prev ? true : false);
+%}
+    "
+     ObjectMemory optimizeContexts:true
+     ObjectMemory optimizeContexts:false
+    "
+
+!
+
 getCompiledCodeLimit
     "get the codeLimit from the VM"
 
@@ -5404,7 +5441,7 @@
 !ObjectMemory class methodsFor:'documentation'!
 
 version
-    ^ '$Id: ObjectMemory.st 10632 2011-04-09 17:19:04Z vranyj1 $'
+    ^ '$Id: ObjectMemory.st 10633 2011-04-23 10:55:48Z vranyj1 $'
 !
 
 version_CVS
@@ -5412,7 +5449,7 @@
 !
 
 version_SVN
-    ^ '$Id: ObjectMemory.st 10632 2011-04-09 17:19:04Z vranyj1 $'
+    ^ '$Id: ObjectMemory.st 10633 2011-04-23 10:55:48Z vranyj1 $'
 ! !
 
 ObjectMemory initialize!