diff options
author | Myles Borins <mylesborins@google.com> | 2019-09-24 11:56:38 -0400 |
---|---|---|
committer | Myles Borins <myles.borins@gmail.com> | 2019-10-07 03:19:23 -0400 |
commit | f7f6c928c1c9c136b7926f892b8a2fda11d8b4b2 (patch) | |
tree | f5edbccb3ffda2573d70a6e291e7157f290e0ae0 /deps/v8/src/builtins/regexp-replace.tq | |
parent | ffd22e81983056d09c064c59343a0e488236272d (diff) | |
download | android-node-v8-f7f6c928c1c9c136b7926f892b8a2fda11d8b4b2.tar.gz android-node-v8-f7f6c928c1c9c136b7926f892b8a2fda11d8b4b2.tar.bz2 android-node-v8-f7f6c928c1c9c136b7926f892b8a2fda11d8b4b2.zip |
deps: update V8 to 7.8.279.9
PR-URL: https://github.com/nodejs/node/pull/29694
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Diffstat (limited to 'deps/v8/src/builtins/regexp-replace.tq')
-rw-r--r-- | deps/v8/src/builtins/regexp-replace.tq | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/deps/v8/src/builtins/regexp-replace.tq b/deps/v8/src/builtins/regexp-replace.tq index cb0038c6b6..f13724b476 100644 --- a/deps/v8/src/builtins/regexp-replace.tq +++ b/deps/v8/src/builtins/regexp-replace.tq @@ -4,7 +4,7 @@ #include 'src/builtins/builtins-regexp-gen.h' -namespace regexp_replace { +namespace regexp { extern builtin StringIndexOf(implicit context: Context)(String, String, Smi): Smi; @@ -23,10 +23,6 @@ namespace regexp_replace { extern macro RegExpBuiltinsAssembler::AdvanceStringIndexFast(String, Smi, bool): Smi; - extern macro - RegExpBuiltinsAssembler::RegExpPrototypeExecBodyWithoutResultFast( - implicit context: Context)(JSReceiver, String): - RegExpMatchInfo labels IfDidNotMatch; transitioning macro RegExpReplaceCallableNoExplicitCaptures(implicit context: Context)( @@ -57,7 +53,7 @@ namespace regexp_replace { // Element represents the matched substring, which is then passed to the // replace function. case (elString: String): { - const replacementObj: Object = + const replacementObj: JSAny = Call(context, replaceFn, Undefined, elString, matchStart, string); const replacement: String = ToString_Inline(context, replacementObj); matchesElements.objects[i] = replacement; @@ -79,7 +75,7 @@ namespace regexp_replace { // The JSArray is expanded into the function args by Reflect.apply(). // TODO(jgruber): Remove indirection through Call->ReflectApply. - const replacementObj: Object = Call( + const replacementObj: JSAny = Call( context, GetReflectApply(), Undefined, replaceFn, Undefined, elArray); // Overwrite the i'th element in the results with the string @@ -146,8 +142,9 @@ namespace regexp_replace { } while (true) { - const match: RegExpMatchInfo = RegExpPrototypeExecBodyWithoutResultFast( - regexp, string) otherwise break; + const match: RegExpMatchInfo = + regexp::RegExpPrototypeExecBodyWithoutResultFast(regexp, string) + otherwise break; const matchStart: Smi = match.GetStartOfCapture(0); const matchEnd: Smi = match.GetEndOfCapture(0); @@ -172,7 +169,7 @@ namespace regexp_replace { } transitioning builtin RegExpReplace(implicit context: Context)( - regexp: FastJSRegExp, string: String, replaceValue: Object): String { + regexp: FastJSRegExp, string: String, replaceValue: JSAny): String { // TODO(pwong): Remove assert when all callers (StringPrototypeReplace) are // from Torque. assert(Is<FastJSRegExp>(regexp)); @@ -184,7 +181,7 @@ namespace regexp_replace { RegExpReplaceFastGlobalCallable(regexp, string, replaceFn) : StringReplaceNonGlobalRegExpWithFunction(string, regexp, replaceFn); } - case (Object): { + case (JSAny): { const stableRegexp: JSRegExp = regexp; const replaceString: String = ToString_Inline(context, replaceValue); @@ -208,7 +205,7 @@ namespace regexp_replace { } transitioning javascript builtin RegExpPrototypeReplace( - js-implicit context: Context, receiver: Object)(...arguments): Object { + js-implicit context: Context, receiver: JSAny)(...arguments): JSAny { const methodName: constexpr string = 'RegExp.prototype.@@replace'; // RegExpPrototypeReplace is a bit of a beast - a summary of dispatch logic: @@ -229,8 +226,8 @@ namespace regexp_replace { // } // } - const string: Object = arguments[0]; - const replaceValue: Object = arguments[1]; + const string: JSAny = arguments[0]; + const replaceValue: JSAny = arguments[1]; // Let rx be the this value. // If Type(rx) is not Object, throw a TypeError exception. |