Closed Bug 598682 Opened 14 years ago Closed 14 years ago

Minor cleanups to jsinterp.h and jsinterpinlines.h

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jimb, Unassigned)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(2 files)

In reading jsinterp.h (which is vastly more readable and helpful than it was a year ago), I noticed some things that looked like they could be tightened up slightly.

jsinterp.h and jsinterpinlines.h could use a 'haveArgs' predicate, identifying frames that have arguments below them (i.e. isFunction & !isEval).

Several places in jsinterpinlines.h could use formalArgs instead of writing it out.
Nice!
Attachment #477547 - Flags: review?(lw)
Comment on attachment 477547 [details] [diff] [review]
Minor cleanups to JSStackFrame member functions.

>+    /* True if this frame has arguments. Contrast with hasArgsObj. */

Not sure if this comment is necessary in view of the preceding comment paragraphs.

>+    /* True if we have created an arguments object for this frame; implies hasArgs(). */

Ditto, except for the "implies hasArgs" clause which could turned into a JS_ASSERT_IF in the memfun body instead.

Again, thanks!
Attachment #477547 - Flags: review?(lw) → review+
Do you want me to land this?
Attached patch clean-up 2Splinter Review
Another small cleanup leftover from a previous bug.
Attachment #480533 - Flags: review?(bhackett1024)
Attachment #480533 - Flags: review?(bhackett1024) → review+
http://hg.mozilla.org/mozilla-central/rev/02acd5c6ab3e
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.