Closed Bug 1244098 Opened 10 years ago Closed 10 years ago

Fold jsop_in to boolean constant.

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: arai, Assigned: jandem)

References

Details

Attachments

(1 file)

In bug 887016, jsop_in is used to check String.prototype has no non-default property (@@match, @@search, etc), and it needs to be folded into boolean constant, especially false, in Ion compilation, to improve performance. it's used like following, so it should be false in normal case. > function StringHasNoMatch() { > var ObjectProto = GetBuiltinPrototype("Object"); > var StringProto = GetBuiltinPrototype("String"); >... > if (std_match in StringProto) > return false; > return true; > }
jandem, would you finish the patch you gave me before?
Flags: needinfo?(jdemooij)
Attached patch PatchSplinter Review
This is a cleaned-up version of the patch I gave arai. It folds "id in object" in IonBuilder, if we know the object (or an object on its prototype chain) does not have the property.
Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Flags: needinfo?(jdemooij)
Attachment #8715760 - Flags: review?(arai.unmht)
Comment on attachment 8715760 [details] [diff] [review] Patch Oops, meant to r? Brian.
Attachment #8715760 - Flags: review?(arai.unmht) → review?(bhackett1024)
(In reply to Jan de Mooij [:jandem] from comment #2) > It folds "id in object" in IonBuilder, if we know the object (or an object > on its prototype chain) does not have the property. If the object is a singleton, we can also fold if it definitely *has* the property. I didn't implement that yet, because it's a bit more tricky and the current patch is sufficient for bug 887016.
Attachment #8715760 - Flags: review?(bhackett1024) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: