mosa / MOSA-Project

Managed Operating System Alliance Project
https://www.mosa-project.org/
Other
413 stars 80 forks source link

Add Method Scanner #50

Open mosa opened 10 years ago

mosa commented 10 years ago

The method scanner only compiles methods that are actually by the application. Also, called "tree shake".

Reducing the number of method required to compile an application can significantly shorten the compilation time and memory requirements.

It will also be valuable for low memory platforms.

--- Want to back this issue? **[Place a bounty on it!](https://www.bountysource.com/issues/2343345-add-method-scanner?utm_campaign=plugin&utm_content=tracker%2F403669&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F403669&utm_medium=issues&utm_source=github).
charsleysa commented 10 years ago

I think this feature should only be used in environments which will have no reflection / dynamic method calls / post OS-compilation libraries and drivers as this will break functionality.

tgiphil commented 5 years ago

Tasks [incomplete]:

  1. Track which types are allocated (via new).
  2. Track which static and virtual methods are used.

x. Skip emitting RTTI & reflection metadata when type (and derived type) is never allocated, or method never called.

tgiphil commented 5 years ago

Nearly complete; working on edge cases related to interfaces and method references.

tgiphil commented 1 year ago

+HELP WANTED:

It's been a few years since this was implemented. It would be valuable to enable the feature and report back on any errors, and troubleshoot and fix them as well.