Framework: Difference between revisions

From Adam Colton
Jump to navigation Jump to search
Line 2: Line 2:


== Memory Management ==
== Memory Management ==
This is (in my opinion) the most important function of the VM - it needs to be very efficient. Obviously I would need to learn a lot (or find someone who already knows a lot) but from what I know now, the best approach seems to be tiered. Start with reference counting, then look for loops. More heavy handed operations like stop-the-world should be avoided if possible.
This is (in my opinion) the most important function of the VM - it needs to be very efficient. I believe I like tri-color mark and sweep best, but I need to learn more.


I would like the GC to perform well out of the box (ootb, but also provide hooks for optimization. The GC-ootb would be non-deterministic, but have hooks to make it deterministic, allowing the program to trigger when it executes. The program should also be able to provide hints to the GC indicating that memory is either still in use or ready to be collected. For instance, this allows the programmer to label ''semantic garbage'' - in code, you can delete a root object and you lose that root reference. If there are other references to it, it will not be deleted, but it can no longer be accessed from its root reference (to do so would be semantically incorrect).
I would like the GC to perform well out of the box (ootb, but also provide hooks for optimization. The GC-ootb would be non-deterministic, but have hooks to make it deterministic, allowing the program to trigger when it executes. The program should also be able to provide hints to the GC indicating that memory is either still in use or ready to be collected. For instance, this allows the programmer to label ''semantic garbage'' - in code, you can delete a root object and you lose that root reference. If there are other references to it, it will not be deleted, but it can no longer be accessed from its root reference (to do so would be semantically incorrect).

Revision as of 15:19, 29 August 2013

The open source community lacks a vm/framework like .Net or the JVM. I think it would be interesting to develop one with no primary language (C# for .Net or Java for the JVM).

Memory Management

This is (in my opinion) the most important function of the VM - it needs to be very efficient. I believe I like tri-color mark and sweep best, but I need to learn more.

I would like the GC to perform well out of the box (ootb, but also provide hooks for optimization. The GC-ootb would be non-deterministic, but have hooks to make it deterministic, allowing the program to trigger when it executes. The program should also be able to provide hints to the GC indicating that memory is either still in use or ready to be collected. For instance, this allows the programmer to label semantic garbage - in code, you can delete a root object and you lose that root reference. If there are other references to it, it will not be deleted, but it can no longer be accessed from its root reference (to do so would be semantically incorrect).

Concurrency

This is where everything is headed. It's important that at the core everything is threaded. I really like the cheap Go threads - I'm interested in learning how they did that. It should be easy to make things threadsafe, shared memory should be discouraged.

Types

There needs to be a type system, but I'm hesitant to get too attached to classical objects. I like the idea of structs with functions and functions as first-class-citizens.\

JIT

Important, but nothing special here. Native code is generated as (or before) it is needed.