Closed
Bug 108257
Opened 24 years ago
Closed 24 years ago
source notes broken for functions compiled via JS_CompileUCFunctionForPrincipals
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: rginda, Assigned: rginda)
Details
(Whiteboard: [see Comment #15 for correction to makefile for testcase])
Attachments
(4 files, 1 obsolete file)
|
437 bytes,
patch
|
Details | Diff | Splinter Review | |
|
3.73 KB,
text/plain
|
Details | |
|
1.43 KB,
patch
|
Details | Diff | Splinter Review | |
|
1.79 KB,
patch
|
shaver
:
review+
brendan
:
superreview+
|
Details | Diff | Splinter Review |
Similar to bug 82188, but affects functions compiled via
JS_CompileUCFunctionForPrincipals. Patch coming up.
| Assignee | ||
Comment 1•24 years ago
|
||
| Assignee | ||
Updated•24 years ago
|
Summary: source notes broken for functions compiled via JS → source notes broken for functions compiled via JS_CompileUCFunctionForPrincipals
| Assignee | ||
Comment 2•24 years ago
|
||
| Assignee | ||
Comment 3•24 years ago
|
||
| Assignee | ||
Comment 4•24 years ago
|
||
save the makefile and testcase somewhere on your disk, edit the makefile to
point to your js/src directory, and make jsnotes.
the testcase compiles the same script via JS_CompileScript and
JS_CompileFunction. Source notes are dumped for each script, first for
CompileScript, then for CompileFunction. Unpatched I get this output...
Source notes:
0: 8 [ 8] xdelta
1: 8 [ 0] newline
2: 18 [ 10] xdelta
3: 18 [ 0] newline
4: 28 [ 10] xdelta
5: 28 [ 0] newline
Source notes:
0: 8 [ 8] xdelta
1: 8 [ 0] newline
2: 18 [ 10] xdelta
3: 18 [ 0] newline
4: 28 [ 10] xdelta
5: 28 [ 0] newline
6: 38 [ 10] xdelta
7: 38 [ 0] setline lineno 0
Notice the extra 6th and 7th note when CompileFunction is used. With this
patch, the testcase produces...
Source notes:
0: 8 [ 8] xdelta
1: 8 [ 0] newline
2: 18 [ 10] xdelta
3: 18 [ 0] newline
4: 28 [ 10] xdelta
5: 28 [ 0] newline
Source notes:
0: 8 [ 8] xdelta
1: 8 [ 0] newline
2: 18 [ 10] xdelta
3: 18 [ 0] newline
4: 28 [ 10] xdelta
5: 28 [ 0] newline
Status: NEW → ASSIGNED
| Assignee | ||
Comment 5•24 years ago
|
||
testing on linux/debug shows no regressions.
Comment 6•24 years ago
|
||
Comment on attachment 56298 [details] [diff] [review]
proposed patch; testing now
How about a comment:
/* Code already emitted in Statements' loop body. */
before the new code.
js_EmitFunctionBody could be inlined now that it's called in only one place in the whole engine.
No worries, I'll clean that later.
Comment and sr=brendan@mozilla.org
-- thanks,
/be
Attachment #56298 -
Flags: superreview+
Comment 7•24 years ago
|
||
Also, maybe it's time to JS_ASSERT that we never emit a SRC_SETLINE(0).
/be
| Assignee | ||
Comment 8•24 years ago
|
||
| Assignee | ||
Comment 9•24 years ago
|
||
oops, I'll remove the space between JS_ASSERT and (.
shaver, care to r=?
Comment 10•24 years ago
|
||
Comment on attachment 56324 [details] [diff] [review]
patch including brendan's suggestions
rginda, please move that ASSERT into UPDATE_LINENO_NOTES -- that's the only
place that could do the bad thing.
/be
| Assignee | ||
Comment 11•24 years ago
|
||
Comment 12•24 years ago
|
||
Comment on attachment 56330 [details] [diff] [review]
third time's a charm
Money, baby!
/be
Attachment #56330 -
Flags: superreview+
Updated•24 years ago
|
Attachment #56298 -
Attachment is obsolete: true
Comment 13•24 years ago
|
||
Comment on attachment 56330 [details] [diff] [review]
third time's a charm
So money. r=shaver
Attachment #56330 -
Flags: review+
| Assignee | ||
Comment 14•24 years ago
|
||
cha ching.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 15•24 years ago
|
||
Verified Fixed using Rob's testcase on a current Linux debug JS shell.
NOTE: Rob found that the makefile for the test, jsnotes.mak, should be
corrected as follows in order for the test to compile:
The line ending in -DDEBUG -I$(JSDIR) jsnotes.c
should end as: -DDEBUG -I$(JSLIBDIR) -I$(JSDIR) jsnotes.c
The output of the jsnotes executable is now the same for both
JS_CompileScript and JS_CompileFunction:
Source notes:
0: 8 [ 8] xdelta
1: 8 [ 0] newline
2: 18 [ 10] xdelta
3: 18 [ 0] newline
4: 28 [ 10] xdelta
5: 28 [ 0] newline
Source notes:
0: 8 [ 8] xdelta
1: 8 [ 0] newline
2: 18 [ 10] xdelta
3: 18 [ 0] newline
4: 28 [ 10] xdelta
5: 28 [ 0] newline
Status: RESOLVED → VERIFIED
Updated•24 years ago
|
Whiteboard: [see Comment #15 for correction to makefile for testcase]
Updated•20 years ago
|
Flags: testcase-
You need to log in
before you can comment on or make changes to this bug.
Description
•