Bug 201513 - [JSC] Generalize Get/PutPromiseInternalField for InternalFieldObjectImpl
Summary: [JSC] Generalize Get/PutPromiseInternalField for InternalFieldObjectImpl
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-09-05 13:01 PDT by Yusuke Suzuki
Modified: 2019-09-05 14:48 PDT (History)
2 users (show)

See Also:


Attachments
Patch (64.15 KB, patch)
2019-09-05 13:38 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (64.17 KB, patch)
2019-09-05 13:45 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (64.16 KB, patch)
2019-09-05 13:57 PDT, Yusuke Suzuki
ross.kirsling: 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 2019-09-05 13:01:02 PDT
To reuse it for generators.
Comment 1 Radar WebKit Bug Importer 2019-09-05 13:09:56 PDT
<rdar://problem/55080640>
Comment 2 Yusuke Suzuki 2019-09-05 13:13:13 PDT
The goal of making Generator internal-field-object is avoiding op_get_by_id_direct for generators.
Each generator has different structure since [[Prototype]] of them are different (defined in the spec). As a result, Generator.prototype.next's internal field accesses are getting super generic get_by_id.
Comment 3 Yusuke Suzuki 2019-09-05 13:13:49 PDT
(In reply to Yusuke Suzuki from comment #2)
> The goal of making Generator internal-field-object is avoiding
> op_get_by_id_direct for generators.
> Each generator has different structure since [[Prototype]] of them are
> different (defined in the spec). As a result, Generator.prototype.next's
> internal field accesses are getting super generic get_by_id.

If multiple generators exist in one app, we hits this slow-case. And JetStream2/Basic is the one I think.
Comment 4 Yusuke Suzuki 2019-09-05 13:38:45 PDT
Created attachment 378113 [details]
Patch
Comment 5 Yusuke Suzuki 2019-09-05 13:45:50 PDT
Created attachment 378114 [details]
Patch
Comment 6 Yusuke Suzuki 2019-09-05 13:57:19 PDT
Created attachment 378116 [details]
Patch
Comment 7 Ross Kirsling 2019-09-05 14:01:52 PDT
Comment on attachment 378116 [details]
Patch

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

Looks nice and simple to me.

> Source/JavaScriptCore/llint/LowLevelInterpreter.asm:168
> +const JSInternalFieldObjectImpl_internalFields = JSInternalFieldObjectImpl::m_internalFields

Is this constant just a stylistic matter? Just curious since we weren't using one before.
Comment 8 Yusuke Suzuki 2019-09-05 14:39:09 PDT
Comment on attachment 378116 [details]
Patch

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

>> Source/JavaScriptCore/llint/LowLevelInterpreter.asm:168
>> +const JSInternalFieldObjectImpl_internalFields = JSInternalFieldObjectImpl::m_internalFields
> 
> Is this constant just a stylistic matter? Just curious since we weren't using one before.

I used it since `<>` syntax is not available in LLInt right now.
Comment 9 Yusuke Suzuki 2019-09-05 14:48:50 PDT
Committed r249547: <https://trac.webkit.org/changeset/249547>