mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-15 00:13:43 +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:
@@ -22,11 +22,3 @@ func TestOptimizeStringEqual(t *testing.T) {
|
||||
transform.OptimizeStringEqual(mod)
|
||||
})
|
||||
}
|
||||
|
||||
func TestOptimizeReflectImplements(t *testing.T) {
|
||||
t.Parallel()
|
||||
testTransform(t, "testdata/reflect-implements", func(mod llvm.Module) {
|
||||
// Run optimization pass.
|
||||
transform.OptimizeReflectImplements(mod)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user