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

RESOLVED WONTFIX

Status

()

Core
JavaScript Engine
--
minor
RESOLVED WONTFIX
9 years ago
3 years ago

People

(Reporter: Jesse Ruderman, Unassigned)

Tracking

(Blocks: 1 bug, {testcase})

Trunk
x86
Mac OS X
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 years ago
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
(Reporter)

Comment 1

9 years ago
Similar thing happens with

({}[@foo] = 3);
(Assignee)

Updated

4 years ago
Assignee: general → nobody
E4X was removed (bug 788293).
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.