Author: Armin Rigo <[email protected]>
Branch: card-marking
Changeset: r1270:6d6832a447c3
Date: 2014-07-01 11:37 +0200
http://bitbucket.org/pypy/stmgc/changeset/6d6832a447c3/
Log: Workaround for what seems like a clang bug (I'm sure people would
argue otherwise, but I don't care: it needs a workaround).
diff --git a/c7/stm/core.c b/c7/stm/core.c
--- a/c7/stm/core.c
+++ b/c7/stm/core.c
@@ -245,12 +245,13 @@
return mark_card;
}
-char *_stm_write_slowpath_card_extra_base(void)
+long _stm_write_slowpath_card_extra_base(void)
{
/* for the PyPy JIT: _stm_write_slowpath_card_extra_base[obj >> 4]
is the byte that must be set to CARD_MARKED. The logic below
does the same, but more explicitly. */
- return (char *)write_locks - WRITELOCK_START + 1;
+ return (((long)write_locks) - WRITELOCK_START + 1)
+ + 0x4000000000000000L; // <- workaround for a clang bug :-(
}
void _stm_write_slowpath_card(object_t *obj, uintptr_t index)
diff --git a/c7/stmgc.h b/c7/stmgc.h
--- a/c7/stmgc.h
+++ b/c7/stmgc.h
@@ -109,7 +109,7 @@
void _stm_write_slowpath(object_t *);
void _stm_write_slowpath_card(object_t *, uintptr_t);
char _stm_write_slowpath_card_extra(object_t *);
-char *_stm_write_slowpath_card_extra_base(void);
+long _stm_write_slowpath_card_extra_base(void);
#define _STM_CARD_MARKED 100
object_t *_stm_allocate_slowpath(ssize_t);
object_t *_stm_allocate_external(ssize_t);
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit