Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!hplabs!otter!kers From: kers@otter.hple.hp.com (Christopher Dollin) Newsgroups: comp.arch Subject: Re: self-modifying code Message-ID: <780003@otter.hple.hp.com> Date: 18 Feb 88 15:55:29 GMT References: <486@taux01.UUCP> Organization: Hewlett-Packard Laboratories, Bristol, UK. Lines: 32 "yuval@taux01.UUCP (Gideon Yuval)" says: > Is good support for self-modifying code a real issue? all CPUs support a > "modify code -- invalidate all caches -- execute" cycle, which is enough to > run (say) loaders & debuggers; i THINK this is enough for all real > applications, but want to be sure. That depends. In the Poplog environment, for example, user code (Pop11, Prolog, ML, Common Lisp) is compiled to native code by an incremental compiler. You could call this "loading", but I suspect that many people will think of a loader as being something that loads rather larger peices of code than individual procedures. What's more, the Pop11 "partial application" feature, whereby a procedure is constructed from a base procedure by supplying some of its arguments, also involves the creation of new procedure records in the store. While the compiler is not often invoked repeatedly in user code, partial application (and to a lesser extend procedure composition) is. This means that code cache flushing might happen rather often. Strictly, none of this is "self-modifying" code, since the procedures are constructed as data-objects before being used. But the data cache has to be flushed first. Of course, some peiple might say that a mixed-language incremental development system with integrated editor wasn't a "real" application..................... Regards, Kers | "Why Lisp if you can talk Poperly?"