Summary: | Reduce bytecode instruction count emitted for `class extends` | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alexey Shvayka <ashvayka> | ||||||
Component: | JavaScriptCore | Assignee: | Alexey Shvayka <ashvayka> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Enhancement | CC: | ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer, ysuzuki | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Alexey Shvayka
2021-03-29 10:37:12 PDT
Created attachment 424544 [details]
Patch
Created attachment 424707 [details]
Patch
Fix divots to point to correct location.
Comment on attachment 424707 [details] 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. Committed r275439: <https://commits.webkit.org/r275439> All reviewed patches have been landed. Closing bug and clearing flags on attachment 424707 [details]. |