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•3 years ago
|
| Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 2•2 years ago
|
||
| Assignee | ||
Comment 3•2 years ago
|
||
Depends on D178941
| Assignee | ||
Comment 4•2 years ago
|
||
Depends on D178942
| Assignee | ||
Updated•2 years ago
|
Comment 6•2 years 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•2 years ago
|
||
I accidentally landed only the first patch in the set :(
Comment 9•2 years 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•2 years 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•2 years 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•2 years 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.flagswould triggeronNativeCallwith 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•2 years 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
flagsgetter (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•2 years ago
|
||
Thanks for the extra info :) I'll reland this after the soft freeze is over.
| Assignee | ||
Comment 15•2 years ago
|
||
Depends on D178943
Comment 16•2 years ago
|
||
Comment 17•2 years 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
•