Bug 163354 - Rename variables in arrayProtoFuncSplice() to match names in the spec.
Summary: Rename variables in arrayProtoFuncSplice() to match names in the spec.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-12 13:46 PDT by Mark Lam
Modified: 2016-10-12 14:04 PDT (History)
4 users (show)

See Also:


Attachments
proposed patch. (5.76 KB, patch)
2016-10-12 13:47 PDT, Mark Lam
no flags Details | Formatted Diff | Diff
proposed patch. (5.77 KB, patch)
2016-10-12 13:52 PDT, Mark Lam
sbarati: review-
Details | Formatted Diff | Diff
proposed patch. (5.76 KB, patch)
2016-10-12 13:57 PDT, Mark Lam
sbarati: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2016-10-12 13:46:23 PDT
This will make it easier to see whether the code matches the spec or not.
Ref: https://tc39.github.io/ecma262/#sec-array.prototype.splice
Comment 1 Mark Lam 2016-10-12 13:47:42 PDT
Created attachment 291389 [details]
proposed patch.
Comment 2 Mark Lam 2016-10-12 13:52:55 PDT
Created attachment 291391 [details]
proposed patch.
Comment 3 Saam Barati 2016-10-12 13:55:20 PDT
Comment on attachment 291391 [details]
proposed patch.

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

> Source/JavaScriptCore/runtime/ArrayPrototype.cpp:972
> +    unsigned itemCount = std::max<unsigned>(exec->argumentCount() - 2, 0);

this doesn't seem correct.
Comment 4 Mark Lam 2016-10-12 13:57:40 PDT
Created attachment 291392 [details]
proposed patch.

Thanks for catching the bad cast.  It's fixed.
Comment 5 Mark Lam 2016-10-12 14:04:13 PDT
Thanks for the review.  Landed in r207241: <http://trac.webkit.org/r207241>.