Closed
Bug 883656
Opened 11 years ago
Closed 11 years ago
Handle lazy scripts in b[a] lambda pattern matching
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: bhackett1024, Unassigned)
References
Details
Attachments
(1 file)
(deleted),
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
We use a specialized path in String.replace for lambdas of the form 'return b[a]'. This is pretty important for ss-string-unpack-code, but when the lambda has not yet been compiled this pattern matching doesn't work and we do the generic thing. Subsequent replace() calls with the lambda will work, but even the first time around costs quite a bit in this benchmark --- running with lazy parsing is about 20% slower than without. The attached patch fixes this oversight, and with it we get about the same scores on the benchmark whether lazy parsing is enabled or not.
Attachment #763265 -
Flags: review?(luke)
It looks like you've inverted the meaning of LambdaIsGetElem? You return true when it's not a JSOP_GETALIASEDVAR.
Reporter | ||
Comment 2•11 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #1)
> It looks like you've inverted the meaning of LambdaIsGetElem? You return
> true when it's not a JSOP_GETALIASEDVAR.
Adding the getOrCreateScript call means this method is now fallible so its return value is a success code. Whether it actually found a match is indicated through the (new) outparam pobj.
Comment 3•11 years ago
|
||
Comment on attachment 763265 [details] [diff] [review]
patch
Heh, any time ss-string-unpack-code we should just assume LambdaIsGetElem needs to be updated.
Attachment #763265 -
Flags: review?(luke) → review+
Reporter | ||
Comment 4•11 years ago
|
||
Comment 5•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in
before you can comment on or make changes to this bug.
Description
•