surface: Remove redundant suface generation
xerial opened this issue · comments
Taro L. Saito commented
Surface.methodOf[X] may cause "bytecode too large" error because it always generate Surface generation code in Scala 3. In Scala 2, runtime-reflection was used to compute Surface at run-time, so the bytecode was small.
A basic approach would be:
- Collect all input and return types
- Generate Surface without redundancy and put them in a Set
- Build MethodSurface using the pre-build Surfaces