[webkit-reviews] review granted: [Bug 223884] Reduce bytecode instruction count emitted for `class extends` : [Attachment 424707] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Apr 2 13:47:32 PDT 2021
Yusuke Suzuki <ysuzuki at apple.com> has granted Alexey Shvayka
<shvaikalesh at gmail.com>'s request for review:
Bug 223884: Reduce bytecode instruction count emitted for `class extends`
https://bugs.webkit.org/show_bug.cgi?id=223884
Attachment 424707: Patch
https://bugs.webkit.org/attachment.cgi?id=424707&action=review
--- Comment #3 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 424707
--> https://bugs.webkit.org/attachment.cgi?id=424707
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=424707&action=review
r=me
> Source/JavaScriptCore/runtime/ExceptionHelpers.cpp:275
> +static String invalidPrototypeSourceAppender(const String& originalMessage,
const String& sourceText, RuntimeType,
ErrorInstance::SourceTextWhereErrorOccurred occurrence)
> +{
> + if (occurrence == ErrorInstance::FoundApproximateSource)
> + return defaultApproximateSourceError(originalMessage, sourceText);
> +
> + auto extendsIndex = sourceText.reverseFind("extends");
> + if (extendsIndex == notFound || sourceText.find("extends") !=
extendsIndex)
> + return makeString(originalMessage, " (evaluating '", sourceText,
"')");
> +
> + return "The value of the superclass's prototype property is not an
object or null."_s;
> +}
This is awesome.
More information about the webkit-reviews
mailing list