I will later split it into separate docs, for now just short notes. VM_SECURITY_LEVEL - 0, 1 or 2 I had to choose between speed and safety in many places. Security level 0 means that there are almost no checks. Security level 1 means that only strictly run-time checks are performed, like stack overflow check. Security level 2 means that all checks are on, including stack items type and required number control for all opcodes, check if we are not referencing not defined local variable etc. For a long time we will work on security level 2, but it is designed in such way, that for perfectly generated asm file there is no possibilty of security 2 violation. As we depend on correctness of asm file anyway (I do not perform bytecode checks as java or Tatt's VM) we will be able to move to security level 1 when reliable compiler is done. It will be up to each implementor if he wants to move to security level 0 with considerable VM speedup (20-30% I think) but with cost in safety. (It is reasonable choice if there all programs are tested on level 1). --- How to add an opcode: - add opcode def in vmopcodes.h - add text to opcode entry in asmparser.cpp - add case statement in vmrun.cpp - add description to ../docs/vm/menmon.doc --- DISPLACE_MAGIC It is designed to mark objects which are allocated by 'new' operator in some interface function called by VM and then not put to any location in world. They cannot be put on gc stack too early - because they can be later introduced to world. But on the other side if they are not gc stack, they will never be collected if they are not put into some location. DISPLACE_MAGIC is workaround to mark objects which are created from inside VM and not yet assigned to any place in world.