JS engine modularization: Difference between revisions

Mark as Outdated
(Mark as Outdated)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{OutdatedSpiderMonkey}}
The goal of this project is to ''incrementally'' tease apart JS engine source code into separate "modules" so that:
The goal of this project is to ''incrementally'' tease apart JS engine source code into separate "modules" so that:
* it is easier to understand a module in isolation
* it is easier to understand a module in isolation
Line 12: Line 14:
Additionally, we can use directories to group related modules.  Again, this is primarily useful to assist newcomers in developing a hierarchical understanding of the code.
Additionally, we can use directories to group related modules.  Again, this is primarily useful to assist newcomers in developing a hierarchical understanding of the code.


This is an incremental project.  As developers work on a hunk of code, things tend to be rewritten/refactored into the new SpiderMonkey C++ style; hopefully the developer will consider doing a bit of extra work hoist out coherent hunks of code into new modules according to the following plan of record.
This is an incremental project.  As developers work on a hunk of code, things tend to be rewritten/refactored into the new SpiderMonkey C++ style. Reviewers should require new code or major alterations to follow the new style unless it would be impractical.


== Plan of Record  ==
== Plan of Record  ==
Line 25: Line 27:
* js/src/ds
* js/src/ds
** LifoAlloc, Vector, HashMap/Set, ...
** LifoAlloc, Vector, HashMap/Set, ...
* js/src/methodjit
* js/src/jit
* js/src/tracejit
* js/src/*jit
* js/src/vm: central, execution-mode-independent data structures: types and operations
* js/src/vm: central, execution-mode-independent data structures: types and operations
** [https://bugzilla.mozilla.org/show_bug.cgi?id=644074 Stack]: execution stack (done)
** [https://bugzilla.mozilla.org/show_bug.cgi?id=644074 Stack]: execution stack (done)
52

edits