Closed jclark closed 3 years ago
A good implementation strategy would be Python's "compact dict" data structure. https://morepypy.blogspot.com/2015/01/faster-more-memory-efficient-and-more.html
See also: https://blog.toit.io/hash-maps-that-dont-hate-you-1a96150b492a
This is a good balanced overview https://bigdata.uni-saarland.de/publications/p249-richter.pdf
This introduces a new type descriptor
map<any>
.map<any>
{ "xyz": E }
- allowed in same syntactic contexts as list constructorsExisting syntax extended:
===
,!==
io:println
handles mapsE[k]
M[k] = E
<map<any>>E
This depends on #130.
Implementation steps:
MappingConstruct
BIR instruction and generate from the ASTMappingConstruct
BIRmap<any>
type descriptormap<any>
map:length
langlib functionmap<any>
E[k]
andMappingGet
BIR insnv[k] = n
withMappingSet
BIR insn