Bug 206140 - [JSC] Remove IsDone from JSArrayIterator
Summary: [JSC] Remove IsDone from JSArrayIterator
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: 2020-01-12 01:10 PST by Yusuke Suzuki
Modified: 2020-01-12 19:11 PST (History)
9 users (show)

See Also:


Attachments
Patch (12.55 KB, patch)
2020-01-12 01:12 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (12.06 KB, patch)
2020-01-12 15:02 PST, Yusuke Suzuki
keith_miller: 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 2020-01-12 01:10:35 PST
[JSC] Remove IsDone from JSArrayIterator
Comment 1 Yusuke Suzuki 2020-01-12 01:12:08 PST
Created attachment 387461 [details]
Patch
Comment 2 Devin Rousso 2020-01-12 07:08:23 PST
Comment on attachment 387461 [details]
Patch

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

> Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp:-549
> -    clone->internalField(JSArrayIterator::Field::IsDone).set(vm, clone, iteratorObject->internalField(JSArrayIterator::Field::IsDone).get());

I think we should still show this in Web Inspector, as it’s useful for developers to know when debugging.
Comment 3 Yusuke Suzuki 2020-01-12 15:00:18 PST
Comment on attachment 387461 [details]
Patch

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

The test failures look unrelated.

>> Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp:-549
>> -    clone->internalField(JSArrayIterator::Field::IsDone).set(vm, clone, iteratorObject->internalField(JSArrayIterator::Field::IsDone).get());
> 
> I think we should still show this in Web Inspector, as it’s useful for developers to know when debugging.

You can show in the inspector side by comparing `index === -1`. Currently, inspector is not showing it.
Comment 4 Yusuke Suzuki 2020-01-12 15:02:07 PST
Created attachment 387492 [details]
Patch
Comment 5 Keith Miller 2020-01-12 15:13:14 PST
Comment on attachment 387492 [details]
Patch

Have you run the microbenchmarks to see if there's a significant difference?
Comment 6 Yusuke Suzuki 2020-01-12 17:22:21 PST
(In reply to Keith Miller from comment #5)
> Comment on attachment 387492 [details]
> Patch
> 
> Have you run the microbenchmarks to see if there's a significant difference?

No difference. This change is basically for JSStringIterator to use the same mechanism to keep sizeof(JSStringIterator) small.
Comment 7 Keith Miller 2020-01-12 18:45:27 PST
Cool LGTM then
Comment 8 Yusuke Suzuki 2020-01-12 19:10:17 PST
Committed r254419: <https://trac.webkit.org/changeset/254419>
Comment 9 Radar WebKit Bug Importer 2020-01-12 19:11:15 PST
<rdar://problem/58517697>