Commits

Amaury Forgeot d'Arc committed 9b0d056 Merge

Merged in mjacob changes around stacklet.c (pull request #91)

  • Participants
  • Parent commits 5d9c94d, cad6810
  • Branches remove-PYPY_NOT_MAIN_FILE

Comments (0)

Files changed (4)

File pypy/rlib/_rffi_stacklet.py

 eci = ExternalCompilationInfo(
     include_dirs = [cdir],
     includes = ['src/stacklet/stacklet.h'],
-    separate_module_sources = ['#include "src/stacklet/stacklet.c"\n'],
+    separate_module_files = [cdir / 'src' / 'stacklet' / 'stacklet.c'],
 )
 if 'masm' in dir(eci.platform): # Microsoft compiler
     if is_emulated_long:

File pypy/rlib/rstack.py

 
 import inspect
 
+import py
+
 from pypy.rlib.objectmodel import we_are_translated
 from pypy.rlib.rarithmetic import r_uint
 from pypy.rlib import rgc
 from pypy.rpython.lltypesystem import lltype, rffi
 from pypy.rpython.lltypesystem.lloperation import llop
 from pypy.rpython.controllerentry import Controller, SomeControlledInstance
+from pypy.tool.autopath import pypydir
 from pypy.translator.tool.cbuild import ExternalCompilationInfo
 
 # ____________________________________________________________
 
-compilation_info = ExternalCompilationInfo(includes=['src/stack.h'])
+srcdir = py.path.local(pypydir) / 'translator' / 'c' / 'src'
+compilation_info = ExternalCompilationInfo(
+        includes=['src/stack.h'],
+        separate_module_files=[srcdir / 'stack.c', srcdir / 'threadlocal.c'])
 
 def llexternal(name, args, res, _callable=None):
     return rffi.llexternal(name, args, res, compilation_info=compilation_info,

File pypy/translator/c/genc.py

         srcdir / 'profiling.c',
         srcdir / 'debug_print.c',
         srcdir / 'debug_traceback.c',  # ifdef HAVE_RTYPER
-        srcdir / 'stack.c',
-        srcdir / 'threadlocal.c',
         srcdir / 'asm.c',
         srcdir / 'instrument.c',
         srcdir / 'int.c',

File pypy/translator/c/src/stacklet/stacklet.c

  * By Armin Rigo
  */
 
-#include "stacklet.h"
+#include "src/stacklet/stacklet.h"
 
 #include <stddef.h>
 #include <assert.h>
  */
 #define STACK_DIRECTION 0   
 
-#include "slp_platformselect.h"
+#include "src/stacklet/slp_platformselect.h"
 
 #if STACK_DIRECTION != 0
 #  error "review this whole code, which depends on STACK_DIRECTION==0 so far"