Summary: | Strict mode restrictions on arguments and eval usage aren't complete | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Oliver Hunt <oliver> | ||||
Component: | New Bugs | Assignee: | Oliver Hunt <oliver> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | ggaren | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Other | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
Oliver Hunt
2011-01-15 21:24:38 PST
Created attachment 79092 [details]
Patch
+ isEvalOrArguments = m_globalData->propertyNames->eval == *m_lastIdentifier || m_globalData->propertyNames->arguments == *m_lastIdentifier; We usually write comparisons like this in the opposite order. Did you test the performance of this change? I think it's worth a SunSpider --parse-only run. (In reply to comment #2) > + isEvalOrArguments = m_globalData->propertyNames->eval == *m_lastIdentifier || m_globalData->propertyNames->arguments == *m_lastIdentifier; > > We usually write comparisons like this in the opposite order. Just heading out, i'll fix this when i get back > > Did you test the performance of this change? I think it's worth a SunSpider --parse-only run. Of course :p sunspider says no change but over many runs i estimate it is actually a slowdown, just very very slight. I don't believe that there's anything that can be done about it though. Comment on attachment 79092 [details]
Patch
If a slowdown happens in a forest, and SunSpider doesn't measure it, does it actually exist?
r=me with that one change
Committed r75896: <http://trac.webkit.org/changeset/75896> |