Author: Armin Rigo <[email protected]>
Branch: vmprof
Changeset: r76345:ea87004e582f
Date: 2015-03-12 13:11 +0100
http://bitbucket.org/pypy/pypy/changeset/ea87004e582f/
Log: Include skiplist.c with codemap.c into a single
separate_module_sources; otherwise codemap.c is copied in a place
that no longer has any skiplist.c
diff --git a/rpython/jit/backend/llsupport/codemap.py
b/rpython/jit/backend/llsupport/codemap.py
--- a/rpython/jit/backend/llsupport/codemap.py
+++ b/rpython/jit/backend/llsupport/codemap.py
@@ -23,7 +23,10 @@
INT_LIST_PTR = rffi.CArrayPtr(lltype.Signed)
+srcdir = os.path.join(os.path.dirname(__file__), 'src')
+
eci = ExternalCompilationInfo(post_include_bits=["""
+#include <stdint.h>
RPY_EXTERN long pypy_jit_codemap_add(uintptr_t addr,
unsigned int machine_code_size,
long *bytecode_info,
@@ -38,8 +41,9 @@
unsigned int stackdepth);
RPY_EXTERN void pypy_jit_depthmap_clear(uintptr_t addr, unsigned int size);
-"""], separate_module_files=[
- os.path.join(os.path.dirname(__file__), 'src', 'codemap.c')
+"""], separate_module_sources=[
+ open(os.path.join(srcdir, 'skiplist.c'), 'r').read() +
+ open(os.path.join(srcdir, 'codemap.c'), 'r').read()
], include_dirs=[cdir])
def llexternal(name, args, res):
diff --git a/rpython/jit/backend/llsupport/src/codemap.c
b/rpython/jit/backend/llsupport/src/codemap.c
--- a/rpython/jit/backend/llsupport/src/codemap.c
+++ b/rpython/jit/backend/llsupport/src/codemap.c
@@ -1,5 +1,8 @@
#include "src/precommondefs.h"
-#include "skiplist.c"
+
+#ifndef HAS_SKIPLIST
+# error "skiplist.c needs to be included before"
+#endif
volatile int pypy_codemap_currently_invalid = 0;
diff --git a/rpython/jit/backend/llsupport/src/skiplist.c
b/rpython/jit/backend/llsupport/src/skiplist.c
--- a/rpython/jit/backend/llsupport/src/skiplist.c
+++ b/rpython/jit/backend/llsupport/src/skiplist.c
@@ -1,7 +1,7 @@
#include <stdlib.h>
#include <stdint.h>
-
+#define HAS_SKIPLIST
#define SKIPLIST_HEIGHT 8
typedef struct skipnode_s {
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit