| Summary: | [JSC] Add Object.getOwnPropertyNames caching as it is done for Object.keys, and accelerate Object.getOwnPropertyDescriptor | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> | ||||||||||
| Component: | New Bugs | Assignee: | Yusuke Suzuki <ysuzuki> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | WebKit Nightly Build | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Yusuke Suzuki
2020-08-19 15:14:22 PDT
Created attachment 406878 [details]
Patch
Created attachment 406881 [details]
Patch
Created attachment 406882 [details]
Patch
Comment on attachment 406882 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=406882&action=review Nice. r=me > Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp:944 > + CachedPropertyNames key = node->op() == ObjectGetOwnPropertyNames ? CachedPropertyNames::OwnNames : CachedPropertyNames::OwnKeys; nit: Just put this inline in the function call below? > Source/JavaScriptCore/runtime/StructureRareData.cpp:79 > + auto validateAndAppend = [&](WriteBarrier<JSImmutableButterfly>& slot) { nit: why not just have this in the loop below? > Source/JavaScriptCore/runtime/StructureRareData.h:40 > +enum class CachedPropertyNames : uint8_t { nit: I'd name this "CachedPropertyNamesKind" or similar Comment on attachment 406882 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=406882&action=review Thanks! >> Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp:944 >> + CachedPropertyNames key = node->op() == ObjectGetOwnPropertyNames ? CachedPropertyNames::OwnNames : CachedPropertyNames::OwnKeys; > > nit: Just put this inline in the function call below? Sounds nice, fixed. >> Source/JavaScriptCore/runtime/StructureRareData.cpp:79 >> + auto validateAndAppend = [&](WriteBarrier<JSImmutableButterfly>& slot) { > > nit: why not just have this in the loop below? Ah, right. Originally, they are not loop, But I made it loop by refactoring. We should put it inside loop without lambda. Fixed. >> Source/JavaScriptCore/runtime/StructureRareData.h:40 >> +enum class CachedPropertyNames : uint8_t { > > nit: I'd name this "CachedPropertyNamesKind" or similar Fixed. Created attachment 406899 [details]
Patch for landing
Committed r265934: <https://trac.webkit.org/changeset/265934> |