[webkit-reviews] review granted: [Bug 226418] Optimize Function.prototype.toString : [Attachment 430514] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 3 17:02:21 PDT 2021


Saam Barati <sbarati at apple.com> has granted Tadeu Zagallo
<tzagallo at apple.com>'s request for review:
Bug 226418: Optimize Function.prototype.toString
https://bugs.webkit.org/show_bug.cgi?id=226418

Attachment 430514: Patch

https://bugs.webkit.org/attachment.cgi?id=430514&action=review




--- Comment #13 from Saam Barati <sbarati at apple.com> ---
Comment on attachment 430514
  --> https://bugs.webkit.org/attachment.cgi?id=430514
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=430514&action=review

Nice. r=me if you fix the final OOM bug with jsMakeNontrivialString and
asString-ing it.

> Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:10533
> +    speculateCellType(node->child1(), function.gpr(), SpecFunction,
JSFunctionType);

nit: I'd call speculateFunction(node->child1(), function.gpr()) here, so we're
not repeating the contents of it.

> Source/JavaScriptCore/runtime/JSFunction.cpp:255
> +	   return asString(jsMakeNontrivialString(globalObject, "function ",
function->nameString(), "() {\n    [native code]\n}"));

still the same bug as before regarding OOM.


More information about the webkit-reviews mailing list