Skip to content

UPSTREAM PREP: Rules VM 255 variable slots, 4-byte bytecode - #3

Draft
blb4github wants to merge 4 commits into
mainfrom
feature/upstream-rules-255-compact
Draft

blb4github wants to merge 4 commits into
mainfrom
feature/upstream-rules-255-compact

Conversation

@blb4github

Copy link
Copy Markdown
Owner

Intended upstream: CurlyMoo/rules

This is the isolated, upstream-ready source change extracted from the validated HeishaMon Rules VM experiment, staged here because the GitHub integration cannot create PRs in CurlyMoo/rules (HTTP 403).

Summary

Raise named-variable capacity from 127 to 255 while retaining the 4-byte vm_top_t encoding.

Key changes

  • Unsigned interpretation for operands holding global variable slots above 127.
  • Opcode-specific discrimination of high global indices vs negative heap references.
  • Optimizer fixes for high-index OP_SETVAL destinations and signed temporary offsets.
  • Update slot limit diagnostics from 127 to 255.
  • Keep unrelated HeishaMon changes and jump-offset overflow detection OUT of this PR.

Evidence

Review checklist

  • Upstream CI / portability check, including ESP8266 MMU behavior
  • Review opcode-specific unsigned handling
  • Review bytecode ABI compatibility

This is a staging PR for upstream submission; do not merge here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant