Closed
Bug 381101
Opened 18 years ago
Closed 18 years ago
Incorrect use of new setter syntax in decompilation
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: jruderman, Assigned: brendan)
References
Details
(Keywords: testcase)
Attachments
(2 files, 1 obsolete file)
|
1.55 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
|
1.62 KB,
patch
|
brendan
:
review+
|
Details | Diff | Splinter Review |
js> (function(){ ({ x setter: function(){} + {} }) })
function () {
({set x() {} + {}});
}
| Assignee | ||
Comment 1•18 years ago
|
||
I think we want this for js1.7src. Probably won't get approved for the 1.8.1 branch though.
/be
| Reporter | ||
Updated•18 years ago
|
Summary: Incorrect use of new setter syntax → Incorrect use of new setter syntax in decompilation
| Reporter | ||
Comment 2•18 years ago
|
||
This uses the wrong form (get vs getter) for lots of simple testcases. (Tested with genexp4b patch, which includes this patch.)
js> (function(){ ({ x setter: function(){} }) })
function () {
({x setter: function () {}});
}
js> (function(){ ({ set x(){} }) })
function () {
({x setter: function () {}});
}
js> (function() { ({x getter: ({abcdefghijklmn: function(id2) { return id2; }}) }) })
function () {
({get x ijklmn:function (id2) {return id2;}}});
}
| Assignee | ||
Comment 3•18 years ago
|
||
Attachment #265180 -
Attachment is obsolete: true
Attachment #265184 -
Flags: review?(mrbkap)
Attachment #265180 -
Flags: review?(mrbkap)
| Assignee | ||
Updated•18 years ago
|
OS: Mac OS X → All
Hardware: PC → All
Updated•18 years ago
|
Attachment #265184 -
Flags: review?(mrbkap) → review+
| Assignee | ||
Comment 4•18 years ago
|
||
What I'm checking in. It would suffice to test for *rval == '(' to detect a generator expression (seemingly generated by a JSOP_ANONFUNOBJ op), but I stuck with the strncmp(rval, js_function_str, 8) != 0 test instead, just to avoid too much coupling to genexp decompilation.
/be
Attachment #265186 -
Flags: review+
| Assignee | ||
Comment 5•18 years ago
|
||
Fixed on trunk:
revision 3.240
date: 2007/05/18 00:48:18; author: brendan%mozilla.org; state: Exp; lines: +4 -3
Fix getter/setter decompilation to depend on generating op, not prefix string (381101, r=mrbkap).
/be
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 6•18 years ago
|
||
Could the generator expression change ss->opcodes to avoid the string mashing sadness?
OS: All → Mac OS X
Hardware: All → PC
Comment 7•18 years ago
|
||
/cvsroot/mozilla/js/tests/js1_7/decompilation/regress-381101.js,v <-- regress-381101.js
initial revision: 1.1
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•