Closed Bug 475843 Opened 16 years ago Closed 16 years ago

Different (more) bytecode used for group assignment that is inside parens

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 461269

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: testcase)

js> var f = function() { ([a] = [3]); }; js> f function () { [a] = [3]; } js> dis(f) flags: LAMBDA INTERPRETED main: 00000: int8 3 00002: newarray 1 00006: dup 00007: zero 00008: getelem 00009: bindname "a" 00012: qnamepart "a" 00015: enumelem 00016: pop 00017: stop Source notes: 0: 6 [ 6] decl offset 3 2: 15 [ 9] xdelta 3: 15 [ 0] pcbase offset 6 js> dis(eval(uneval(f))) flags: LAMBDA INTERPRETED main: 00000: int8 3 00002: getlocal 0 00005: bindname "a" 00008: qnamepart "a" 00011: enumelem 00012: popn 1 00015: stop Source notes: 0: 2 [ 2] pcdelta offset 3 2: 11 [ 9] xdelta 3: 11 [ 0] pcbase offset 6
Brendan's right -- we shouldn't whack these moles any longer.
Depends on: 461269
In current tracemonkey tip: js> var f = function() { ([a] = [3]); }; js> f function () { [a] = [3]; } js> dis(f); flags: LAMBDA NULL_CLOSURE main: 00000: int8 3 00002: getlocal 0 00005: bindname "a" 00008: qnamepart "a" 00011: enumelem 00012: popn 1 00015: stop Source notes: 0: 2 [ 2] pcdelta offset 3 2: 11 [ 9] xdelta 3: 11 [ 0] pcbase offset 6
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Jason used the BIG mole-gun. ;-) /be
You need to log in before you can comment on or make changes to this bug.