#define ASE_HEAP_MIN_SIZE 4096 /* 65536 */
#define ALIGNED(n) __attribute__((aligned(n), packed))
+static inline ase_yheap_t _ase_make_yheap(ase_heap_options_t opts);
+static inline Lisp_Object _ase_wrap_yheap(ase_yheap_t);
+static inline ase_dheap_t _ase_make_dheap(ase_heap_options_t opts);
+static inline Lisp_Object _ase_wrap_dheap(ase_dheap_t);
+static inline ase_wheap_t _ase_make_wheap(ase_heap_options_t opts);
+static inline Lisp_Object _ase_wrap_wheap(ase_wheap_t);
+
/* the op tables */
struct ase_heap_ops_s ase_heap_ops[NUMBER_OF_ASE_HEAP_KINDS] =
{{(ase_heap_constr_f)_ase_make_yheap, (ase_heap_wrap_f)_ase_wrap_yheap,
return c;
}
-Lisp_Object
+static inline Lisp_Object
_ase_wrap_yheap(ase_yheap_t h)
{
Lisp_Object result;
return result;
}
-Lisp_Object
+static inline Lisp_Object
_ase_wrap_dheap(ase_dheap_t h)
{
Lisp_Object result;
return result;
}
-ase_dheap_t
+static inline ase_dheap_t
_ase_make_dheap(ase_heap_options_t opts)
{
ase_dheap_t h = xnew(struct ase_dheap_s);
return _ase_wrap_dheap(h);
}
-Lisp_Object
+static inline Lisp_Object
_ase_wrap_wheap(ase_wheap_t h)
{
Lisp_Object result;
return result;
}
-ase_wheap_t
+static inline ase_wheap_t
_ase_make_wheap(ase_heap_options_t opts)
{
ase_wheap_t h = xnew(struct ase_wheap_s);
return _ase_wrap_wheap(h);
}
-inline ase_yheap_t
+static inline ase_yheap_t
_ase_make_yheap(ase_heap_options_t opts)
{
ase_yheap_t h = xnew(struct ase_yheap_s);
\f
/* dyna heaps */
-static inline ase_yheap_t _ase_make_yheap(ase_heap_options_t opts);
-static inline Lisp_Object _ase_wrap_yheap(ase_yheap_t);
extern Lisp_Object ase_make_yheap(ase_heap_options_t opts);
extern void ase_add_yheap(ase_yheap_t h, Lisp_Object o, Lisp_Object colour);
extern Lisp_Object ase_pop_yheap(ase_yheap_t h);
extern Lisp_Object ase_yheap_top_rank(ase_yheap_t h);
/* dense heaps */
-static inline ase_dheap_t _ase_make_dheap(ase_heap_options_t opts);
-static inline Lisp_Object _ase_wrap_dheap(ase_dheap_t);
extern Lisp_Object ase_make_dheap(ase_heap_options_t opts);
extern void ase_add_dheap(ase_dheap_t h, Lisp_Object o, Lisp_Object colour);
extern Lisp_Object ase_pop_dheap(ase_dheap_t h);
extern Lisp_Object ase_dheap_top_rank(ase_dheap_t h);
/* weak heaps */
-static inline ase_wheap_t _ase_make_wheap(ase_heap_options_t opts);
-static inline Lisp_Object _ase_wrap_wheap(ase_wheap_t);
extern Lisp_Object ase_make_wheap(ase_heap_options_t opts);
extern void ase_add_wheap(ase_wheap_t h, Lisp_Object o, Lisp_Object colour);
extern Lisp_Object ase_pop_wheap(ase_wheap_t h);
TAGS_DEPENDENCIES = $(ETAGS)
bin_PROGRAMS = sxemacs
-bin_SCRIPTS = sxemacs.dmp
+noinst_DATA = sxemacs.dmp
archlib_DATA = config.values DOC
pdumplibs =
## relinked sxemacs
## one day (when SXE is linked with its own shared libraries) we HAVE to
## go that way but at the moment it's okay the way it is
-SXEDMP_FILEEXT=dmp
-SXEMACS_FILENAME=sxemacs
-SXEDMP_FILENAME=$(SXEMACS_FILENAME).$(SXEDMP_FILEEXT)
+SXE_SHOW_DUMP = $$($(BITCHENV) $(DESTDIR)$(bindir)/sxemacs -sd)
+SXEDMP_FILENAME=sxemacs-$(old_version)-$(SXE_SHOW_DUMP).dmp
sxemacs.dmp: $(SXEMACS) $(archlib_DATA) $(bldlispdir)/update-elc.stamp
if test -e "$(bldlispdir)/update-elc.stamp"; then \
$(bldlispdir)/update-elc.stamp $(bldlispdir)/auto.stamp:
:
-SXE_SHOW_DUMP = $$($(BITCHENV) $(DESTDIR)$(bindir)/sxemacs -sd)
-
## improve me, make me (the dump file) independent from the binary
+## because of historical reasons we also delete $(bindir)/sxemacs.dmp here
install-exec-hook:
(cd $(DESTDIR)$(bindir) && $(RM) sxemacs.dmp)
+ (cd $(DESTDIR)$(archlibdir) && $(RM) sxemacs.dmp)
(cd $(abs_builddir); \
$(BITCHENV) $(DESTDIR)$(bindir)/sxemacs -nd -batch \
-l $(sxelispdir)/loadup.el \
- --dump $(DESTDIR)$(bindir)/sxemacs-$(old_version)-$(SXE_SHOW_DUMP).dmp)
- (cd $(DESTDIR)$(bindir) && \
- $(LN_S) sxemacs-$(old_version)-$(SXE_SHOW_DUMP).dmp sxemacs.dmp)
+ --dump $(DESTDIR)$(archlibdir)/$(SXEDMP_FILENAME))
## someone who wants to use this actually needs repeat the fuss above
extern_inline bool __bit_set_p(int number, char bit);
extern_inline char __nbits_right_of(int number, char bit);
-extern_inline void *cat_morphism(const void*, cat_morphism_kind_t);
-extern_inline void *const*cat_morphisms(const void*);
extern cat_morphism_t morphisms;
\f
#endif
#if 1 /* using the global shit */
-extern_inline void*const*
+static inline void*const*
cat_morphisms(const void *obj)
{
/* returns a pointer to the array of implementations or
}
}
-extern_inline void*
+static inline void*
cat_morphism(const void *obj, cat_morphism_kind_t kind)
{
unsigned int flags = ((const struct lrecord_header*)obj)->morphisms;
return mph[__nbits_right_of(flags, kind)-(flags&1)];
}
}
+#else /* use definition in category.c */
+extern void *cat_morphism(const void*, cat_morphism_kind_t);
+extern void *const*cat_morphisms(const void*);
#endif
#endif /* INCLUDED_category_h_ */
#include <sys/mman.h>
#endif
+/* For PATH_EXEC */
+#include <sxe-paths.h>
+
#ifndef SEPCHAR
#define SEPCHAR ':'
#endif
int pdump_load(const char *argv0)
{
char exe_path[PATH_MAX], real_exe_path[PATH_MAX];
+ char libarchdir_path[PATH_MAX] = PATH_EXEC "/sxemacs";
char *w;
const char *dir, *p;
xstrncpy(real_exe_path, exe_path, sizeof(real_exe_path));
if (pdump_file_try(exe_path,sizeof(exe_path))
|| (xrealpath(real_exe_path, real_exe_path)
- && pdump_file_try(real_exe_path,sizeof(real_exe_path)))) {
+ && pdump_file_try(real_exe_path,sizeof(real_exe_path)))
+ || pdump_file_try(libarchdir_path,sizeof(libarchdir_path)) ) {
pdump_load_finish();
return 1;
}
/* 1 if the object is readonly from lisp */
unsigned int lisp_readonly:1;
- long unsigned int hash_cache;
unsigned int morphisms:/*number_of_cat_morphism_kinds => */6;
+
+ long unsigned int hash_cache;
};
struct lrecord_implementation;
SLI_header->mark = 0; \
SLI_header->c_readonly = 0; \
SLI_header->lisp_readonly = 0; \
+ SLI_header->morphisms = 0; \
+ SLI_header->hash_cache = 0; \
} while (0)
struct lcrecord_header {
#define PATH_PACKAGEPATH "@PACKAGE_PATH@"
#endif
-#ifdef ARCHLIBDIR_USER_DEFINED
#define PATH_EXEC "@ARCHLIBDIR@"
-#endif
#ifdef ETCDIR_USER_DEFINED
#define PATH_DATA "@ETCDIR@"
SXE_DYLD_PATH = $(bldsrcdir):$(bldsrcdir)/$(LT_OBJDIR):$(bldlwlibdir):$(bldlwlibdir)/$(LT_OBJDIR):$(DESTDIR)$(libdir)
BATCHENV = DYLD_LIBRARY_PATH=$(SXE_DYLD_PATH):$$DYLD_LIBRARY_PATH:$(DYLD_LIBRARY_PATH) \
LD_LIBRARY_PATH=$(SXE_DYLD_PATH):$$LD_LIBRARY_PATH:$(LD_LIBRARY_PATH) \
- SHLIB_PATH=$(SXE_DYLD_PATH):$$SHLIB_PATH:$(SHLIB_PATH)
+ SHLIB_PATH=$(SXE_DYLD_PATH):$$SHLIB_PATH:$(SHLIB_PATH) \
+ MALLOC_PERTURB_=69
### Produces strange banner
SXEMACS = $(bldsrcdir)/sxemacs
SXEDMP = $(SXEMACS).dmp
(test-setq 42 (setq-default test-setq-bar 99 test-setq-var 42))
)
+;; Following test dies on recent libc's with MALLOC_PERTURB_=69
+(Check-Error wrong-type-argument (length (current-buffer)))
+
(let ((my-vector [1 2 3 4])
(my-bit-vector (bit-vector 1 0 1 0))
(my-string "1234")