civboot / fngi

a readable language that grows from the silicon
The Unlicense
60 stars 3 forks source link

Keys should use TyI #25

Closed vitiral closed 1 year ago

vitiral commented 1 year ago

Right now I have a hacky approach to keys where the Bst.key is a "CStr pointer" that sometimes points to a type.

This is no good. I should have a key struct

typedef struct { Slc* name; TyI* tyI;    } Key;

I also should have a BST of all TyI's (and TyI prefixes!) so I am not duplicating them.

vitiral commented 1 year ago

For signatures, most of the allocations happen in scanTyI which currently use g.bbaDict.

This is true in var, inp and stk.

I think I'm interested in anywhere where TyI_asSll is called, as well as anywhere that reserves space for a TyI.

Basic design: