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

Deprecate phase Check (Prelude) #54

Closed
3 tasks
ChAoSUnItY opened this issue May 13, 2022 · 1 comment
Closed
3 tasks

Deprecate phase Check (Prelude) #54

ChAoSUnItY opened this issue May 13, 2022 · 1 comment
Labels
compiler Relates to compiler itself enhancement New feature or request

Comments

@ChAoSUnItY
Copy link
Member

ChAoSUnItY commented May 13, 2022

Summary

Check (Prelude) is used to emit compiled unchecked files into bytecode and load it in current compilation process, this is needed because ClassWriter::getCommonType(String, String) from ASM lib requires types already exists in JVM environment. But we can override it by checking caching to make sure class exists with our internal type table.

Pros:

By profiling our compiler, it seems it has some relatively heavy performance penalty from ClassLoader::defineClass(byte[]). With this proposal, we can reduce lots of time on compilation.

Cons:

Our typing system needs to be refined so no cached class will be requested to ClassLoader::loadClass(String) calling and throws exception.

Current status

  • Implement type symbol table lookup in CommonClassWriter::getCommonType
  • Remove phase Check (Prelude)
  • Stablize cached class registeration (including separating JVM-loaded class and cached class)
@ChAoSUnItY ChAoSUnItY added enhancement New feature or request compiler Relates to compiler itself labels May 13, 2022
@ChAoSUnItY
Copy link
Member Author

Closed due to compiler rework from #57.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler Relates to compiler itself enhancement New feature or request
Projects
0.0.2 Release
Awaiting triage
Development

No branches or pull requests

1 participant