Closed
Bug 383188
Opened 17 years ago
Closed 17 years ago
Declare extra slot for post++/-- in jsopcode.tbl to replace explicit max stack updates
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: igor, Assigned: igor)
References
Details
Attachments
(1 file, 3 obsolete files)
4.51 KB,
patch
|
brendan
:
review+
|
Details | Diff | Splinter Review |
This is a follow-up for bug 381973 to replace the explicit max stack checks to reserve an extra slot for post ++/-- via JOF_TMPSLOT introduced in that bug.
Assignee | ||
Comment 1•17 years ago
|
||
This is a quilt patch that depends on the patch from bug 383188 comment 5.
Assignee | ||
Comment 2•17 years ago
|
||
The prev patch can not even compiled.
Attachment #267187 -
Attachment is obsolete: true
Comment 3•17 years ago
|
||
Comment on attachment 267188 [details] [diff] [review]
implementation v0.91
>+ * Post-incremens requires an an extra slot for GC protection in case
typo: "incremens"
"an an" doubling
>+ * the initial value being post-incremented or -decremented is not a
>+ * number, but converts to a jsdouble. In the TOK_NAME cases, op has
>+ * 0 operand uses and 1 definition, so we don't need an extra stack
>+ * slot -- we can use the one allocated for the def.
> */
>- if (pn2->pn_type != TOK_NAME &&
>- (js_CodeSpec[op].format & JOF_POST) &&
>- (uintN)depth == cg->maxStackDepth) {
>- ++cg->maxStackDepth;
>- }
>+ JS_ASSERT((js_CodeSpec[op].format >> JOF_TMPSLOT_SHIFT) ==
>+ ((js_CodeSpec[op].format & JOF_POST)
>+ && pn2->pn_type != TOK_NAME) ? 1 : 0);
Nit: && at end of previous line. Also I am ok with using C booleans directly as ints instead of b?1:0.
/be
Assignee | ||
Comment 4•17 years ago
|
||
This is a previous patch + nit addressed + forgotten "& 1" added to the assert.
Attachment #267188 -
Attachment is obsolete: true
Attachment #267193 -
Flags: review+
Assignee | ||
Updated•17 years ago
|
Attachment #267193 -
Flags: review+ → review?(brendan)
Assignee | ||
Comment 5•17 years ago
|
||
The new version fixes English grammar in comments.
Attachment #267193 -
Attachment is obsolete: true
Attachment #267194 -
Flags: review?(brendan)
Attachment #267193 -
Flags: review?(brendan)
Comment 6•17 years ago
|
||
Comment on attachment 267194 [details] [diff] [review]
implementation v1b
r=me, thanks.
/be
Attachment #267194 -
Flags: review?(brendan) → review+
Assignee | ||
Comment 7•17 years ago
|
||
I committed the patch from comment 5 to the trunk:
Checking in jsemit.c;
/cvsroot/mozilla/js/src/jsemit.c,v <-- jsemit.c
new revision: 3.254; previous revision: 3.253
done
Checking in jsopcode.tbl;
/cvsroot/mozilla/js/src/jsopcode.tbl,v <-- jsopcode.tbl
new revision: 3.96; previous revision: 3.95
done
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•17 years ago
|
Flags: in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•