|
|
|
When the compile compile method is called with arguments pattern and flags , the following steps are taken: 1. Let O be the this value. 2. Perform ? ( O , [[RegExpMatcher]]). 3. If ( pattern ) is Object and pattern has a [[RegExpMatcher]] internal slot, then a. If flags is not undefined , throw a TypeError exception. b. Let P be pattern .[[OriginalSource]]. c. Let F be pattern .[[OriginalFlags]]. 4. Else, a. Let P be pattern . b. Let F be flags . 5. Return ? O , P , F ). NOTE The following Early Error rule is added to those in . This rule is not applied under any of the following circumstances: when appears in a context where is required, when initially parsing a CoverParenthesizedExpressionAndArrowParameterList CoverCallExpressionAndAsyncArrowHead : {
} {
,
} It is a Syntax Error if contains any duplicate entries for "__proto__" and at least two of those entries were obtained from productions of the form
:
: . NOTE algorithm for the production
:
:
is replaced with the following definition: The compile compile method completely reinitializes the this value RegExp with a new pattern and flags. An implementation may interpret use of this method as an assertion that the resulting returned by does not include string literal property names defined as using a . B.2.5 Additional Properties of the RegExp.prototype Object B.2.5.1 RegExp.prototype.compile ( pattern , flags ) B.3 Other Additional Features B.3.1 __proto__ Property Names in Object Initializers 858 |