Closed
Bug 1350322
Opened 7 years ago
Closed 7 years ago
Don't emit JSOP_INITELEM_ARRAY to set hole values
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
INVALID
People
(Reporter: jandem, Assigned: jandem)
Details
Attachments
(1 file)
6.27 KB,
patch
|
tcampbell
:
review+
|
Details | Diff | Splinter Review |
While reviewing bug 1346028 I noticed JSOP_INITELEM_ARRAY is a no-op when it's used to set the hole value (the array length is set by the JSOP_NEWARRAY op). This patch changes the bytecode emitter to emit no bytecode in this case and then we can simplify InitArrayElemOperation a bit because it no longer has to check for JSOP_INITELEM_ARRAY + hole values.
Attachment #8850933 -
Flags: review?(tcampbell)
Comment 1•7 years ago
|
||
Comment on attachment 8850933 [details] [diff] [review] Patch Review of attachment 8850933 [details] [diff] [review]: ----------------------------------------------------------------- A much better solution.
Attachment #8850933 -
Flags: review?(tcampbell) → review+
Assignee | ||
Comment 2•7 years ago
|
||
This actually doesn't work well with Ion because when we update the initializedLength after setting some hole values, we need to write the magic hole value to the elements we "skipped". That's fixable but for now I'll just close this.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•