1. A method for generating a translation of subject code into target code, comprising: identifying a block of self-modifying subject code within a block of subject code; identifying one or more blocks of non-self-modifying code within the block of subject code; partitioning the block of subject code, comprising: generating a first partition in the subject code such that the first partition includes the identified block of self-modifying subject code; generating one or more additional partitions in the subject code such that each additional partition includes one of the identified blocks of non-self-modifying subject code, respectively, wherein subject code in each of the first partition and the one or more partitions do not overlap; translating the first partition into a first block of target code; translating the one or more additional partitions into a corresponding number of additional blocks of target code; and combining the first block of target code and the additional blocks of target code to produce a translated target code.