Bug 178935 - [JSC] Tweak ES6 generator function to allow inlining
Summary: [JSC] Tweak ES6 generator function to allow inlining
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
Depends on:
Blocks:
 
Reported: 2017-10-27 06:02 PDT by Yusuke Suzuki
Modified: 2017-11-15 12:36 PST (History)
9 users (show)

See Also:


Attachments
Patch (5.20 KB, patch)
2017-10-27 06:08 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (4.57 KB, patch)
2017-10-27 06:16 PDT, Yusuke Suzuki
sbarati: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2017-10-27 06:02:25 PDT
[JSC] Tweak ES6 generator function to allow inlining
Comment 1 Yusuke Suzuki 2017-10-27 06:08:15 PDT
Created attachment 325155 [details]
Patch
Comment 2 Yusuke Suzuki 2017-10-27 06:16:38 PDT
Created attachment 325157 [details]
Patch
Comment 3 Keith Miller 2017-10-27 10:45:52 PDT
Comment on attachment 325157 [details]
Patch

Ugh, this is stupid that we need to do this... We really need to fix our inlining rules...
Comment 4 Joseph Pecoraro 2017-10-27 11:10:28 PDT
Comment on attachment 325157 [details]
Patch

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

> Source/JavaScriptCore/ChangeLog:15
> +        generator.es6             269.6030+-13.2435    ^    148.8840+-6.7614        ^ definitely 1.8108x faster

Wow!

> Source/JavaScriptCore/builtins/GeneratorPrototype.js:70
> +    if (typeof state !== 'number')

Style: I think we try to always use double quoted strings in builtins for simple strings like "number" here.

> Source/JavaScriptCore/builtins/GeneratorPrototype.js:84
> +    if (typeof state !== 'number')

Style: I think we try to always use double quoted strings in builtins for simple strings like "number" here.
Comment 5 Saam Barati 2017-10-27 11:32:30 PDT
(In reply to Keith Miller from comment #3)
> Comment on attachment 325157 [details]
> Patch
> 
> Ugh, this is stupid that we need to do this... We really need to fix our
> inlining rules...

Yeah, seriously ...
Comment 6 Yusuke Suzuki 2017-10-27 18:46:11 PDT
Comment on attachment 325157 [details]
Patch

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

Yeah. In the meantime, I'll optimize it in this way. It's worth doing since these functions are builtin functions, and it is tightly coupled with JSC implementaiton.

>> Source/JavaScriptCore/builtins/GeneratorPrototype.js:70
>> +    if (typeof state !== 'number')
> 
> Style: I think we try to always use double quoted strings in builtins for simple strings like "number" here.

Fixed.

>> Source/JavaScriptCore/builtins/GeneratorPrototype.js:84
>> +    if (typeof state !== 'number')
> 
> Style: I think we try to always use double quoted strings in builtins for simple strings like "number" here.

Fixed.
Comment 7 Yusuke Suzuki 2017-10-27 18:49:06 PDT
Committed r224141: <https://trac.webkit.org/changeset/224141>
Comment 8 Radar WebKit Bug Importer 2017-11-15 12:36:13 PST
<rdar://problem/35567856>