* src/mm/cacao-gc/gc.c [!ENABLE_THREADS]: Added _no_threads variables for
above defines.
* src/mm/cacao-gc/rootset.c: Now uses above defines.
* src/vm/jit/replace.c (replace_me, replace_gc_from_native): Same.
--HG--
branch : exact-gc
38 files changed:
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
dnl 02110-1301, USA.
dnl
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
dnl 02110-1301, USA.
dnl
-dnl $Id: configure.ac 7434 2007-03-02 19:44:53Z edwin $
+dnl $Id: configure.ac 7441 2007-03-02 23:13:10Z michi $
dnl Process this file with autoconf to produce a configure script.
dnl Process this file with autoconf to produce a configure script.
bool gc_running;
bool gc_notify_finalizer;
bool gc_running;
bool gc_notify_finalizer;
+#if !defined(ENABLE_THREADS)
+executionstate_t *_no_threads_executionstate;
+sourcestate_t *_no_threads_sourcestate;
+#endif
+
/* gc_init *********************************************************************
/* gc_init *********************************************************************
/* this is only quick'n'dirty check, but is NOT thread safe */
if (gc_pending || gc_running) {
/* this is only quick'n'dirty check, but is NOT thread safe */
if (gc_pending || gc_running) {
- GC_LOG("GC: Preventing reentrance!");
+ GC_LOG( dolog("GC: Preventing reentrance!"); );
bool gc_suspend(threadobject *thread, u1 *pc, u1 *sp)
{
codeinfo *code;
bool gc_suspend(threadobject *thread, u1 *pc, u1 *sp)
{
codeinfo *code;
- stackframeinfo *sfi;
- executionstate_t *es;
- sourcestate_t *ss;
/* check if the thread suspended itself */
if (pc == NULL) {
/* check if the thread suspended itself */
if (pc == NULL) {
# include "threads/native/threads.h"
#endif
# include "threads/native/threads.h"
#endif
+#include "vm/jit/replace.h"
+
/* Configuration Switches *****************************************************/
/* Configuration Switches *****************************************************/
extern bool gc_notify_finalizer;
extern bool gc_notify_finalizer;
+/* No-Thread specific stuff ***************************************************/
+
+#if defined(ENABLE_THREADS)
+# define GC_EXECUTIONSTATE (thread->es)
+# define GC_SOURCESTATE (thread->ss)
+#else
+# define GC_EXECUTIONSTATE (_no_threads_executionstate)
+# define GC_SOURCESTATE (_no_threads_sourcestate)
+
+extern executionstate_t *_no_threads_executionstate;
+extern sourcestate_t *_no_threads_sourcestate;
+
+#endif
+
+
/* Prototypes *****************************************************************/
#if defined(ENABLE_THREADS)
/* Prototypes *****************************************************************/
#if defined(ENABLE_THREADS)
stacktrace_dump_trace(thread); );
/* get the sourcestate of the threads */
stacktrace_dump_trace(thread); );
/* get the sourcestate of the threads */
-#if defined(ENABLE_THREADS)
- es = thread->es;
- ss = thread->ss;
-#else
- GC_ASSERT(0);
-#endif
+ es = GC_EXECUTIONSTATE;
+ ss = GC_SOURCESTATE;
GC_ASSERT(es);
GC_ASSERT(ss);
GC_ASSERT(es);
GC_ASSERT(ss);
}
/* now walk through all local references of this thread */
}
/* now walk through all local references of this thread */
+#if defined(ENABLE_THREADS)
lrt = thread->_localref_table;
lrt = thread->_localref_table;
+#else
+ lrt = LOCALREFTABLE;
+#endif
while (lrt) {
for (i = 0; i < lrt->used; i++) {
while (lrt) {
for (i = 0; i < lrt->used; i++) {
calls instead of machine instructions, using the C calling
convention.
calls instead of machine instructions, using the C calling
convention.
- $Id: builtin.c 7459 2007-03-05 17:34:43Z edwin $
+ $Id: builtin.c 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: builtin.h 7486 2007-03-08 13:50:07Z twisti $
+ $Id: builtin.h 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: md.c 7355 2007-02-14 10:57:32Z twisti $
+ $Id: md.c 7304 2007-02-09 10:35:26Z twisti $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: patcher.c 7464 2007-03-06 00:26:31Z edwin $
+ $Id: patcher.c 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: emit.c 7486 2007-03-08 13:50:07Z twisti $
+ $Id: emit.c 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: patcher.c 7486 2007-03-08 13:50:07Z twisti $
+ $Id: patcher.c 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: jit.c 7451 2007-03-04 20:10:18Z edwin $
+ $Id: jit.c 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: jit.h 7464 2007-03-06 00:26:31Z edwin $
+ $Id: jit.h 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: md.c 7477 2007-03-07 14:05:04Z twisti $
+ $Id: md.c 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: patcher.c 7464 2007-03-06 00:26:31Z edwin $
+ $Id: patcher.c 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: parse.c 7464 2007-03-06 00:26:31Z edwin $
+ $Id: parse.c 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: patcher.c 7464 2007-03-06 00:26:31Z edwin $
+ $Id: patcher.c 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: patcher.c 7464 2007-03-06 00:26:31Z edwin $
+ $Id: patcher.c 7483 2007-03-08 13:17:40Z michi $
replace_deactivate_replacement_points(frame->tocode);
/* remember executionstate and sourcestate for this thread */
replace_deactivate_replacement_points(frame->tocode);
/* remember executionstate and sourcestate for this thread */
- thread->es = es;
- thread->ss = ss;
+ GC_EXECUTIONSTATE = es;
+ GC_SOURCESTATE = ss;
/* really suspend this thread now (PC = 0) */
threads_suspend_ack(NULL, NULL);
/* really suspend this thread now (PC = 0) */
threads_suspend_ack(NULL, NULL);
replace_map_source_state_identity(ss);
/* remember executionstate and sourcestate for this thread */
replace_map_source_state_identity(ss);
/* remember executionstate and sourcestate for this thread */
- thread->es = es;
- thread->ss = ss;
+ GC_EXECUTIONSTATE = es;
+ GC_SOURCESTATE = ss;
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: arch.h 7356 2007-02-14 11:00:28Z twisti $
+ $Id: arch.h 7312 2007-02-10 00:49:37Z pm $
- $Id: asmpart.S 7442 2007-03-02 23:28:37Z pm $
+ $Id: asmpart.S 7483 2007-03-08 13:17:40Z michi $
Christian Ullrich
Edwin Steiner
Christian Ullrich
Edwin Steiner
- $Id: codegen.c 7486 2007-03-08 13:50:07Z twisti $
+ $Id: codegen.c 7483 2007-03-08 13:17:40Z michi $
Authors: Andreas Krall
Christian Thalinger
Authors: Andreas Krall
Christian Thalinger
- $Id: codegen.h 7486 2007-03-08 13:50:07Z twisti $
+ $Id: codegen.h 7483 2007-03-08 13:17:40Z michi $
Authors: Christian Thalinger
Authors: Christian Thalinger
- $Id: emit.c 7486 2007-03-08 13:50:07Z twisti $
+ $Id: emit.c 7483 2007-03-08 13:17:40Z michi $
- $Id: emit.h 7486 2007-03-08 13:50:07Z twisti $
+ $Id: emit.h 7483 2007-03-08 13:17:40Z michi $
- $Id: md-abi.h 7486 2007-03-08 13:50:07Z twisti $
+ $Id: md-abi.h 7483 2007-03-08 13:17:40Z michi $
- $Id: patcher.c 7486 2007-03-08 13:50:07Z twisti $
+ $Id: patcher.c 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: asmpart.S 7475 2007-03-07 12:37:34Z twisti $
+ $Id: asmpart.S 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: emit.c 7486 2007-03-08 13:50:07Z twisti $
+ $Id: emit.c 7483 2007-03-08 13:17:40Z michi $
- $Id: emit.h 6090 2006-11-29 20:40:10Z twisti $
+ $Id: emit.h 6087 2006-11-29 20:15:47Z twisti $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: md.c 7486 2007-03-08 13:50:07Z twisti $
+ $Id: md.c 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: patcher.c 7486 2007-03-08 13:50:07Z twisti $
+ $Id: patcher.c 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: classcache.c 7486 2007-03-08 13:50:07Z twisti $
+ $Id: classcache.c 7441 2007-03-02 23:13:10Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: linker.c 7486 2007-03-08 13:50:07Z twisti $
+ $Id: linker.c 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: method.c 7486 2007-03-08 13:50:07Z twisti $
+ $Id: method.c 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: method.h 7486 2007-03-08 13:50:07Z twisti $
+ $Id: method.h 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: options.c 7486 2007-03-08 13:50:07Z twisti $
+ $Id: options.c 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: options.h 7486 2007-03-08 13:50:07Z twisti $
+ $Id: options.h 7483 2007-03-08 13:17:40Z michi $
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: statistics.c 7486 2007-03-08 13:50:07Z twisti $
+ $Id: statistics.c 7483 2007-03-08 13:17:40Z michi $