Changeset d1fbbf in git


Ignore:
Timestamp:
Sep 10, 2012, 11:15:38 PM (10 years ago)
Author:
Alexander Dreyer <alexander.dreyer@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'ad2543eab51733612ba7d118afc77edca719600e')
Children:
36ebfaa4578b6a83a5511dbbc252bdd925f2845ff768d91b15a3cda106e7c041c7889cda1828dbfe
Parents:
60da76178ec79ee6647fded520f4de44f6a84da4
Message:
Making autoloading of 'reference' and 'shared' customizable
new Added configure option
chg Explained more generic CountedRef::is_ref(leftv)
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Singular/countedref.cc

    r60da76 rd1fbbf  
    183183}
    184184
    185 /// We use the as a marker of refernce types.
     185/// We use the function pointer as a marker of reference types
     186/// for CountedRef::is_ref(leftv), see the latter for details
    186187BOOLEAN countedref_CheckAssign(blackbox *b, leftv L, leftv R)
    187188{
     
    204205
    205206  /// Check whether argument is already a reference type
     207  /// @note We check for the function pointer @c countedref_CheckAssign here,
     208  /// that we (ab-)use as a unique marker. This avoids to check a bunch of
     209  /// of runtime-varying @c typ IDs for identifying reference-like types.
    206210  static BOOLEAN is_ref(leftv arg) {
    207211    int typ = arg->Typ();
     
    713717
    714718
    715 #ifdef HAVE_DYNAMIC_COUNTEDREF
    716 extern "C" { void mod_init() { countedref_init(); } }
    717 #endif
    718 
  • Singular/countedref.h

    r60da76 rd1fbbf  
    448448void countedref_shared_load();
    449449
    450 //#define  SINGULAR_COUNTEDREF_AUTOLOAD
    451 
    452450inline void
    453451countedref_init()
    454452{
    455 #ifdef SINGULAR_COUNTEDREF_AUTOLOAD
    456453  countedref_reference_load();
    457454  countedref_shared_load();
    458 #endif
    459455}
    460456
  • Singular/extra.cc

    r60da76 rd1fbbf  
    29312931       if (strcmp(sys_cmd, "shared") == 0)
    29322932       {
    2933        #ifndef SINGULAR_COUNTEDREF_AUTOLOAD
     2933       #ifndef SI_COUNTEDREF_AUTOLOAD
    29342934         void countedref_shared_load();
    29352935         countedref_shared_load();
     
    29402940       else if (strcmp(sys_cmd, "reference") == 0)
    29412941       {
    2942        #ifndef SINGULAR_COUNTEDREF_AUTOLOAD
     2942       #ifndef SI_COUNTEDREF_AUTOLOAD
    29432943         void countedref_reference_load();
    29442944         countedref_reference_load();
  • Singular/tesths.cc

    r60da76 rd1fbbf  
    170170   pyobject_setup();
    171171#endif
     172#ifdef SI_COUNTEDREF_AUTOLOAD
    172173  countedref_init();
     174#endif
    173175#ifdef HAVE_FANS
    174176  bbcone_setup();
  • configure.ac

    r60da76 rd1fbbf  
    132132AM_CONDITIONAL(WANT_DEBUG, test x"${ENABLE_DEBUG}" == xyes)
    133133
     134AC_ARG_ENABLE(countedref, AS_HELP_STRING([--enable-countedref], [Enable autoloading of reference counted types]),
     135[if test "x$enableval" = "xyes"; then
     136ENABLE_COUNTEDREF_AUTOLOAD=yes
     137fi], ENABLE_COUNTEDREF_AUTOLOAD=no)
     138
     139if test x"${ENABLE_COUNTEDREF_AUTOLOAD}" == xyes; then
     140  AC_DEFINE([SI_COUNTEDREF_AUTOLOAD],1,[Enable autoloading of reference counted types])
     141  AC_SUBST(SI_COUNTEDREF_AUTOLOAD)
     142fi
     143
    134144AC_CONFIG_SUBDIRS([findexec])
    135145AC_CONFIG_SUBDIRS([omalloc])
Note: See TracChangeset for help on using the changeset viewer.