aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRose Hogenson <rhogenson@posteo.net>2022-07-25 20:55:40 -0700
committerRose Hogenson <rhogenson@posteo.net>2022-07-25 20:55:40 -0700
commita8b7dc2c48f29de2aff5786beedcbe5bc0f3ac50 (patch)
tree297d1ceaf2dd744290df4dacd10c2a27c9fc390b
parent63a7c0103c47e3735f7d21e9666124924be9e18e (diff)
downloadchromatopelma-a8b7dc2c48f29de2aff5786beedcbe5bc0f3ac50.tar.zst
Document the plan for symbols.
-rw-r--r--bytecode/src/data.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/bytecode/src/data.rs b/bytecode/src/data.rs
index 9735fa9..4331f46 100644
--- a/bytecode/src/data.rs
+++ b/bytecode/src/data.rs
@@ -1,16 +1,16 @@
// The data representations of values of different types are given below.
-// - Nil is represented as 0.
// - Pointers are 64 bit unsigned (positive) ints which are
// word-aligned, i.e. 0 mod 8. All types not listed below are
// allocated on the heap behind a pointer.
// - Int:
// < 63-bit signed int > 1
// Ints are a 63 bit int with a 1 in the low bit.
-// - Booleans are 2 mod 8:
-// - True is 0xA
+// - Booleans and nil are 2 mod 8:
// - False is 0x2
-// - A char's low 4 bytes are always 0x4, and the high 4 bytes are a
-// unicode code point value.
+// - True is 0xA
+// - Nil is 0x12
+// - A symbol's low byte is 0x4, and the high 56 bytes are an unsigned integer constant
+// representing a pointer into the symbol table.
//
// n.b. 6 mod 8 is unused.