mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 11:37:46 +00:00
compiler: implement method-set based AssignableTo and Implements (#5304)
* reflect: implement method-set based AssignableTo and Implements Based on the design from #4376 by aykevl. Fixes #4277, fixes #3580. Co-authored-by: Ayke van Laethem <aykevanlaethem@gmail.com> * builder: update expected binary sizes for reflect changes * Make interface checks similar to invoke, allowing typeImplementsMethodSet and method info to be dropped when reflect is not present * Add more tests that BigGo reflect tests * Even more pruning * Add go/token and net/url to passing tests * Prune even further, I am less happy with this, though * Update size test now that we are smaller * Skip some tests * elide method lists * format, oops * fix tests * Add a panic, pull out constant to keep in sync * Add debug info * Remove code that was leftover from a previous refactor --------- Co-authored-by: Ayke van Laethem <aykevanlaethem@gmail.com>
This commit is contained in:
@@ -90,6 +90,9 @@ func interfaceTypeAssert(ok bool) {
|
||||
}
|
||||
}
|
||||
|
||||
// Implemented in the internal/reflectlite package.
|
||||
func typeImplementsMethodSet(actualTypeNum, assertedMethodSet unsafe.Pointer) bool
|
||||
|
||||
// The following declarations are only used during IR construction. They are
|
||||
// lowered to inline IR in the interface lowering pass.
|
||||
// See compiler/interface-lowering.go for details.
|
||||
|
||||
Reference in New Issue
Block a user