Closed
Bug 1350263
Opened 7 years ago
Closed 7 years ago
Port Baseline TypeOf IC to CacheIR
Categories
(Core :: JavaScript Engine: JIT, enhancement, P3)
Core
JavaScript Engine: JIT
Tracking
()
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: jandem, Assigned: evilpie)
References
(Blocks 1 open bug)
Details
Attachments
(3 files, 1 obsolete file)
17.19 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
15.43 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
6.09 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
Some problems with the current Baseline code: * We don't optimize the "object" and "function" cases (even though these are very common). * When we have an object emulating undefined, we attach a stub that checks for undefined but not for the object-emulating-undefined case so we keep attaching stubs (I noticed this in bug 1349298).
Updated•7 years ago
|
Whiteboard: [qf]
Updated•7 years ago
|
Whiteboard: [qf] → [qf:p1]
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → evilpies
Assignee | ||
Comment 1•7 years ago
|
||
Assignee | ||
Comment 2•7 years ago
|
||
So for objects, we can possibly handle everything but wrapped objects inline, because of wrapped objects that emulate-undefined. The SharedIC compare stub doesn't consider this flag for proxies though. Or we use callWithABI and TypeOfObjectOperation.
Reporter | ||
Comment 3•7 years ago
|
||
I think it would be nice to handle everything other than wrapped objects inline. Maybe we could move that inline path into the MacroAssember and use it also for Ion's OOL path?
Assignee | ||
Comment 4•7 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=eef5ffbd2f09222878d70b56c4890a8d3cdb2b06 This also optimizes the Ion OOL path. I think it would even make sense to add a TypeOf object LIR variant.
Assignee | ||
Updated•7 years ago
|
Attachment #8862129 -
Flags: review?(jdemooij)
Assignee | ||
Comment 5•7 years ago
|
||
Attachment #8863407 -
Attachment is obsolete: true
Attachment #8863431 -
Flags: review?(jdemooij)
Assignee | ||
Updated•7 years ago
|
Attachment #8862129 -
Attachment description: Basic support → Primitive typeof CacheIR support
Assignee | ||
Comment 6•7 years ago
|
||
Attachment #8863433 -
Flags: review?(jdemooij)
Reporter | ||
Comment 7•7 years ago
|
||
Comment on attachment 8862129 [details] [diff] [review] Primitive typeof CacheIR support Review of attachment 8862129 [details] [diff] [review]: ----------------------------------------------------------------- Cool, thanks for doing this. ::: js/public/Value.h @@ +1336,5 @@ > uint32_t toPrivateUint32() const { return value().toPrivateUint32(); } > > uint64_t asRawBits() const { return value().asRawBits(); } > JSValueType extractNonDoubleType() const { return value().extractNonDoubleType(); } > + JSValueType type() const { return value().type(); } This method is not used I think
Attachment #8862129 -
Flags: review?(jdemooij) → review+
Reporter | ||
Comment 8•7 years ago
|
||
Comment on attachment 8863431 [details] [diff] [review] Ion/MacroAssembler typeof changes Review of attachment 8863431 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jit/MacroAssembler.cpp @@ +1456,5 @@ > + branchPtr(Assembler::Zero, Address(scratch, offsetof(js::Class, cOps)), > + ImmPtr(nullptr), isObject); > + > + loadPtr(Address(scratch, offsetof(js::Class, cOps)), scratch); > + branchPtr(Assembler::Zero, Address(scratch, offsetof(js::ClassOps, call)), Nit: Assembler::Equal ::: js/src/jit/SharedIC.cpp @@ +1780,5 @@ > masm.moveValue(BooleanValue(op == JSOP_STRICTNE), R0); > EmitReturnFromIC(masm); > } else { > // obj != undefined only where !obj->getClass()->emulatesUndefined() > + // XXX We should use branchIfObjectEmulatesUndefined here, but not sure which scratch to use. Maybe for now just push the object register? Or we could use R1 and restore it later... We should port this code.
Attachment #8863431 -
Flags: review?(jdemooij) → review+
Reporter | ||
Comment 9•7 years ago
|
||
Comment on attachment 8863433 [details] [diff] [review] Typeof object CacheIR support Review of attachment 8863433 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. This will help a lot of framework code.
Attachment #8863433 -
Flags: review?(jdemooij) → review+
Comment 10•7 years ago
|
||
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/12921b015564 Primitive typeof CacheIR support. r=jandem https://hg.mozilla.org/integration/mozilla-inbound/rev/f4bd22f374df Ion/MacroAssembler typeof object improvements. r=jandem https://hg.mozilla.org/integration/mozilla-inbound/rev/68042c9ca8dc Typeof object CacheIR support. r=jandem
Comment 11•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/12921b015564 https://hg.mozilla.org/mozilla-central/rev/f4bd22f374df https://hg.mozilla.org/mozilla-central/rev/68042c9ca8dc
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Updated•2 years ago
|
Performance Impact: --- → P1
Whiteboard: [qf:p1]
You need to log in
before you can comment on or make changes to this bug.
Description
•