Remove ModifierException
Categories
(Core :: JavaScript Engine, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: jorendorff, Assigned: jorendorff)
References
Details
Attachments
(7 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
ModifierException is part of an assertion scheme that checks our handling of the division operator and RegExp literals. The idea is that the choice of Modifier is error-prone, and it's good to ensure we're making those decisions consistently, and for good reasons.
Unfortunately the assertion scheme itself is also quite complex. "Now you have two problems."
I think there's an easier way to think about the problem that leads to simpler assertions.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
It turns out to be vestigial. The comment being deleted here says,
"Comma/semicolon cases are also gotten as operators (None)", but this is no
longer true. Both are scanned as Operand now; and so are RightCurly,
RightParen, and the various other tokens listed in yieldExpression(), for which
an exception was once necessary.
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D25310
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D25311
Assignee | ||
Comment 4•5 years ago
|
||
Also renames ModifierException::OperandIsNone -> AllowRegExpOK, although it
doesn't matter too much, as its days are numbered.
Depends on D25310
Assignee | ||
Comment 5•5 years ago
|
||
This helps us get rid of several uses of addModifierException, as the next few
patches show. It will also be used to implement ASI for fields. (In most
contexts, the next token after a missing semicolon needs to be scanned in
AllowRegExp mode. In a ClassBody it's different; the next token must be neither
Div nor RegExp in a syntactically valid program.)
Depends on D25818
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
Depends on D25312
Assignee | ||
Comment 7•5 years ago
|
||
propertyName() has three callers, corresponding to ObjectLiteral,
ObjectBindingPattern, and ClassDeclaration. In each case the next token must be
neither Div nor RegExp.
Depends on D25820
Updated•5 years ago
|
Assignee | ||
Comment 8•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=f2e2a44cdc898c7b509908f075be7ad7d8e9f539
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Pushed by jorendorff@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7114c39413db Part 1: Delete ModifierException::NoneIsOperand. r=jwalden https://hg.mozilla.org/integration/autoland/rev/b595a64f80d7 Part 2: Rename TokenStream::Operand -> SlashIsRegExp and TokenStream::None -> SlashIsDiv. r=jwalden https://hg.mozilla.org/integration/autoland/rev/7e5d87cbcefe Part 3: Add Modifier::SlashIsInvalid. r=jwalden https://hg.mozilla.org/integration/autoland/rev/7abd8fbb2582 Part 4: Use Modifier::SlashIsInvalid in mustMatchToken(). r=jwalden https://hg.mozilla.org/integration/autoland/rev/a0869df70525 Part 5: Remove modifier exceptions rendered unnecessary by using SlashIsInvalid mode in mustMatchToken(). r=jwalden https://hg.mozilla.org/integration/autoland/rev/06ad5997d161 Part 6: Remove ModifierExceptions for propertyName(). r=jwalden https://hg.mozilla.org/integration/autoland/rev/4531b9532bd9 Part 7: Remove ModifierException. r=jwalden
Comment 10•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7114c39413db
https://hg.mozilla.org/mozilla-central/rev/b595a64f80d7
https://hg.mozilla.org/mozilla-central/rev/7e5d87cbcefe
https://hg.mozilla.org/mozilla-central/rev/7abd8fbb2582
https://hg.mozilla.org/mozilla-central/rev/a0869df70525
https://hg.mozilla.org/mozilla-central/rev/06ad5997d161
https://hg.mozilla.org/mozilla-central/rev/4531b9532bd9
Updated•5 years ago
|
Description
•