Bug 206140

Summary: [JSC] Remove IsDone from JSArrayIterator
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, hi, joepeck, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch keith_miller: review+

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>