diff --git a/README.md b/README.md index bc3ce7a..d39f0b1 100644 --- a/README.md +++ b/README.md @@ -31,36 +31,13 @@ $ just build $ ls -l zig-out/bin/zlox -rwxr-xr-x 1 mycroft mycroft 2823296 Aug 25 15:36 zig-out/bin/zlox +$ set -x TRACE $ just run zig build run -> 2*3 + 3*4 -== code == -0000 1 OP_CONSTANT 0 '2' -0002 | OP_CONSTANT 1 '3' -0004 | OP_MULTIPLY -0005 | OP_CONSTANT 2 '3' -0007 | OP_CONSTANT 3 '4' -0009 | OP_MULTIPLY -000a | OP_ADD -== end of code == +== Hash table count:0 capacity:0 == +== End of hash table == -0000 1 OP_CONSTANT 0 '2' - [ 2 ] -0002 | OP_CONSTANT 1 '3' - [ 2 ][ 3 ] -0004 | OP_MULTIPLY - [ 6 ] -0005 | OP_CONSTANT 2 '3' - [ 6 ][ 3 ] -0007 | OP_CONSTANT 3 '4' - [ 6 ][ 3 ][ 4 ] -0009 | OP_MULTIPLY - [ 6 ][ 12 ] -000a | OP_ADD - [ 18 ] -000b 2 OP_RETURN -18 -> !(5 - 4 > 3 * 2 == !nil) +zlox> print !(5 - 4 > 3 * 2 == !nil); == code == 0000 1 OP_CONSTANT 0 '5' 0002 | OP_CONSTANT 1 '4' @@ -73,6 +50,7 @@ zig build run 000c | OP_NOT 000d | OP_EQUAL 000e | OP_NOT +000f | OP_PRINT == end of code == 0000 1 OP_CONSTANT 0 '5' @@ -97,7 +75,11 @@ zig build run [ false ] 000e | OP_NOT [ true ] -000f 2 OP_RETURN +000f | OP_PRINT true -> +0010 2 OP_RETURN +== Hash table count:0 capacity:0 == +== End of hash table == + +zlox> ```