diff options
Diffstat (limited to 'deps/v8/src/builtins/regexp-source.tq')
-rw-r--r-- | deps/v8/src/builtins/regexp-source.tq | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/deps/v8/src/builtins/regexp-source.tq b/deps/v8/src/builtins/regexp-source.tq index 009e5181dc2..5f9c6b22c3a 100644 --- a/deps/v8/src/builtins/regexp-source.tq +++ b/deps/v8/src/builtins/regexp-source.tq @@ -6,22 +6,22 @@ namespace regexp { - // ES6 21.2.5.10. - // ES #sec-get-regexp.prototype.source - transitioning javascript builtin RegExpPrototypeSourceGetter( - js-implicit context: NativeContext, receiver: JSAny)(): JSAny { - typeswitch (receiver) { - case (receiver: JSRegExp): { - return receiver.source; - } - case (Object): { - } +// ES6 21.2.5.10. +// ES #sec-get-regexp.prototype.source +transitioning javascript builtin RegExpPrototypeSourceGetter( + js-implicit context: NativeContext, receiver: JSAny)(): JSAny { + typeswitch (receiver) { + case (receiver: JSRegExp): { + return receiver.source; } - if (!IsReceiverInitialRegExpPrototype(receiver)) { - const methodName: constexpr string = 'RegExp.prototype.source'; - ThrowTypeError(MessageTemplate::kRegExpNonRegExp, methodName); + case (Object): { } - IncrementUseCounter(context, SmiConstant(kRegExpPrototypeSourceGetter)); - return '(?:)'; } + if (!IsReceiverInitialRegExpPrototype(receiver)) { + const methodName: constexpr string = 'RegExp.prototype.source'; + ThrowTypeError(MessageTemplate::kRegExpNonRegExp, methodName); + } + IncrementUseCounter(context, SmiConstant(kRegExpPrototypeSourceGetter)); + return '(?:)'; +} } |