summaryrefslogtreecommitdiffstats
path: root/js/src/builtin
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-11-18 13:34:18 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-11-18 13:34:18 +0100
commitbd529c60c67af685de029e2408da3d2bc6980291 (patch)
tree4410771482d5ac6239a9952cb5d15a06cd294ff0 /js/src/builtin
parentf31b04a303607cd82757e7c4f60bb536658c8a30 (diff)
downloadUXP-bd529c60c67af685de029e2408da3d2bc6980291.tar
UXP-bd529c60c67af685de029e2408da3d2bc6980291.tar.gz
UXP-bd529c60c67af685de029e2408da3d2bc6980291.tar.lz
UXP-bd529c60c67af685de029e2408da3d2bc6980291.tar.xz
UXP-bd529c60c67af685de029e2408da3d2bc6980291.zip
Revert "Issue #1284 - Implement /s (dotAll) for regular expressions."
This reverts commit f31b04a303607cd82757e7c4f60bb536658c8a30.
Diffstat (limited to 'js/src/builtin')
-rw-r--r--js/src/builtin/RegExp.cpp24
-rw-r--r--js/src/builtin/RegExp.h2
-rw-r--r--js/src/builtin/RegExp.js5
-rw-r--r--js/src/builtin/SelfHostingDefines.h1
4 files changed, 0 insertions, 32 deletions
diff --git a/js/src/builtin/RegExp.cpp b/js/src/builtin/RegExp.cpp
index 93a7f2b79..7cf20d23c 100644
--- a/js/src/builtin/RegExp.cpp
+++ b/js/src/builtin/RegExp.cpp
@@ -664,29 +664,6 @@ js::regexp_multiline(JSContext* cx, unsigned argc, JS::Value* vp)
return CallNonGenericMethod<IsRegExpInstanceOrPrototype, regexp_multiline_impl>(cx, args);
}
-// ES 2018 dotAll
-MOZ_ALWAYS_INLINE bool
-regexp_dotall_impl(JSContext* cx, const CallArgs& args)
-{
- MOZ_ASSERT(IsRegExpInstanceOrPrototype(args.thisv()));
-
- if (!IsRegExpObject(args.thisv())) {
- args.rval().setUndefined();
- return true;
- }
-
- Rooted<RegExpObject*> reObj(cx, &args.thisv().toObject().as<RegExpObject>());
- args.rval().setBoolean(reObj->dotall());
- return true;
-}
-
-bool
-js::regexp_dotall(JSContext* cx, unsigned argc, JS::Value* vp)
-{
- CallArgs args = CallArgsFromVp(argc, vp);
- return CallNonGenericMethod<IsRegExpInstanceOrPrototype, regexp_dotall_impl>(cx, args);
-}
-
// ES 2017 draft rev32 21.2.5.10.
MOZ_ALWAYS_INLINE bool
regexp_source_impl(JSContext* cx, const CallArgs& args)
@@ -782,7 +759,6 @@ const JSPropertySpec js::regexp_properties[] = {
JS_PSG("source", regexp_source, 0),
JS_PSG("sticky", regexp_sticky, 0),
JS_PSG("unicode", regexp_unicode, 0),
- JS_PSG("dotall", regexp_dotall, 0),
JS_PS_END
};
diff --git a/js/src/builtin/RegExp.h b/js/src/builtin/RegExp.h
index f808f5146..4e0ff6948 100644
--- a/js/src/builtin/RegExp.h
+++ b/js/src/builtin/RegExp.h
@@ -153,8 +153,6 @@ extern MOZ_MUST_USE bool
regexp_sticky(JSContext* cx, unsigned argc, JS::Value* vp);
extern MOZ_MUST_USE bool
regexp_unicode(JSContext* cx, unsigned argc, JS::Value* vp);
-extern MOZ_MUST_USE bool
-regexp_dotall(JSContext* cx, unsigned argc, JS::Value* vp);
} /* namespace js */
diff --git a/js/src/builtin/RegExp.js b/js/src/builtin/RegExp.js
index 1a2276594..0b849292c 100644
--- a/js/src/builtin/RegExp.js
+++ b/js/src/builtin/RegExp.js
@@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// ES6 draft rev34 (2015/02/20) 21.2.5.3 get RegExp.prototype.flags
-// Updated for ES2018 /s (dotAll)
function RegExpFlagsGetter() {
// Steps 1-2.
var R = this;
@@ -32,10 +31,6 @@ function RegExpFlagsGetter() {
// Steps 16-18.
if (R.sticky)
result += "y";
-
- // ES2018
- if (R.dotall)
- result += "s";
// Step 19.
return result;
diff --git a/js/src/builtin/SelfHostingDefines.h b/js/src/builtin/SelfHostingDefines.h
index 6512810ca..d676270a1 100644
--- a/js/src/builtin/SelfHostingDefines.h
+++ b/js/src/builtin/SelfHostingDefines.h
@@ -90,7 +90,6 @@
#define REGEXP_MULTILINE_FLAG 0x04
#define REGEXP_STICKY_FLAG 0x08
#define REGEXP_UNICODE_FLAG 0x10
-#define REGEXP_DOTALL_FLAG 0x20
#define MODULE_OBJECT_ENVIRONMENT_SLOT 2