rework vm file format #7

Merged
fernando merged 68 commits from develop into main 2026-06-23 21:35:54 +00:00
Owner
No description provided.
Reviewed-on: fernando/thp-vm#1
Reviewed-on: fernando/thp-vm#3
Reviewed-on: fernando/thp-vm#2
feat: jenkinsfile build
All checks were successful
naravm/pipeline/head This commit looks good
2c87674d8b
Reviewed-on: #4
Pushes needed RIP/RSP to the stack, updates RIP/RSP/RBP for the new
frame
On op_call setup better registers, fix some pointer bugs. Implement
op_ret to handle the entrypoint or additional frames.
Reviewed-on: #5
Fixes tests broken & left unfixed after the 0.15.1 writergate
scandal.
This commit creates a test for calling a "function" (create a chunk,
store it, load it, .op_call & .op_ret).

However, it revealed a limitation: for a ObjectFunction to receive a
Chunk, this last one **must** be created with the same allocator, for
the ObjectFunction will `destroy` it. This means one cant use a local
variable, or a single chunk from an array, or other allocation patterns
other than `destroy`.

This could be fixed by always requiring the caller to pass a chunk, and
leaving cleanup to them. Will investigate further.
Reviewed-on: #6
- parse & fmt bytecode header
- parse values section len
- parse blob section
- parse constants section & log
- parse functions section
- read vmfile from stdin
- parse vmfile
- create VM
- run VM with code from vmfile
- mark regression on **all** opcodes
- Resolve identities through vm manager
- restore load opcodes
- restore opcodes that deal w registers
- dissasemble opcodes on deserialization debug
- use proper name for disassemble & related 
- serialize to disk
- finish opcode dissasembly
- move human readable printing of vmfile to its own file
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
fernando/naravm!7
No description provided.