Closed Bug 838862 Opened 13 years ago Closed 13 years ago

BaselineCompiler: Add optimized stub for JSOP_[GET|CALL]PROP on strings.

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: djvj, Assigned: djvj)

References

Details

Attachments

(1 file)

This is getting hit heavily by both string-fasta, and crypto-sha1 in sunspider.
Summary: BaselineCompiler: Add optimized stub for CALLPROP(stringObj, methodName) → BaselineCompiler: Add optimized stub for JSOP_[GET|CALL]PROP on strings.
Assignee: general → kvijayan
Attached patch Patch.Splinter Review
Optimizes GETPROPS and CALLPROPS on strings where the property is directly on |String.prototype|. Cribbed from JM's string getprop IC code. However, this code uses |nativeLookup| instead of |lookupProperty| since we don't really care to search the proto chain. Shaves about 25ms (5%) off of SS running BL+Ion.
Attachment #711144 - Flags: review?(bhackett1024)
Comment on attachment 711144 [details] [diff] [review] Patch. Review of attachment 711144 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/ion/BaselineIC.cpp @@ +2519,5 @@ > + > + bool isFixedSlot = stringProto->isFixedSlot(shape->slot()); > + uint32_t offset = isFixedSlot > + ? JSObject::getFixedSlotOffset(shape->slot()) > + : stringProto->dynamicSlotIndex(shape->slot()) * sizeof(Value); This logic already appears twice in BaselineIC.cpp, can you common it into some ComputeShapeOffset(shape, bool*, uint32_t*) or similar?
Attachment #711144 - Flags: review?(bhackett1024) → review+
Status: NEW → RESOLVED
Closed: 13 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: