[regexp] Remove unused flag getter use counters

The compatibility fixes have been standardized.

Bug: chromium:581577
Change-Id: I4ab1df59cbcb4bcbcfe9e3a3c658b2d6b81fe68e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2633539
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72210}
This commit is contained in:
Shu-yu Guo 2021-01-15 15:18:53 -08:00 committed by Commit Bot
parent 352b9ecbdb
commit 61972b112d
3 changed files with 8 additions and 15 deletions

View File

@ -8600,8 +8600,8 @@ class V8_EXPORT Isolate {
kArrayInstanceProtoModified = 27,
kArrayInstanceConstructorModified = 28,
kLegacyFunctionDeclaration = 29,
kRegExpPrototypeSourceGetter = 30,
kRegExpPrototypeOldFlagGetter = 31,
kRegExpPrototypeSourceGetter = 30, // Unused.
kRegExpPrototypeOldFlagGetter = 31, // Unused.
kDecimalWithLeadingZeroInStrictMode = 32,
kLegacyDateParser = 33,
kDefineGetterOrSetterWouldThrow = 34,

View File

@ -21,7 +21,6 @@ transitioning javascript builtin RegExpPrototypeSourceGetter(
const methodName: constexpr string = 'RegExp.prototype.source';
ThrowTypeError(MessageTemplate::kRegExpNonRegExp, methodName);
}
IncrementUseCounter(context, SmiConstant(kRegExpPrototypeSourceGetter));
return '(?:)';
}
}

View File

@ -188,8 +188,7 @@ extern enum Flag constexpr 'JSRegExp::Flag' {
kLinear
}
const kRegExpPrototypeOldFlagGetter: constexpr int31
generates 'v8::Isolate::kRegExpPrototypeOldFlagGetter';
const kNoCounterFlagGetter: constexpr int31 = -1;
const kRegExpPrototypeStickyGetter: constexpr int31
generates 'v8::Isolate::kRegExpPrototypeStickyGetter';
const kRegExpPrototypeUnicodeGetter: constexpr int31
@ -223,8 +222,7 @@ macro FlagGetter(implicit context: Context)(
transitioning javascript builtin RegExpPrototypeGlobalGetter(
js-implicit context: NativeContext, receiver: JSAny)(): JSAny {
return FlagGetter(
receiver, Flag::kGlobal, kRegExpPrototypeOldFlagGetter,
'RegExp.prototype.global');
receiver, Flag::kGlobal, kNoCounterFlagGetter, 'RegExp.prototype.global');
}
// ES6 21.2.5.5.
@ -232,7 +230,7 @@ transitioning javascript builtin RegExpPrototypeGlobalGetter(
transitioning javascript builtin RegExpPrototypeIgnoreCaseGetter(
js-implicit context: NativeContext, receiver: JSAny)(): JSAny {
return FlagGetter(
receiver, Flag::kIgnoreCase, kRegExpPrototypeOldFlagGetter,
receiver, Flag::kIgnoreCase, kNoCounterFlagGetter,
'RegExp.prototype.ignoreCase');
}
@ -241,23 +239,21 @@ transitioning javascript builtin RegExpPrototypeIgnoreCaseGetter(
transitioning javascript builtin RegExpPrototypeMultilineGetter(
js-implicit context: NativeContext, receiver: JSAny)(): JSAny {
return FlagGetter(
receiver, Flag::kMultiline, kRegExpPrototypeOldFlagGetter,
receiver, Flag::kMultiline, kNoCounterFlagGetter,
'RegExp.prototype.multiline');
}
transitioning javascript builtin RegExpPrototypeLinearGetter(
js-implicit context: NativeContext, receiver: JSAny)(): JSAny {
return FlagGetter(
receiver, Flag::kLinear, kRegExpPrototypeOldFlagGetter,
'RegExp.prototype.linear');
receiver, Flag::kLinear, kNoCounterFlagGetter, 'RegExp.prototype.linear');
}
// ES #sec-get-regexp.prototype.dotAll
transitioning javascript builtin RegExpPrototypeDotAllGetter(
js-implicit context: NativeContext, receiver: JSAny)(): JSAny {
const kNoCounter: constexpr int31 = -1;
return FlagGetter(
receiver, Flag::kDotAll, kNoCounter, 'RegExp.prototype.dotAll');
receiver, Flag::kDotAll, kNoCounterFlagGetter, 'RegExp.prototype.dotAll');
}
// ES6 21.2.5.12.
@ -365,8 +361,6 @@ const kRegExpMatchIsTrueishOnNonJSRegExp: constexpr UseCounterFeature
generates 'v8::Isolate::kRegExpMatchIsTrueishOnNonJSRegExp';
const kRegExpMatchIsFalseishOnJSRegExp: constexpr UseCounterFeature
generates 'v8::Isolate::kRegExpMatchIsFalseishOnJSRegExp';
const kRegExpPrototypeSourceGetter: constexpr UseCounterFeature
generates 'v8::Isolate::kRegExpPrototypeSourceGetter';
const kRegExpExecCalledOnSlowRegExp: constexpr UseCounterFeature
generates 'v8::Isolate::kRegExpExecCalledOnSlowRegExp';