e4x adds spurious quotes when decompiling an XMLPI object initializer

VERIFIED FIXED

Status

()

Core
JavaScript Engine
VERIFIED FIXED
12 years ago
12 years ago

People

(Reporter: Robert Sayre, Assigned: Robert Sayre)

Tracking

({verified1.8.1})

Trunk
verified1.8.1
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

12 years ago
js> var x = function() { var y = <?foo bar?>; }

function () {
    var y = <?foo "bar"?>;
}
js> var x = function() { var y = <?foo bar?>; }
js> x
function () {
    var y = <?foo "bar"?>;
}
js> dis(x)
flags: LAMBDA
main:
00000:  string "bar"
00003:  xmlpi "foo"
00006:  setvar 0
00009:  pop
00010:  stop

Source notes:
  0:     6 [   6] decl     offset 0

Trivial fix suggests itself: use JSOP_QNAMEPART instead of JSOP_STRING for the first bytecode.  Robert, you gonna take this one?

/be
(Assignee)

Comment 2

12 years ago
Created attachment 237571 [details] [diff] [review]
use JSOP_QNAMEPART
Assignee: general → sayrer
Status: NEW → ASSIGNED
Attachment #237571 - Flags: review?(brendan)
Comment on attachment 237571 [details] [diff] [review]
use JSOP_QNAMEPART

Cool, thanks.

Trivially safe and good for 1.8.1 if you want to nominate, and to help the decompiler fuzzer avoid a special case.

/be
Attachment #237571 - Flags: review?(brendan) → review+
(Assignee)

Comment 4

12 years ago
Checking in jsemit.c;
/cvsroot/mozilla/js/src/jsemit.c,v  <--  jsemit.c
new revision: 3.205; previous revision: 3.204
done
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
(Assignee)

Updated

12 years ago
Attachment #237571 - Flags: approval1.8.1?

Comment 5

12 years ago
Comment on attachment 237571 [details] [diff] [review]
use JSOP_QNAMEPART

a=schrep for JS decompiler bugs
Attachment #237571 - Flags: approval1.8.1? → approval1.8.1+
(Assignee)

Comment 6

12 years ago
Checking in jsemit.c;
/cvsroot/mozilla/js/src/jsemit.c,v  <--  jsemit.c
new revision: 3.128.2.41; previous revision: 3.128.2.40
done
Keywords: fixed1.8.1

Comment 7

12 years ago
Checking in regress-351988.js;
/cvsroot/mozilla/js/tests/e4x/Regress/regress-351988.js,v  <--  regress-351988.js
initial revision: 1.1
done

Flags: in-testsuite+

Comment 8

12 years ago
verified fixed 1.8 1.9 2006091022 windows/mac*/linux
Status: RESOLVED → VERIFIED
Keywords: fixed1.8.1 → verified1.8.1
You need to log in before you can comment on or make changes to this bug.