From a8b7dc2c48f29de2aff5786beedcbe5bc0f3ac50 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Mon, 25 Jul 2022 20:55:40 -0700 Subject: Document the plan for symbols. --- bytecode/src/data.rs | 10 +++++----- 1 file 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. -- cgit v1.3.1