All users were logged out of Bugzilla on October 13th, 2018

Delay importing values into Arguments objects

RESOLVED DUPLICATE of bug 495061

Status

()

RESOLVED DUPLICATE of bug 495061
9 years ago
9 years ago

People

(Reporter: dmandelin, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 years ago
Background:

The |arguments| JS language feature is implemented by creating an object of class js_ArgumentsClass. While the callee function is active, the class simply points to the stack frame and reads/writes property values from there. When the callee function returns, js_PutArgsObject (or js_PutArguments if on trace) imports the values into the object by creating properties with JS_DefineProperty for callee, length, and each argument index.

The Proposal:

I assume that |arguments| objects are rarely used after the callee returns. If so, then it is best to minimal importing work when the function returns, and import the values as full properties only if required. The on-return work would be simply copying the arguments from their current location into a new buffer and possibly setting a flag so the getters know where the values are.
Just use reserved dslots in the arguments object, a la js_PutCallObject and js_CallClass.

/be

Comment 2

9 years ago
This is a dup of 495061.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 495061
You need to log in before you can comment on or make changes to this bug.