Commit graph

44 commits

Author SHA1 Message Date
Alain Zscheile
9c0ad2fa15 feat(vm): reset origin id before calling <origin,ptr,atom> 2022-09-27 17:28:34 +02:00
Alain Zscheile
7580ba28bb fix(bc/pointer): cancel upper two bytes of payload bc they're node-specific 2022-09-27 17:17:27 +02:00
Alain Zscheile
911d662634 feat+rf(vm): replace WrappedPointer with Pointer, reducing stack item size from 48 bytes to 32 2022-09-27 16:43:37 +02:00
Alain Zscheile
6256336a5c refactor(bytecode/pointer): use [u8; 16] instead of (u64, u64)
API BREAK: this changes the computed HMAC
2022-09-27 15:19:33 +02:00
Alain Zscheile
724531eae9 fix(vm): add doesnt_crash baseline test 2022-09-26 05:56:51 +02:00
Alain Zscheile
0bcf710db3 +docs/xor.fgrs 2022-09-26 05:49:41 +02:00
Alain Zscheile
9af713411b feat(vm): Process/ make fields public 2022-09-26 05:09:14 +02:00
Alain Zscheile
db88aa1f3f fix(vm): get rid of unused origin-reliant refcounts 2022-09-26 03:33:31 +02:00
Alain Zscheile
a05ebb7f1e refactor(vm): split cli and library code 2022-09-26 03:29:25 +02:00
Alain Zscheile
0aa63e6c85 fix(bytecode): get rid of redundant 'jump' instruction 2022-09-25 17:08:23 +02:00
Alain Zscheile
7388571a33 feat(bytecode): add ability to insert a deferred local call 2022-09-25 16:50:24 +02:00
Alain Zscheile
7ce7753bae feat(vm): implement NAND on byte vectors of equal length 2022-09-25 15:55:06 +02:00
Alain Zscheile
e65cfa9f91 feat(bytecode): swap should be able to swap the top item with any other in 2^16 range
reason: this is easy to implement as a fast operation in the interpreter, and
reduces the need for a separate "temporary" stack.
2022-09-25 15:05:01 +02:00
Alain Zscheile
b1ea85cf3e feat(bytecode): pop and dup should take 16bit values 2022-09-25 01:58:51 +02:00
Alain Zscheile
de02eba3dc fix(bytecode): make bytecode more compact (inline atom ops; smaller opcodes) 2022-09-25 01:49:38 +02:00
Alain Zscheile
391c478647 refactor(bytecode): OnAtom: build <-> decon (replaces: upper, lower) 2022-09-24 02:07:32 +02:00
Alain Zscheile
6557e172e7 feat: add conditional jumps 2022-09-24 01:49:44 +02:00
Alain Zscheile
b410e7a5b8 refactor(vm): DRY jump safety checks 2022-09-23 23:25:57 +02:00
Alain Zscheile
bc96f9f130 fix(vm): trivial errors found during initial testing 2022-09-23 21:49:12 +02:00
Alain Zscheile
a7c2068b01 refactor(vm): use crate tracing 2022-09-23 21:03:41 +02:00
Alain Zscheile
51438c5568 feat(vm): concatenation of byte vectors 2022-09-23 20:58:13 +02:00
Alain Zscheile
993ce94fbd feat: proper support for local (inside the same module) calls 2022-09-23 20:16:19 +02:00
Alain Zscheile
d5148669b9 refactor(vm): split NOOP_* stuff from rest 2022-09-23 19:57:02 +02:00
Alain Zscheile
17efdff6f5 ~: function calls should be restricted in input arity 2022-09-23 19:41:37 +02:00
Alain Zscheile
94117e5817 fix(vm): make sure that we only jump to jump targets 2022-09-23 18:44:43 +02:00
Alain Zscheile
14e809e0a6 feat(vm): implement proxy support for ocap calls 2022-09-23 18:34:53 +02:00
Alain Zscheile
89124f0b6a feat(vm): tail call optimization 2022-09-23 17:34:08 +02:00
Alain Zscheile
3c15ffa0f3 feat(vm): implement most baseline instructions 2022-09-23 16:22:21 +02:00
Alain Zscheile
12d2a92ada update docs and get rid of Header; use capability model for linking 2022-09-23 14:54:36 +02:00
Alain Zscheile
682eae2833 [WIP] 2022-09-23 14:26:39 +02:00
Alain Zscheile
4021d238d4 feat(bytecode): split Atom ops from MathBinOp's 2022-09-23 12:53:22 +02:00
Alain Zscheile
f8d5100213 fix(bytecode): make sure Atom,Pointer are FFI-safe 2022-09-23 12:34:15 +02:00
Alain Zscheile
acb8346a55 refactor(bytecode): IntEnum DRY 2022-09-23 12:32:15 +02:00
Alain Zscheile
6b6ed6e36a fix(bytecode): we need to be able to deconstruct Pointer 2022-09-23 12:21:29 +02:00
Alain Zscheile
b77b3a14de feat(bytecode): minimal math operations 2022-09-23 12:14:44 +02:00
Alain Zscheile
c5bbf31cf8 feat(bytecode): many small things; proper call tables 2022-09-23 11:39:47 +02:00
Alain Zscheile
2c05579f7a feat(bytecode): +Header 2022-09-23 09:54:36 +02:00
Alain Zscheile
ec6eed9a7f fix(bytecode): make sure the proptest runs long enough 2022-09-23 07:58:06 +02:00
Alain Zscheile
7c992a5c84 more documentation, some opcodes 2022-09-23 07:37:57 +02:00
Alain Zscheile
d09d68cc30 refactor(bytecode): rename PointerKey -> Atom 2022-09-23 06:24:18 +02:00
Alain Zscheile
da124af6d1 refactor(bytecode): rename Type -> ValueType 2022-09-23 05:56:39 +02:00
Alain Zscheile
f9214f54db feat(bytecode): add ability to serialize 2022-09-23 05:52:10 +02:00
Alain Zscheile
e8f10c4f34 feat(bytecode): implement basic Value + parsing 2022-09-23 05:31:02 +02:00
Alain Zscheile
8ed0b781a3 initial commit 2022-09-23 04:45:34 +02:00