Closed Bug 763599 Opened 12 years ago Closed 12 years ago

IonMonkey: Inline string[int32]

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch Patch (deleted) — Splinter Review
Pretty easy with MCharCodeAt/MFromCharCode. Sunspider base64 and I think unpack-code do this and it's pretty common on the web.
Attachment #631968 - Flags: review?(dvander)
Comment on attachment 631968 [details] [diff] [review] Patch Review of attachment 631968 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/ion/TypeOracle.cpp @@ +319,5 @@ > + > + if (value->getKnownTypeTag(cx) != JSVAL_TYPE_STRING) > + return false; > + > + if (id->getKnownTypeTag(cx) != JSVAL_TYPE_INT32) Out of curiosity, do calls like this add constraints even though we don't need them in the false case?
Attachment #631968 - Flags: review?(dvander) → review+
http://hg.mozilla.org/projects/ionmonkey/rev/17e811e71344 (In reply to David Anderson [:dvander] from comment #1) > > + > > + if (id->getKnownTypeTag(cx) != JSVAL_TYPE_INT32) > > Out of curiosity, do calls like this add constraints even though we don't > need them in the false case? Yeah if the type set is empty or has a single type. Brian would it make sense to add a function like this: if (!id->hasKnownTypeTag(cx, JSVAL_TYPE_INT32)) return false; Where hasKnownTypeTag only adds a constraint if either 1) the type tag matches the argument or 2) the type set is empty (to enable this optimization later).
Status: ASSIGNED → 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: