Bug 163354

Summary: Rename variables in arrayProtoFuncSplice() to match names in the spec.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, keith_miller, msaboff, saam
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch.
none
proposed patch.
saam: review-
proposed patch. saam: review+

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>.