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)
Tracking
()
RESOLVED
FIXED
People
(Reporter: djvj, Assigned: djvj)
References
Details
Attachments
(1 file)
9.50 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
This is getting hit heavily by both string-fasta, and crypto-sha1 in sunspider.
Assignee | ||
Updated•13 years ago
|
Summary: BaselineCompiler: Add optimized stub for CALLPROP(stringObj, methodName) → BaselineCompiler: Add optimized stub for JSOP_[GET|CALL]PROP on strings.
Assignee | ||
Updated•13 years ago
|
Assignee: general → kvijayan
Assignee | ||
Comment 1•13 years ago
|
||
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 2•13 years ago
|
||
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+
Assignee | ||
Comment 3•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
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.
Description
•