Closed Bug 475859 Opened 16 years ago Closed 9 years ago

Bytecode difference after decompilation of ({}[*] = 3);

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
minor

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jruderman, Unassigned)

Details

(Keywords: testcase)

Dunno if there's a behavior difference here (suggesting a decompiler bug) or just an inefficiency.

js> var f = function () { ({}[*] = 3); }

js> print(uneval(f));
(function () {({}.* = 3);})

js> print(dis(f));
flags: LAMBDA INTERPRETED
main:
00000:  newinit 1
00002:  endinit
00003:  anyname
00004:  xmlname <-- this line is not present below
00005:  int8 3
00007:  setelem
00008:  pop
00009:  stop

Source notes:
  0:     4 [   4] pcbase   offset 1
  2:     7 [   3] pcbase   offset 7

js> print(dis(eval(uneval(f))));
flags: LAMBDA INTERPRETED
main:
00000:  newinit 1
00002:  endinit
00003:  anyname
00004:  int8 3
00006:  setelem
00007:  pop
00008:  stop

Source notes:
  0:     6 [   6] pcbase   offset 6
Similar thing happens with

({}[@foo] = 3);
Assignee: general → nobody
E4X was removed (bug 788293).
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.