Functions indicate which effects they need access to in a bitmap.
This allows the VM to run them in the correct context and combine the multiple VMs into one.
If an op is hit that the effect isn't enabled for then the predicate will panic.
Effects
Some potential effects
State
Looping
Jump Forward
Jump Anywhere
Mutable memory
Read access to previous functions memory
Mutable access to previous functions memory
Panic
Expensive functions like crypto
Implementation
Use a byte at the start of any function and have bit flags for each effect. Max 8 effects
Idea
Functions indicate which effects they need access to in a bitmap. This allows the VM to run them in the correct context and combine the multiple VMs into one. If an op is hit that the effect isn't enabled for then the predicate will panic.
Effects
Some potential effects
Implementation
Use a byte at the start of any function and have bit flags for each effect. Max 8 effects