Closed Bug 730836 Opened 13 years ago Closed 13 years ago

IonMonkey: Don't call GetPcScript from SetObjectElement

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

(Whiteboard: [Leave open after IonMonkey merge])

Attachments

(2 files)

The Kraken audio tests spend quite some time recovering the script/pc in SetObjectElement. SetObjectElement doesn't need the script/pc if we: 1) templatize SetObjectElement to get rid of script->strictMode 2) Remove the script/pc arguments from MonitorAssign (they are unused) 3) Only update the arrayWriteHole ScriptAnalysis flag when running in the interpreter.
When this merges to Ion we can add the cx->fp()->runningInIon() check.
Attachment #600956 - Flags: review?(nicolas.b.pierron)
Comment on attachment 600956 [details] [diff] [review] Patch for inbound Review of attachment 600956 [details] [diff] [review]: ----------------------------------------------------------------- Apply nit, and r=me. ::: js/src/jsinfer.h @@ +1121,1 @@ > Good catch. ::: js/src/jsinterp.cpp @@ +2641,5 @@ > jsid id; > FETCH_ELEMENT_ID(obj, -2, id); > Value &value = regs.sp[-1]; > + if (script->strictModeCode) { > + if (!SetObjectElementOperation<true>(cx, obj, id, value)) nit: Use an argument instead of the template parameter. Based on the size of the function and on the number of jump made with this boolean, there is no good reasons to use a template here, even if this remove one constant argument from IonMonkey stack.
Attachment #600956 - Flags: review?(nicolas.b.pierron) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/9fed91e95417 Please leave this bug open when merging this to m-c.
Whiteboard: [Leave open after merge]
Attached patch Ion patchSplinter Review
Attachment #601373 - Flags: review?(nicolas.b.pierron)
Comment on attachment 601373 [details] [diff] [review] Ion patch Review of attachment 601373 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. ::: js/src/jsinterpinlines.h @@ +816,5 @@ > } > obj->setDenseArrayElementWithType(cx, i, value); > return true; > } else { > + if (!cx->fp()->runningInIon()) { May be add comment which explain that if we ever hit this branch this means that we have already visit it during the interpreter phase. By the way, I will soon land a patch to improve GetPcScript, so this would not be necessary.
Attachment #601373 - Flags: review?(nicolas.b.pierron) → review+
Whiteboard: [Leave open after IonMonkey merge]
Status: ASSIGNED → RESOLVED
Closed: 13 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: