Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: mkatz@garlic.stanford.EDU (Morris Katz) Newsgroups: comp.lang.scheme Subject: Are numbers self evaluating? Message-ID: <9102271721.AA20945@garlic.Stanford.EDU> Date: 27 Feb 91 17:21:18 GMT References: <1991Feb26.205210.21352@cunixf.cc.columbia.edu> Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 28 Date: 26 Feb 91 20:52:10 GMT From: "Adam M. Heyman" Organization: Columbia University While fooling around with MIT Scheme 7.1, found this interesesting phenomena. Apparently, multidigit numbrs are not self evaluating, they need to go through adds (+) and multiplies (*) in order to evaluate. What follows is an edited journal of a session: (trace +) Automagically impurifying an object... ;;What the heck does this mean? The MIT Cscheme heap is divided into three sections: constant space, pure space, and the normal heap. Pure space contains objects which contain ,no pointers back to objects in the normal heap. This means that objects in pure space do not have to be scanned at GC time. This is basically a poor mans generation scheme. When you trace a procedure in Cscheme, a field in the closure for that procedure is modifed to point to the trace code. This code lives in the normal heap. Since + is installed in pure space by default, tracing it would cause a pointer to exist from pure space to the normal heap, violating the invarient. The Cscheme system handles this problem by impurifying + by moving it from pure space to the normal heap before instaling the tracing pointer in the closure. -------------------- Morry Katz katz@cs.stanford.edu --------------------