Closed
Bug 1173869
Opened 9 years ago
Closed 9 years ago
MBinaryArithInstruction::infer cleanups
Categories
(Core :: JavaScript Engine: JIT, defect)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: h4writer, Assigned: h4writer)
Details
Attachments
(1 file)
3.09 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
There is some dead code inside MBinaryArithInstruction::infer. So time to remove that.
Assignee | ||
Comment 1•9 years ago
|
||
Assignee: nobody → hv1989
Attachment #8621085 -
Flags: review?(jdemooij)
Assignee | ||
Comment 2•9 years ago
|
||
Comment on attachment 8621085 [details] [diff] [review] bug1173869-infercleanups Review of attachment 8621085 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jit/MIR.cpp @@ +2628,5 @@ > MOZ_ASSERT(lhs < MIRType_String || lhs == MIRType_Value); > MOZ_ASSERT(rhs < MIRType_String || rhs == MIRType_Value); > > MIRType rval = this->type(); > + specialization_ = type; s/type/rval
Comment 3•9 years ago
|
||
Comment on attachment 8621085 [details] [diff] [review] bug1173869-infercleanups Review of attachment 8621085 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. ::: js/src/jit/MIR.cpp @@ +2606,5 @@ > setResultType(MIRType_Int32); > + > + // If the operation will always overflow on its constant operands, use a > + // double specialization so that it can be constant folded later. > + if ((isMul() || isDiv())) { Nit: remove the extra parentheses. @@ +2613,5 @@ > + if (typeChange) > + setResultType(MIRType_Double); > + } > + } else if (IsFloatingPointType(lhs) || IsFloatingPointType(rhs)) { > + // Double operations are prioritary over float32 operations (i.e. if any operand needs Nit: pre-existing typo, priority @@ +2623,4 @@ > > // If the operation has ever overflowed, use a double specialization. > if (inspector->hasSeenDoubleResult(pc)) > setResultType(MIRType_Double); Can you move this inside the Int32-if? @@ +2628,5 @@ > MOZ_ASSERT(lhs < MIRType_String || lhs == MIRType_Value); > MOZ_ASSERT(rhs < MIRType_String || rhs == MIRType_Value); > > MIRType rval = this->type(); > + specialization_ = type; This can be specialization_ = this->type(); MOZ_ASSERT(IsNumberType(specialization_)); @@ +2633,4 @@ > > if (isAdd() || isMul()) > setCommutative(); > setResultType(rval); I think this line can be removed.
Attachment #8621085 -
Flags: review?(jdemooij) → review+
https://hg.mozilla.org/mozilla-central/rev/44174f5d6bc7
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•