Dazo-org/zerovm — Issue #14: Hotvalidation
Author: camuel
Created: 2011-11-29 23:56:19+00:00
State: open
Labels: MINOR, RESEARCH

In many scenarios it is desirable to generate code that solves problem and execute it rather then trying to solve the problem directly. For example consider regex search, if done directly it is essentially repetitious interpretation of regex and when regex is compiled to executable code this is a run of compiled version of regex that is about 10 times faster.

When resorting to compiling it is desirable to compile to native code rather then to some intermediary code (like various 'bytecodes'), otherwise it just one interpretation replaced by another.

Now, the compilation to native code is not possible because self-modifying code is prohibited. Hence the proposal to allow self modifying code provided it calls agreed upon syscall that would "hot" validate generated piece of native code and then place it is into allowed-to-execute region in memory.