Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.7.0.10 $; site ccvaxa Path: utzoo!watmath!clyde!cbosgd!ihnp4!inuxc!pur-ee!uiucdcs!ccvaxa!aglew From: aglew@ccvaxa.UUCP Newsgroups: net.arch Subject: Re: Addressing modes (conditional branc Message-ID: <5100019@ccvaxa> Date: Mon, 3-Mar-86 01:24:00 EST Article-I.D.: ccvaxa.5100019 Posted: Mon Mar 3 01:24:00 1986 Date-Received: Tue, 4-Mar-86 05:07:23 EST References: <546@tekcrl.UUCP> Lines: 18 Nf-ID: #R:tekcrl.UUCP:546:ccvaxa:5100019:000:852 Nf-From: ccvaxa.UUCP!aglew Mar 3 00:24:00 1986 We DO have the formal discipline to use self-modifying code: it's called incremental compilation. For some specific instance of a general routine with all sorts of ifs depending on parameters values, take a general prototype with all the ifs in it, compile only the parts you need into a buffer, and then execute that buffer. Note: this is at the module level, not the machine instruction level. Self-modifying code at the instruction level will just always be too machine dependent to become formalized as standard practice. Doing things at the module level doesn't mean that we're losing too much efficiency, on the new machines that support function calls well. By the way, such compilations into buffers DO NOT make programs non-reentrant - you just have to have a concept of more than one code (text) segment, some pure and shared, others not.