Bug 220429 - [JSC] New expression and value function call should reserve function register if arguments include assignments
Summary: [JSC] New expression and value function call should reserve function register...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
: 217308 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-01-07 12:24 PST by Yusuke Suzuki
Modified: 2021-02-01 02:26 PST (History)
9 users (show)

See Also:


Attachments
Patch (11.67 KB, patch)
2021-01-07 12:26 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (13.31 KB, patch)
2021-01-07 12:58 PST, Yusuke Suzuki
ashvayka: review+
Details | Formatted Diff | Diff
Patch (17.07 KB, patch)
2021-01-07 13:24 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (17.07 KB, patch)
2021-01-07 13:25 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2021-01-07 12:24:21 PST
[JSC] New expression and value function call should reserve function register if arguments include assignments
Comment 1 Yusuke Suzuki 2021-01-07 12:26:39 PST
Created attachment 417200 [details]
Patch
Comment 2 Yusuke Suzuki 2021-01-07 12:58:06 PST
Created attachment 417204 [details]
Patch
Comment 3 Yusuke Suzuki 2021-01-07 12:58:32 PST
<rdar://problem/70598359>
Comment 4 Alexey Shvayka 2021-01-07 13:14:59 PST
Comment on attachment 417204 [details]
Patch

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

This is handsome, nicely done!

> Source/JavaScriptCore/ChangeLog:17
> +            2. function value call (it is checking `isLocation()`, but we can still use local variables for function if we use comma expression)

Tagged template literals are already correct:

    x`_${x = 1}_`

Would be nice to have a test for it (if there is none).
Comment 5 Yusuke Suzuki 2021-01-07 13:23:04 PST
Comment on attachment 417204 [details]
Patch

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

I'll fix some of tests (the tests themselves are wrong).

>> Source/JavaScriptCore/ChangeLog:17
>> +            2. function value call (it is checking `isLocation()`, but we can still use local variables for function if we use comma expression)
> 
> Tagged template literals are already correct:
> 
>     x`_${x = 1}_`
> 
> Would be nice to have a test for it (if there is none).

Sounds good!
Comment 6 Yusuke Suzuki 2021-01-07 13:24:47 PST
Created attachment 417206 [details]
Patch
Comment 7 Yusuke Suzuki 2021-01-07 13:25:50 PST
Created attachment 417207 [details]
Patch
Comment 8 EWS 2021-01-07 15:17:49 PST
Committed r271265: <https://trac.webkit.org/changeset/271265>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 417207 [details].
Comment 9 Yusuke Suzuki 2021-02-01 02:26:07 PST
*** Bug 217308 has been marked as a duplicate of this bug. ***