Closed Bug 356248 Opened 18 years ago Closed 17 years ago

Incorrect decompilation for object literal with named getter function; property and function names are mashed together

Categories

(Core :: JavaScript Engine, defect)

PowerPC
macOS
defect
Not set
minor

Tracking

()

VERIFIED FIXED

People

(Reporter: jruderman, Assigned: crowderbt)

References

Details

(Keywords: testcase)

Attachments

(1 file, 1 obsolete file)

Split from bug 356085.

js> function() { return {p setter: function y() { } } }  
function () {
    return {set py() {}};
}
Status: NEW → ASSIGNED
Assignee: general → crowder
Status: ASSIGNED → NEW
Attached patch adding a space in decompilation (obsolete) — Splinter Review
Still trying to sneak in the cleanup for these redundant ternaries, also, added one tiny little ' ' to the print string for get/set.
Attachment #241951 - Flags: review?(brendan)
Status: NEW → ASSIGNED
Is this patch still needed?

/be
Yes.
Comment on attachment 241951 [details] [diff] [review]
adding a space in decompilation

But this always puts a space after the setter name, even if there's no intrinsic function name:

js> function() { return {p setter: function() { } } }
function () {
    return {set p () {}};
}

/be
Attachment #241951 - Flags: review?(brendan) → review-
Not sure if this is really good way to determine whether the function has a name or not, at this point in the process, but it seems viable.
Attachment #241951 - Attachment is obsolete: true
Attachment #259147 - Flags: review?(brendan)
Comment on attachment 259147 [details] [diff] [review]
no extra space if the decompiled rval starts with '('

Great, r=me. Thanks,

/be
Attachment #259147 - Flags: review?(brendan) → review+
Blocks: js1.7src
jsopcode.c:3.227
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
/cvsroot/mozilla/js/tests/js1_5/decompilation/regress-356248.js,v  <--  regress-356248.js
initial revision: 1.1
Flags: in-testsuite+
Depends on: 379509
No longer depends on: 379509
verified fixed 1.9.0 linux/mac* 2007-05-05 shell.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: