Closed
Bug 352453
Opened 18 years ago
Closed 17 years ago
Decompilation of (eval)(x)-- does not compile
Categories
(Core :: JavaScript Engine, defect, P2)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.9alpha4
People
(Reporter: jruderman, Assigned: brendan)
References
Details
(Keywords: testcase)
Attachments
(1 file)
1.68 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
js> function() { (eval)(x)-- } function () { eval(x)--; } js> function () { eval(x)--; typein:3: SyntaxError: invalid decrement operand: What is special about eval? If I replace "eval" with, say, "g", the second function is accepted. I think this is a bug in the compiler rather than a bug in the decompiler.
Assignee | ||
Comment 1•18 years ago
|
||
Yes, eval is recognized by the compiler and a special bytecode, JSOP_EVAL, is selected, so that we can detect indirect eval calls. I'm not going to worry about this for js1.7/mozilla1.8.1, it's too obscure. The severity is at least minor. /be
Severity: normal → minor
Assignee | ||
Comment 2•18 years ago
|
||
I meant "at most minor". ;-) /be
Reporter | ||
Comment 3•17 years ago
|
||
Now the first function (with parens around "eval") is also rejected with "invalid decrement operand". I think this is incorrect (especially because "eval" can have values other than the native function just like "NaN" can), but at least it gets rid of a decompilation inconsistency :)
Assignee | ||
Comment 4•17 years ago
|
||
Trivial. /be
Assignee | ||
Updated•17 years ago
|
Blocks: js1.7src
OS: Mac OS X → All
Priority: -- → P2
Hardware: Macintosh → All
Target Milestone: --- → mozilla1.9alpha4
Updated•17 years ago
|
Attachment #260404 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 5•17 years ago
|
||
Fixed on trunk: js/src/jsparse.c 3.274 /be
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 6•17 years ago
|
||
/cvsroot/mozilla/js/tests/js1_5/decompilation/regress-352453.js,v <-- regress-352453.js initial revision: 1.1
Flags: in-testsuite+
Comment 7•17 years ago
|
||
verified fixed linux, windows, mac* shell 20070406
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•