| Index: src/js/regexp.js
|
| diff --git a/src/js/regexp.js b/src/js/regexp.js
|
| index 2640726fdf1f5b8ab42868f31e631015f2f3a35f..49da45b84c82e28606c0b552b80f14ef22737ef8 100644
|
| --- a/src/js/regexp.js
|
| +++ b/src/js/regexp.js
|
| @@ -81,37 +81,6 @@ function PatternFlags(pattern) {
|
| }
|
|
|
|
|
| -// ES#sec-regexp-pattern-flags
|
| -// RegExp ( pattern, flags )
|
| -function RegExpConstructor(pattern, flags) {
|
| - var newtarget = new.target;
|
| - var pattern_is_regexp = IsRegExp(pattern);
|
| -
|
| - if (IS_UNDEFINED(newtarget)) {
|
| - newtarget = GlobalRegExp;
|
| -
|
| - // ES6 section 21.2.3.1 step 3.b
|
| - if (pattern_is_regexp && IS_UNDEFINED(flags) &&
|
| - pattern.constructor === newtarget) {
|
| - return pattern;
|
| - }
|
| - }
|
| -
|
| - if (IS_REGEXP(pattern)) {
|
| - if (IS_UNDEFINED(flags)) flags = PatternFlags(pattern);
|
| - pattern = REGEXP_SOURCE(pattern);
|
| -
|
| - } else if (pattern_is_regexp) {
|
| - var input_pattern = pattern;
|
| - pattern = pattern.source;
|
| - if (IS_UNDEFINED(flags)) flags = input_pattern.flags;
|
| - }
|
| -
|
| - var object = %_NewObject(GlobalRegExp, newtarget);
|
| - return RegExpInitialize(object, pattern, flags);
|
| -}
|
| -
|
| -
|
| // ES#sec-regexp.prototype.compile RegExp.prototype.compile (pattern, flags)
|
| function RegExpCompileJS(pattern, flags) {
|
| if (!IS_REGEXP(this)) {
|
| @@ -973,9 +942,6 @@ function RegExpSpecies() {
|
|
|
| // -------------------------------------------------------------------
|
|
|
| -%FunctionSetInstanceClassName(GlobalRegExp, 'RegExp');
|
| -%SetCode(GlobalRegExp, RegExpConstructor);
|
| -
|
| utils.InstallGetter(GlobalRegExp, speciesSymbol, RegExpSpecies);
|
|
|
| utils.InstallFunctions(GlobalRegExp.prototype, DONT_ENUM, [
|
|
|