Closed Bug 822208 Opened 13 years ago Closed 12 years ago

BaselineCompiler: Compile INITELEM_ARRAY

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Patch (obsolete) — Splinter Review
Pretty straight-forward with bug 821816 fixed.
Attachment #692897 - Flags: review?(kvijayan)
Attached patch PatchSplinter Review
Attachment #692897 - Attachment is obsolete: true
Attachment #692897 - Flags: review?(kvijayan)
Attachment #692900 - Flags: review?(kvijayan)
Comment on attachment 692900 [details] [diff] [review] Patch Review of attachment 692900 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/ion/BaselineCompiler.cpp @@ +905,5 @@ > + masm.extractObject(frame.addressOfStackValue(array), scratch); > + masm.loadPtr(Address(scratch, JSObject::offsetOfElements()), scratch); > + > + // Update initialized length. > + masm.store32(Imm32(index + 1), Address(scratch, ObjectElements::offsetOfInitializedLength())); Is the array ever accessible in js code before it's been fully initialized? If not, we can set the initialized length in NewArray and avoid updating it on each INITELEM.
Attachment #692900 - Flags: review?(kvijayan) → review+
https://hg.mozilla.org/projects/ionmonkey/rev/c4bd7021e0ed (In reply to Kannan Vijayan [:djvj] from comment #2) > > Is the array ever accessible in js code before it's been fully initialized? > If not, we can set the initialized length in NewArray and avoid updating it > on each INITELEM. The array is not accessible in js code, but the GC may access it, like [{}, gc()]
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: