Closed marekjm closed 8 years ago
Priority of this issue is kind of low. Bytecode size is uint64_t
, this type is also used for function entry-point addresses, jumps and other offsets inside bytecode.
It's also easy to spot where a uint64_t
is not used for bytecode-related things.
For example, during run-time bytecode is not manipulated (except for dynamic module linking), and where the VM accesses the bytecode it does by using specialised classes and functions that have well-defined responsibilities (e.g. Loader
class for loading bytecode) instead of touching the bytecode directly.
In turn, in the assembler, uint64_t
can be safely assumed to mean bytecode size or offset because the assembler does not execute code only produces and analyzes it.
This issue may be reopened in the future, should the need arise.
Bytecode size encoding type (and several other types) should receive a special name (e.g.
BytecodeSize
). This will aid in future refactoring and make it easier to find all places in which it is used.