Confirmed users
367
edits
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
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 | ||
* it is easier to get a high-level breakdown of SM code | * it is easier to get a high-level breakdown of SM code | ||
| Line 13: | Line 11: | ||
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. | |||
== Plan of Record == | == Plan of Record == | ||
A [https://bugzilla.mozilla.org/show_bug.cgi?id=653057 meta bug] tracks bugs for individual pieces. This document serves to collect consensus of the direction we'd like things to head. | |||
A meta bug tracks bugs for individual pieces | |||
Preliminary directory/module structure: | Preliminary directory/module structure: | ||
| Line 28: | Line 26: | ||
* js/src/tracejit | * js/src/tracejit | ||
* js/src/*jit | * 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) | ||
** Value: JS value representation | ** Value: JS value representation | ||
** String: JS string value representation | ** [https://bugzilla.mozilla.org/show_bug.cgi?id=665189 String]: JS string value representation | ||
** Perhaps these next two need short distinctive names: | ** Perhaps these next two need short distinctive names: | ||
*** Low-level object representation: property tree, shapes, and raw object storage | *** Low-level object representation: property tree, shapes, and raw object storage | ||
| Line 40: | Line 38: | ||
*** Function: (object) perhaps also contains closely-related JSFunctino/JSScript/Bindings? | *** Function: (object) perhaps also contains closely-related JSFunctino/JSScript/Bindings? | ||
* js/src/gc: garbage collector data structures and algorithms | * js/src/gc: garbage collector data structures and algorithms | ||
* js/src/parser: its not entirely clear how to cleanly break this into pieces, other than treating the whole thing as a module that takes in chars and puts out JSScripts | |||
* js/src/parser: | |||
* js/src/builtin: builtins specified by JS language spec (e.g., String, Array.prototype.sort) | * js/src/builtin: builtins specified by JS language spec (e.g., String, Array.prototype.sort) | ||
** String | ** String | ||