Use direct refcount macros and only call into a helper when refzero happens.
This reduces compiled binary size (!) and has a small positive performance
impact.
Also remove the NULL check for refcounts: call sites where a NULL target value
(duk_tval * or duk_heaphdr *) may occur must use a NULL-tolerant variant
explicitly. This is for performance and to reduce call site size when the
refcount operations are inlined.
Using inline macros is basically the same as a forced inline when using a
good compiler and the single source file model. Macros make this more
portable, and will allow refcount updates to happen even directly from
Duktape API macros later.
- Feature detection.
- Commented out shuffle torture flag to Makefile.
- Compiler fixes to support shuffle torture: must flag even small values
with shuffle prevention flags so that they don't get shuffled forcibly.
These are not bugs as such because small flags fields are never shuffled
in normal operation. But it's cleaner to flag fields semantically anyway.
- Need as variant of loadint helper to avoid shuffling when duk__emit_xxx()
functions emit loadint for indirect opcodes like MPUTOBJI.
- Use negative "no shuffle" marker for output shuffle registers; when
shuffle torture is enabled even a zero register is shuffled.
- Other minor fixes