aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrahflow <drahflow@gmx.de>2013-01-05 19:01:23 +0100
committerDrahflow <drahflow@gmx.de>2013-01-05 19:01:23 +0100
commit80a0a5eefedf123ae25966396283e35305c93440 (patch)
treefdbe7b34f71593623d423c8eedf5f94bfb326563
parent301d8355885a7f6c3207ac2e19cab40a6863d1d5 (diff)
Further thoughts on memory layout
-rw-r--r--notes27
1 files changed, 23 insertions, 4 deletions
diff --git a/notes b/notes
index a8be229..99dcba4 100644
--- a/notes
+++ b/notes
@@ -143,13 +143,32 @@ Small set in between
* Exact length
* data (UTF-8)
-=== Struct ===
+=== Struct / Scope ===
* Length in bytes (including header)
bit 63-60: 0 0 1 0
bit 59: reserved for GC
- bit 58: parent pointer exists (for scopes)
- bit 57: extension area pointer exists
-* hashtable name -> offset including headers
+ bit 58: parent pointer exists (for scopes) (always 1 for now)
+ bit 57: extension area pointer exists (always 1 for now)
+* name table (mapping entry names to offsets)
* parent scope (0 if no parent)
* extension area pointer (0 if no extra members (yet))
* data
+ [ <reference> ]*
+
+=== Name Table ===
+( TODO: create a hash-table based implementation here )
+* Length in bytes (including header)
+ bit 63-60: 0 0 1 1
+ bit 59: reserved for GC
+* End of fill in bytes (i.e. if this field == length, table is full)
+* data
+ [ <string reference>, <execution mode> ]*
+ ( TODO: Oh, the performance... )
+ The 0th string maps to 0 and so on.
+
+=== Extension Area ===
+* Length in bytes (including header)
+ bit 63-60: 0 0 1 1
+ bit 59: reserved for GC
+* data
+ [ <reference> ]*