Defer GC allocation of BigInts until afer parse is finished.
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
People
(Reporter: mgaudet, Assigned: mgaudet)
References
Details
Attachments
(4 files)
Currently BigInts are allocated as they are parsed, but it would be good to defer them till after parse to help create a pure-parser.
Assignee | ||
Comment 1•5 years ago
|
||
This is a rough draft: There are some issues that need to be decided upon
(below) but I wanted to get this up to ensure the larger level design pieces
pass muster before going too far down the road.
-
It's not clear to me how this is going to interact with the parser error
handling system. It seems to me that this should succeed based on the
comment above ParseBigIntLiteral that says "Called from parser with already
trimmed and validated token.", along with the release assert that there's no
parse error 1 -
This will raise the high water mark of a parse, because we hold onto a copy
of the CharBuffer. There's a hard upper limit of the memory increase
possible of 2x, but, nevertheless, this could be impactful on code that
uses BigInt literals extensively. I don't know that it's avoidable with the
current tokenizer design, as it seems that this buffer already has all the
escapes processed; the only alternative would be to save source coordinates
however, I couldn't seem to figure out how we could get that data from our
current token implementation. -
This is my first time attempting to write move constructors. I'll be honest,
I mostly scattered&&
andstd::move()
until it worked, but I have no
idea what the idiomatic way would be to express the moves I am trying to
express.
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D45556
Updated•5 years ago
|
Assignee | ||
Comment 3•5 years ago
|
||
Also breaks UsedNameTracker into its own header
Assignee | ||
Comment 4•5 years ago
|
||
Pushed by mgaudet@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/197706178905 Mark publishDeferredItems as MOZ_MUST_USE to prevent misuse r=tcampbell https://hg.mozilla.org/integration/autoland/rev/6731b16798c1 Switch ParseContext to consume a ParseInfo directly, rather than decomposing r=tcampbell https://hg.mozilla.org/integration/autoland/rev/14dcedb553f4 Simplify AsmJS handling for deferred allocation r=tcampbell
Assignee | ||
Updated•5 years ago
|
Comment 6•5 years ago
|
||
bugherder |
Pushed by mgaudet@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4af5b90d68a3 Defer BigInt allocation in deferred mode r=tcampbell,jwalden
Comment 8•5 years ago
|
||
Backed out changeset 4af5b90d68a3 (Bug 1580020) for causing a build bustage in /builds/worker/workspace/build/src/js/src/frontend/ParseNode.h CLOSED TREE
https://treeherder.mozilla.org/logviewer.html#?job_id=268618737&repo=autoland
Backout by shindli@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/858991b684ef Backed out changeset 4af5b90d68a3 for causing a build bustage in /builds/worker/workspace/build/src/js/src/frontend/ParseNode.h CLOSED TREE
Comment 10•5 years ago
|
||
Pushed by mgaudet@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/67ab1fa79ea9 Defer BigInt allocation in deferred mode r=tcampbell,jwalden
Comment 11•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Description
•