Closed
Bug 457789
Opened 17 years ago
Closed 17 years ago
TM: add a resume point to JSOP_CALL
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: gal, Assigned: gal)
References
Details
Attachments
(2 files, 2 obsolete files)
6.72 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
2.80 KB,
patch
|
brendan
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•17 years ago
|
||
Assignee | ||
Comment 2•17 years ago
|
||
Attachment #341030 -
Attachment is obsolete: true
Assignee | ||
Updated•17 years ago
|
Attachment #341034 -
Flags: review?(mrbkap)
Comment 3•17 years ago
|
||
Comment on attachment 341034 [details] [diff] [review]
v2
Andreas argues (correctly I think) that this won't affect interpreter performance in the slightest.
Attachment #341034 -
Flags: review?(mrbkap) → review+
Comment 4•17 years ago
|
||
Comment on attachment 341034 [details] [diff] [review]
v2
>diff --git a/js/src/jsemit.cpp b/js/src/jsemit.cpp
>--- a/js/src/jsemit.cpp
>+++ b/js/src/jsemit.cpp
>@@ -5891,18 +5891,28 @@ js_EmitTree(JSContext *cx, JSCodeGenerat
> }
> cg->treeContext.flags |= oldflags & TCF_IN_FOR_INIT;
> if (js_NewSrcNote2(cx, cg, SRC_PCBASE, CG_OFFSET(cg) - off) < 0)
> return JS_FALSE;
>
> argc = pn->pn_count - 1;
> if (js_Emit3(cx, cg, PN_OP(pn), ARGC_HI(argc), ARGC_LO(argc)) < 0)
> return JS_FALSE;
>- if (PN_OP(pn) == JSOP_EVAL)
>+ switch (PN_OP(pn)) {
>+ case JSOP_EVAL:
>+ if (js_Emit1(cx, cg, JSOP_RESUME) < 0)
>+ return JS_FALSE;
Indentation is off here, and below.
> EMIT_UINT16_IMM_OP(JSOP_LINENO, pn->pn_pos.begin.lineno);
>+ break;
>+ case JSOP_CALL:
>+ if (js_Emit1(cx, cg, JSOP_RESUME) < 0)
>+ return JS_FALSE;
>+ break;
>+ default:;
Use an if (PN_OP(pn) == JSOP_EVAL) {...} else {...} instead of switch, and JS_ASSERT(PN_OP(pn) == JSOP_CALL); first thing in the else clause.
Please fix before committing.
/be
Assignee | ||
Comment 5•17 years ago
|
||
Attachment #341052 -
Flags: review?(brendan)
Assignee | ||
Comment 6•17 years ago
|
||
Attachment #341052 -
Attachment is obsolete: true
Attachment #341053 -
Flags: review?(brendan)
Attachment #341052 -
Flags: review?(brendan)
Updated•17 years ago
|
Attachment #341053 -
Flags: review?(brendan) → review+
Assignee | ||
Comment 7•17 years ago
|
||
Assignee | ||
Updated•17 years ago
|
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•17 years ago
|
Flags: in-testsuite-
Flags: in-litmus-
You need to log in
before you can comment on or make changes to this bug.
Description
•