[webkit-reviews] review granted: [Bug 212645] SpeculativeJIT::compileDateGet()'s slow path does need a exception check. : [Attachment 401003] proposed patch.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jun 3 23:54:16 PDT 2020
Yusuke Suzuki <ysuzuki at apple.com> has granted Mark Lam <mark.lam at apple.com>'s
request for review:
Bug 212645: SpeculativeJIT::compileDateGet()'s slow path does need a exception
check.
https://bugs.webkit.org/show_bug.cgi?id=212645
Attachment 401003: proposed patch.
https://bugs.webkit.org/attachment.cgi?id=401003&action=review
--- Comment #4 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 401003
--> https://bugs.webkit.org/attachment.cgi?id=401003
proposed patch.
View in context: https://bugs.webkit.org/attachment.cgi?id=401003&action=review
r=me
> Source/JavaScriptCore/ChangeLog:3
> + SpeculativeJIT::compileDateGet()'s slow path does need a exception
check.
/does/does not/
> Source/JavaScriptCore/ChangeLog:33
> + The patch also proves that all the operation functions cannot throw
any exceptions.
> + Previously, the operations passes a VM& to the Date functions. The
purpose for
> + doing this is so that the Date functions can work with a few date
cache data
> + structures stored as VM fields.
> +
> + This patch refactors those VM fields into a VM::DateCache struct,
and changed all
> + those Date functions to take a VM::DateCache& instead of a VM&.
Since the Date
> + functions no longer take a VM&, this proves that they cannot throw
because they
> + would need a VM& to make a ThrowScope in order to throw.
I think passing VM* is enough to represent that this function never throws an
error. Because error requires error objects, error-throwing function requires
JSGlobalObject* instead.
So, if the function does not take JSGlobalObject*, we can assume that it will
not throw an error (and that's why I didn't pass JSGlobalObject* to these
slowpath functions.)
More information about the webkit-reviews
mailing list