Refactor JSON parser to decouple allocation
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox114 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(11 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
The current JSON parser is tightly coupled with JSContext and JS::Value/JSObject handling.
To achieve JSContext-free parsing, the parser needs to be decoupled from the allocation of the runtime objects.
We could use a template-based approach similar to FullParseHandler and SyntaxParseHandler,
so that the abstraction itself doesn't affect the performance.
| Assignee | ||
Comment 1•3 years ago
|
||
The later patch will add JSONTokenizer class to store those methods.
| Assignee | ||
Comment 2•3 years ago
|
||
JSONToken is going to be used across tokenizer and parser classes.
Depends on D174559
| Assignee | ||
Comment 3•3 years ago
|
||
Depends on D174560
| Assignee | ||
Comment 4•3 years ago
|
||
Depends on D174561
| Assignee | ||
Comment 5•3 years ago
|
||
Allocation part is going to be moved to handler class later.
Depends on D174562
| Assignee | ||
Comment 6•3 years ago
|
||
Depends on D174563
| Assignee | ||
Comment 7•3 years ago
|
||
JSONFullParseHandler and JSONFullParseHandlerAnyChar corresponds to
FullParseHandler in frontend.
These classes handle allocation and runtime-specific things.
Depends on D174564
| Assignee | ||
Comment 8•3 years ago
|
||
In order to add syntax-parser later, make tokenizer accept template parameter.
Depends on D174565
| Assignee | ||
Comment 9•3 years ago
|
||
Syntax parser does not need string allocation.
Depends on D174566
| Assignee | ||
Comment 10•3 years ago
|
||
Depends on D174567
| Assignee | ||
Comment 11•3 years ago
|
||
To support handler for syntax parser, make the parser templatized for handler.
Depends on D174568
Comment 12•3 years ago
|
||
Comment 13•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/20e31adf0627
https://hg.mozilla.org/mozilla-central/rev/927bc0c48c6d
https://hg.mozilla.org/mozilla-central/rev/f21226706008
https://hg.mozilla.org/mozilla-central/rev/07f59d899003
https://hg.mozilla.org/mozilla-central/rev/8dd802c54fe3
https://hg.mozilla.org/mozilla-central/rev/bbfe63774429
https://hg.mozilla.org/mozilla-central/rev/cfa47a2d2829
https://hg.mozilla.org/mozilla-central/rev/363ef3379606
https://hg.mozilla.org/mozilla-central/rev/a5dd696c30bd
https://hg.mozilla.org/mozilla-central/rev/630daf6fe40f
https://hg.mozilla.org/mozilla-central/rev/8f20eba2a842
Description
•