Closed Bug 840569 Opened 12 years ago Closed 12 years ago

BaselineCompiler: Inline caches for comparing numbers with undefined

Categories

(Core :: JavaScript Engine, defect)

Other Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bhackett1024, Assigned: bhackett1024)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
Some SS tests use this pattern heavily. Adding a cache for this reduces the number of fallback stubs taken in SS by about 3%. This also adds a bool<->bool comparison stub, which is colder.
Attachment #712952 - Flags: review?(kvijayan)
Comment on attachment 712952 [details] [diff] [review] patch Review of attachment 712952 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/ion/BaselineIC.cpp @@ +1244,5 @@ > + ICCompare_Boolean::Compiler compiler(cx, op); > + ICStub *booleanStub = compiler.getStub(ICStubSpace::StubSpaceFor(script)); > + if (!booleanStub) > + return false; > + Nit: trailing whitespace above. ::: js/src/ion/BaselineIC.h @@ +1512,5 @@ > } > }; > }; > > +class ICCompare_DoubleWithUndefined : public ICStub This should be ICCompare_NumberWithUndefined, to reflect its operation. Name currently suggests it gets attached strictly for double/undefined compares.
Attachment #712952 - Flags: review?(kvijayan) → review+
Comment on attachment 712952 [details] [diff] [review] patch Review of attachment 712952 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/ion/BaselineIC.cpp @@ +1347,5 @@ > + > + Label result, success; > + > + // Compare payload regs of R0 and R1. > + Assembler::Condition cond = JSOpToCondition(op); I recently moved emitSet into MacroAssembler. @@ +1366,5 @@ > + return true; > +} > + > +// > +// Compare_Boolean Compare_DoubleWithUndefined
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: