Bug 123835 - Support iteration of the Arguments object
Summary: Support iteration of the Arguments object
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Oliver Hunt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-05 16:17 PST by Oliver Hunt
Modified: 2013-11-06 14:36 PST (History)
4 users (show)

See Also:


Attachments
Patch (47.65 KB, patch)
2013-11-05 16:26 PST, Oliver Hunt
no flags Details | Formatted Diff | Diff
Patch (48.46 KB, patch)
2013-11-05 16:40 PST, Oliver Hunt
mark.lam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2013-11-05 16:17:07 PST
Support iteration of the Arguments object
Comment 1 Oliver Hunt 2013-11-05 16:26:46 PST
Created attachment 216094 [details]
Patch
Comment 2 EFL EWS Bot 2013-11-05 16:37:48 PST
Comment on attachment 216094 [details]
Patch

Attachment 216094 [details] did not pass efl-ews (efl):
Output: http://webkit-queues.appspot.com/results/21248053
Comment 3 Oliver Hunt 2013-11-05 16:40:47 PST
Created attachment 216096 [details]
Patch
Comment 4 Mark Lam 2013-11-06 14:20:51 PST
Comment on attachment 216096 [details]
Patch

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

r=me with comments addressed.

> Source/JavaScriptCore/runtime/CommonIdentifiers.h:31
>      macro(Array) \
> +    macro(ArgumentsIterator) \

Sort ArgumentsIterator before Array.

> LayoutTests/js/script-tests/arguments-iterator.js:57
> +function testStrict() {
> +    var i = 0;
> +    for (arg of arguments) {
> +        realArg = arguments[i++];
> +        shouldBeTrue("arg === realArg");
> +    }
> +    iteratedArgumentsLength = i;
> +    actualArgumentsLength = arguments.length;
> +    shouldBe("actualArgumentsLength", "iteratedArgumentsLength");
> +}
> +
> +testStrict();
> +testStrict("a");
> +testStrict("a", "b");
> +testStrict({})

What makes this test case "strict"?  It looks the identical to the non-strict "test()" test case above.
Comment 5 Oliver Hunt 2013-11-06 14:36:06 PST
Committed r158793: <http://trac.webkit.org/changeset/158793>