Closed Bug 846424 Opened 12 years ago Closed 12 years ago

BaselineCompiler: Add optimized stubs for ToBool(double) and ToBool(object)

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: djvj, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Bunch of octane tests hit this.
Attached patch Patch (deleted) — Splinter Review
Some refactoring of the testObjectTruthy code found in ion's CodeGenerator.cpp is involved. If you think it's appropriate, I can check that in separately to inbound, and push the baseline-specific changes after that gets merged back.
Attachment #719693 - Flags: review?(jdemooij)
Comment on attachment 719693 [details] [diff] [review] Patch Review of attachment 719693 [details] [diff] [review]: ----------------------------------------------------------------- (In reply to Kannan Vijayan [:djvj] from comment #1) > Some refactoring of the testObjectTruthy code found in ion's > CodeGenerator.cpp is involved. If you think it's appropriate, I can check > that in separately to inbound, and push the baseline-specific changes after > that gets merged back. Should be fine to land on IonMonkey. I don't expect changes to this code in the coming weeks, and even if there are it should be easy to merge them. ::: js/src/ion/BaselineIC.cpp @@ +1909,5 @@ > + Register objReg = masm.extractObject(R0, ExtractTemp0); > + Register scratch = R1.scratchReg(); > + masm.branchTestObjectTruthy(Assembler::NotEqual, objReg, scratch, &ifFalse, &slowPath); > + > + // If object doesn't emulate undefined, it evaulates to true. Nit: typo, evaluates
Attachment #719693 - Flags: review?(jdemooij) → review+
Pushed with a minor fix to ToBool(Object) - wasn't notting the result of the EmulatesUndefined ABI call before boxing: https://hg.mozilla.org/projects/ionmonkey/rev/80642ec465bf Waiting for tbpl before closing
Status: NEW → 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: