Implement RegExp v flag with set notation
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox116 | --- | fixed |
People
(Reporter: dminor, Assigned: dminor)
References
(Blocks 2 open bugs)
Details
Attachments
(4 files)
RegExp v flag with set notation is in stage 3, we should implement it.
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Comment 2•1 year ago
|
||
Assignee | ||
Updated•1 year ago
|
Pushed by dminor@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8653abdc9503 Enable test262 tests for Unicode Sets; r=iain
Comment 6•1 year ago
|
||
Backed out for causing SM bustages in test262/*
- Backout link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | test262/built-ins/RegExp/unicodeSets/generated/character-class-escape-difference-character-class.js | (args: "--dll /builds/worker/fetches/injector/libbreakpadinjector.so") [0.0 s]
Assignee | ||
Comment 7•1 year ago
|
||
I accidentally landed only the first patch in the set :(
Pushed by dminor@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5ece69e22ffd Enable test262 tests for Unicode Sets; r=iain https://hg.mozilla.org/integration/autoland/rev/47a50e1c3e11 Add support for Unicode Sets; r=iain https://hg.mozilla.org/integration/autoland/rev/e886a7d39892 Update expectation for debug/Debugger-onNativeCall-06.js; r=iain
Comment 9•1 year ago
•
|
||
Backed out 3 changesets (Bug 1826574) for causing failures in browser_script_command_execute_basic.js CLOSED TREE
Log: https://treeherder.mozilla.org/logviewer?job_id=417536082&repo=autoland&lineNumber=2907
https://treeherder.mozilla.org/logviewer?job_id=417538017&repo=autoland&lineNumber=128136
Backout: https://hg.mozilla.org/integration/autoland/rev/89f599e3ab6aeda059cb121a4baa443cff361a23
Comment 10•1 year ago
|
||
(In reply to Noemi Erli[:noemi_erli] from comment #9)
Backed out 3 changesets (Bug 1826574) for causing failures in browser_script_command_execute_basic.js CLOSED TREE
Log: https://treeherder.mozilla.org/logviewer?job_id=417536082&repo=autoland&lineNumber=2907
https://treeherder.mozilla.org/logviewer?job_id=417538017&repo=autoland&lineNumber=128136Backout: https://hg.mozilla.org/integration/autoland/rev/89f599e3ab6aeda059cb121a4baa443cff361a23
This is a devtools test failing here. eager evaluation of /a/giy.flags
now returns undefined.
From what I can tell, nativeIsEagerlyEvaluateable
(https://searchfox.org/mozilla-central/rev/8dd0d2bebe4c897152da6c86d937e4be80bbaa54/devtools/server/actors/webconsole/eval-with-debugger.js#472), which is called from Debugger.onNativeCall
, is triggered with unicodeSets
, and since it's not in the allow list of RegExp getter, makes the eager evaluation to bail.
The following changes make the test pass again:
diff --git a/devtools/server/actors/webconsole/eager-ecma-allowlist.js b/devtools/server/actors/webconsole/eager-ecma-allowlist.js
--- a/devtools/server/actors/webconsole/eager-ecma-allowlist.js
+++ b/devtools/server/actors/webconsole/eager-ecma-allowlist.js
@@ -217,6 +217,7 @@ const getterAllowList = [
getter(RegExp.prototype, "source"),
getter(RegExp.prototype, "sticky"),
getter(RegExp.prototype, "unicode"),
+ getter(RegExp.prototype, "unicodeSets"),
getter(RegExp, Symbol.species),
getter(Set.prototype, "size"),
getter(Set, Symbol.species),
Comment 11•1 year ago
|
||
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #10)
From what I can tell,
nativeIsEagerlyEvaluateable
(https://searchfox.org/mozilla-central/rev/8dd0d2bebe4c897152da6c86d937e4be80bbaa54/devtools/server/actors/webconsole/eval-with-debugger.js#472), which is called fromDebugger.onNativeCall
, is triggered withunicodeSets
, and since it's not in the allow list of RegExp getter, makes the eager evaluation to bail.
arai, is this expected that evaluating /a/giy.flags
would trigger onNativeCall
with all existing RegExp getters (flags
,hasIndices
,global
,ignoreCase
,multiline
,dotAll
,unicode
,unicodeSets
,sticky
,unicode
,unicodeSets
) ?
That's a bit surprising to me, I'd expect to only have the getters we're trying to execute
Comment 12•1 year ago
|
||
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #11)
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #10)
From what I can tell,
nativeIsEagerlyEvaluateable
(https://searchfox.org/mozilla-central/rev/8dd0d2bebe4c897152da6c86d937e4be80bbaa54/devtools/server/actors/webconsole/eval-with-debugger.js#472), which is called fromDebugger.onNativeCall
, is triggered withunicodeSets
, and since it's not in the allow list of RegExp getter, makes the eager evaluation to bail.arai, is this expected that evaluating
/a/giy.flags
would triggeronNativeCall
with all existing RegExp getters (flags
,hasIndices
,global
,ignoreCase
,multiline
,dotAll
,unicode
,unicodeSets
,sticky
,unicode
,unicodeSets
) ?That's a bit surprising to me, I'd expect to only have the getters we're trying to execute
I'm not arai but I think I can answer this one. The spec for the flags
getter (https://tc39.es/ecma262/#sec-get-regexp.prototype.flags) mandates that each getter is accessed in order to construct the flags string.
Comment 13•1 year ago
|
||
(In reply to Mathias Bynens from comment #12)
I'm not arai but I think I can answer this one. The spec for the
flags
getter (https://tc39.es/ecma262/#sec-get-regexp.prototype.flags) mandates that each getter is accessed in order to construct the flags string.
thanks for the answer, mystery solved :)
Assignee | ||
Comment 14•1 year ago
|
||
Thanks for the extra info :) I'll reland this after the soft freeze is over.
Comment 16•1 year ago
|
||
Pushed by dminor@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2c8973e3bfd5 Enable test262 tests for Unicode Sets; r=iain https://hg.mozilla.org/integration/autoland/rev/adab81d2c9eb Add support for Unicode Sets; r=iain https://hg.mozilla.org/integration/autoland/rev/05729e7c441b Update expectation for debug/Debugger-onNativeCall-06.js; r=iain https://hg.mozilla.org/integration/autoland/rev/cefcde9bc1ca Add unicodeSets getter to eager-ecma-allowlist.js; r=nchevobbe,devtools-reviewers
Comment 17•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2c8973e3bfd5
https://hg.mozilla.org/mozilla-central/rev/adab81d2c9eb
https://hg.mozilla.org/mozilla-central/rev/05729e7c441b
https://hg.mozilla.org/mozilla-central/rev/cefcde9bc1ca
Description
•