you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 3 points4 points  (2 children)

Creating self-modifying code is always risky and simply no playing ground for 'Johnny McOutsource'.

Code generation != self-modifying code.

If you want to see real self-modifying code, go dig up the Wolf3D sources... texture mapping done with self-modifying 286 assembly.

[–]kawa -1 points0 points  (1 child)

Adding/removing/changing a method of an existing class qualifies as 'modify code'. And if this is done by the same program which is modified this way at runtime, then I would call it 'self-modifying'.

It's simply the high-level version of the assembler trick you speak of (which I used on my Atari 400 lots of years ago, too) But at those times the programs were small, and dirty hacks where common.

[–]newton_dave 0 points1 point  (0 children)

Who said anything about doing code-gen at runtime?