Closed
Bug 1595533
Opened 5 years ago
Closed 5 years ago
Use jsop_unpick for post-increment with object-element
Categories
(Core :: JavaScript Engine, task)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla72
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(2 files)
Bug 1595533 - Part 1: Replace JSOP_PICK sequence in ElemOpEmitter with a single JSOP_UNPICK. r=arai!
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
This was already implemented in bug 1472211, but somehow got reverted in bug 1466000.
a[k]++
emits the following bytecode sequence:
getgname "a" # a
checkobjcoercible # a
getgname "k" # a k
toid # a TOID(k)
dup2 # a TOID(k) a TOID(k)
getelem # a TOID(k) a[TOID(k)]
tonumeric # a TOID(k) (tonumeric a[TOID(k)])
dup # a TOID(k) (tonumeric a[TOID(k)]) (tonumeric a[TOID(k)])
inc # a TOID(k) (tonumeric a[TOID(k)]) (inc (tonumeric a[TOID(k)]))
pick 3 # TOID(k) (tonumeric a[TOID(k)]) (inc (tonumeric a[TOID(k)])) a
pick 3 # (tonumeric a[TOID(k)]) (inc (tonumeric a[TOID(k)])) a TOID(k)
pick 2 # (tonumeric a[TOID(k)]) a TOID(k) (inc (tonumeric a[TOID(k)]))
setelem # (tonumeric a[TOID(k)]) a[TOID(k)]
pop # (tonumeric a[TOID(k)])
The three pick
operations can be replaced with a single unpick
operation:
getgname "a" # a
checkobjcoercible # a
getgname "k" # a k
toid # a TOID(k)
dup2 # a TOID(k) a TOID(k)
getelem # a TOID(k) a[TOID(k)]
tonumeric # a TOID(k) (tonumeric a[TOID(k)])
dup # a TOID(k) (tonumeric a[TOID(k)]) (tonumeric a[TOID(k)])
unpick 3 # (tonumeric a[TOID(k)]) a TOID(k) (tonumeric a[TOID(k)])
inc # (tonumeric a[TOID(k)]) a TOID(k) (inc (tonumeric a[TOID(k)]))
setelem # (tonumeric a[TOID(k)]) a[TOID(k)]
pop # (tonumeric a[TOID(k)])
Assignee | ||
Comment 1•5 years ago
|
||
Updated•5 years ago
|
Attachment #9107856 -
Attachment description: Bug 1595533: Replace JSOP_PICK sequence with a single JSOP_UNPICK. r=arai! → Bug 1595533 - Part 1: Replace JSOP_PICK sequence in ElemOpEmitter with a single JSOP_UNPICK. r=arai!
Assignee | ||
Comment 2•5 years ago
|
||
Depends on D52549
Pushed by dluca@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6c550f7a2547
Part 1: Replace JSOP_PICK sequence in ElemOpEmitter with a single JSOP_UNPICK. r=arai
https://hg.mozilla.org/integration/autoland/rev/eb6a4954d374
Part 2: Use JSOP_UNPICK for inc/dec in PropOpEmitter.cpp. r=arai
Comment 4•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6c550f7a2547
https://hg.mozilla.org/mozilla-central/rev/eb6a4954d374
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in
before you can comment on or make changes to this bug.
Description
•