This massively increases .data size, possibly because loads of unused
globals are included. I'll need to investigate what's going on here. For
now, increase the RAM size for nrf chips (the nrf52 has 64kB of RAM).
Missing features:
* keys other than strings
* more than 8 values in the hashmap
* growing a map when needed
* initial size hint
* delete(m, key)
* iterators (for range)
* initializing global maps
* ...more?
This reverts commit d9ca5f97fb.
There is a problem with coroutines that I haven't solved yet. Reverting
makes it work, for now.
Also, use a better coroutines flag for the LLVM opt tool.
This should make it much easier (in the future) to use the standard
library when unused functions contain unimplemented features. But more
importantly, it makes later passes better and makes compiling faster by
not having to scan dead code.
Previously, mostly the types from the ssa package were used directly
with the types from analysis.go as an overlay. This commit uses these
types everywhere and renames a few things here and there to make things
clearer.
This is a big combined change. Other changes in this commit:
* Analyze makeinterface and make sure type switches don't include
unnecessary cases.
* Do not include CGo wrapper functions in the analyzer callgraph.
This also avoids some unnecessary type IDs.
* Give all Go named structs a name in LLVM.
* Use such a named struct for compiler-generated task data.
* Use the type and function names defined by the ssa and types
package instead of generating our own.
* Some improvements to function pointers.
* A few other minor improvements.
The one thing lacking here is interface-to-interface assertions.