mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-11 14:33:41 +00:00
compiler: Implement interface calls
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.
This commit is contained in:
@@ -72,3 +72,6 @@ Implemented analysis passes:
|
||||
sleep, chan send, etc. It's parents are also blocking.
|
||||
* Check whether the scheduler is needed. It is only needed when there are `go`
|
||||
statements for blocking functions.
|
||||
* Check whether a given type switch or type assert is possible with
|
||||
[type-based alias analysis](https://en.wikipedia.org/wiki/Alias_analysis#Type-based_alias_analysis).
|
||||
I would like to use flow-based alias analysis in the future.
|
||||
|
||||
Reference in New Issue
Block a user