Closed Bug 640593 Opened 9 years ago Closed 9 years ago

Remove fun.arity


(Core :: JavaScript Engine, defect)

Not set





(Reporter: evilpie, Assigned: evilpie)



(Keywords: dev-doc-complete, Whiteboard: fixed-in-tracemonkey)


(1 file, 2 obsolete files)

Both IE and Chrome don't have it.
Assignee: general → evilpies
And it's not standard and fun.length is the standard replacement for that.
OS: Windows Vista → All
Hardware: x86 → All
So took my chances here.
- Removed lazyDataProps and defined name the same way as length in resolve
- Stop using tinyids (i would like to remove those at some point)
- Made arguments/caller behave as expected, previously they wouldn't be resolved from the proto chain
Attachment #535915 - Flags: review?(jwalden+bmo)
thanks Ms2ger
Attachment #535915 - Attachment is obsolete: true
Attachment #535915 - Flags: review?(jwalden+bmo)
Attachment #535916 - Flags: review?(jwalden+bmo)
Keywords: dev-doc-needed
Attachment #535916 - Flags: review?(jwalden+bmo)
Attached patch v2Splinter Review
updated to pass test suite
Attachment #535916 - Attachment is obsolete: true
Attachment #536287 - Flags: review?(jorendorff)
Comment on attachment 536287 [details] [diff] [review]

Review of attachment 536287 [details] [diff] [review]:

Love it. r=me with the two changes below.

For future reference -- hg mv is better for renaming a file, since it keeps the file's history intact, and the patch would actually show the diffs for review instead of a whole file being removed and a whole new file being added.

::: js/src/jsfun.cpp
@@ +1604,3 @@
>  struct PoisonPillProp {
>      uint16       atomOffset;

Go ahead and get rid of this struct. Make poisonPillProps an array of uint16. Feel free to get rid of it entirely and turn the loop in fun_resolve into a single if-statement, like the length||name one you added.

@@ +2834,5 @@
>       * parameter, and so binds fun's parent to obj using JSObject::setParent,
>       * under js_NewFunction (in JSObject::init, called from NewObject -- see
>       * jsobjinlines.h).
>       *
> +     * But JSObject::setParent sets the DELEGATE object flag on its receiver,z

Attachment #536287 - Flags: review?(jorendorff) → review+
Whiteboard: fixed-in-tracemonkey
Closed: 9 years ago
Resolution: --- → FIXED
Blocks: 666587
Target Milestone: --- → mozilla7
No longer blocks: 666587
Depends on: 666587
So what did this patch change other than removing .arity?  At least one of the bugs that this change caused appears on a web page that doesn't appear to use .arity....
See comment 2
Massive use of arguments in the dropbox zip from bug 666587
Depends on: 667538
Duplicate of this bug: 569172
Depends on: 696342
You need to log in before you can comment on or make changes to this bug.