Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

surface: Remove redundant Surface generation in methodsOf[A] #3150

Closed
xerial opened this issue Aug 21, 2023 · 0 comments · Fixed by #3149
Closed

surface: Remove redundant Surface generation in methodsOf[A] #3150

xerial opened this issue Aug 21, 2023 · 0 comments · Fixed by #3149

Comments

@xerial
Copy link
Member

xerial commented Aug 21, 2023

Follow-up of #3149. Need to traverse class parameters and method parameters first, and check the Surface dependencies so that the same Surface code doesn't need to be regenerated

xerial added a commit that referenced this issue Aug 21, 2023
…a 3 (#3149)

This fixes byte code too large error when using RxRouter.of[X] or
Surface.methodsOf[X] when class X has many methods and repeated
occurrences of the same parameters.

- Bind surface to local lazy val __s000, __s001, ... and reference them
when building other Surfaces and MethodSurfaces
  - Add a special handling for managing lazy surface
- Fixes #3131 as well 
- Reuse object methods when generating method accessor and object
factory.

Other ideas
- [x] Use externally defined methods for field setter and object builder
- [x] Reuse Surface inside OptionSurface, GenericSurface by analyzing
dependencies of Surface fixes #3150
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant