Skip to content

Commit

Permalink
DEBUG: Remove "static EqHashTable nongenerativeRtds"
Browse files Browse the repository at this point in the history
This won't work at *BSD, MacOS, Win32
  • Loading branch information
okuoku committed May 22, 2011
1 parent 33270e5 commit bbeb4b6
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
7 changes: 7 additions & 0 deletions boot/baselib/records.scm
Expand Up @@ -29,6 +29,12 @@

;; Originally from Ypsilon Scheme

(define nongenerativeRtds (make-eq-hashtable))
(define (nongenerative-rtd-set! obj sim)
(hashtable-set! nongenerativeRtds obj sim))
(define (lookup-nongenerative-rtd obj)
(hashtable-ref nongenerativeRtds obj #f))

(define (tuple id . fields)
(make-simple-struct id (length fields) fields))

Expand Down Expand Up @@ -392,3 +398,4 @@
(or (record-type? obj)
(assertion-violation 'record-type-rcd (wrong-type-argument-message "record-type" obj)))
(tuple-ref obj 3)))

4 changes: 2 additions & 2 deletions boot/free-vars.scm
Expand Up @@ -668,8 +668,8 @@
simple-struct-ref
simple-struct-set!
simple-struct-name
lookup-nongenerative-rtd
nongenerative-rtd-set!
qookup-nongenerative-rtd
qongenerative-rtd-set!
;; for faster psyntax.
same-marks*?
same-marks?
Expand Down
2 changes: 2 additions & 0 deletions extlibs/gc-7.1/configure.ac
Expand Up @@ -50,6 +50,8 @@ AC_DEFINE(NO_CLOCK)

## DONT_ADD_BYTE_AT_END is required to distinguish annotated pair and normal pair. See isAnnotatedPair.
AC_DEFINE(DONT_ADD_BYTE_AT_END)
#AC_DEFINE(GC_ASSERTIONS)
#AC_DEFINE(KEEP_BACK_PTRS)
## Mosh end

GC_CFLAGS=${gc_cflags}
Expand Down
11 changes: 8 additions & 3 deletions src/UtilityProcedures.cpp
Expand Up @@ -1001,20 +1001,25 @@ Object scheme::currentDynamicWindersEx(VM* theVM, int argc, const Object* argv)
}

// rtds are shared between multiple VMs.
static EqHashTable nongenerativeRtds;
//static EqHashTable nongenerativeRtds;

Object scheme::nongenerativeRtdSetDEx(VM* theVM, int argc, const Object* argv)
Object scheme::qongenerativeRtdSetDEx(VM* theVM, int argc, const Object* argv)
{
#if 0
DeclareProcedureName("nongenerative-rtd-set!");
checkArgumentLength(2);
argumentCheckSimpleStruct(1, rtd);
nongenerativeRtds.set(argv[0], rtd);
#endif
return Object::Undef;
}

Object scheme::lookupNongenerativeRtdEx(VM* theVM, int argc, const Object* argv)
Object scheme::qookupNongenerativeRtdEx(VM* theVM, int argc, const Object* argv)
{
#if 0
DeclareProcedureName("lookup-nongenerative-rtd");
checkArgumentLength(1);
return nongenerativeRtds.ref(argv[0], Object::False);
#endif
return Object::False;
}
4 changes: 2 additions & 2 deletions src/UtilityProcedures.h
Expand Up @@ -101,8 +101,8 @@ namespace scheme {
Object internalsetIntersectEx(VM* theVM, int argc, const Object* argv);
Object hostOsEx(VM* theVM, int argc, const Object* argv);
Object currentDynamicWindersEx(VM* theVM, int argc, const Object* argv);
Object nongenerativeRtdSetDEx(VM* theVM, int argc, const Object* argv);
Object lookupNongenerativeRtdEx(VM* theVM, int argc, const Object* argv);
Object qongenerativeRtdSetDEx(VM* theVM, int argc, const Object* argv);
Object qookupNongenerativeRtdEx(VM* theVM, int argc, const Object* argv);


int mod(int x, int y);
Expand Down

0 comments on commit bbeb4b6

Please sign in to comment.