Summary: | Give each MarkedBlock enough mark bits to cover the whole block | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Geoffrey Garen <ggaren> | ||||
Component: | New Bugs | Assignee: | Geoffrey Garen <ggaren> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | webkit.review.bot | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Other | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
Geoffrey Garen
2011-02-08 13:16:50 PST
Created attachment 81681 [details]
Patch
Attachment 81681 [details] did not pass style-queue:
Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1
Source/JavaScriptCore/runtime/MarkedBlock.h:46: BITS_PER_BLOCK is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4]
Source/JavaScriptCore/runtime/MarkedBlock.h:47: CELLS_PER_BLOCK is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4]
Total errors found: 2 in 3 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 81681 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=81681&action=review >> Source/JavaScriptCore/runtime/MarkedBlock.h:46 >> + const size_t BITS_PER_BLOCK = BLOCK_SIZE / CELL_SIZE; > > BITS_PER_BLOCK is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Sure would be nice to fix these constants at some point. > Source/JavaScriptCore/runtime/MarkedBlock.h:65 > - size_t cellNumber(const JSCell*); > - bool isMarked(const JSCell*); > - bool testAndSetMarked(const JSCell*); > - void setMarked(const JSCell*); > + size_t cellNumber(const void*); > + bool isMarked(const void*); > + bool testAndSetMarked(const void*); > + void setMarked(const void*); Why this change? Change log does not say why. > Source/JavaScriptCore/runtime/MarkedBlock.h:112 > inline bool MarkedBlock::isPossibleCell(const void* p) > { > - return isCellAligned(p) && p; > + return isCellAligned(p); > } Do we even need an isPossibleCell function any more? Maybe calling isCellAligned directly would be better? > >> Source/JavaScriptCore/runtime/MarkedBlock.h:46 > >> + const size_t BITS_PER_BLOCK = BLOCK_SIZE / CELL_SIZE; > > > > BITS_PER_BLOCK is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] > > Sure would be nice to fix these constants at some point. Indeed. I've been ignoring them for now because in the near future most of these constants will be gone. > > Source/JavaScriptCore/runtime/MarkedBlock.h:65 > > - size_t cellNumber(const JSCell*); > > - bool isMarked(const JSCell*); > > - bool testAndSetMarked(const JSCell*); > > - void setMarked(const JSCell*); > > + size_t cellNumber(const void*); > > + bool isMarked(const void*); > > + bool testAndSetMarked(const void*); > > + void setMarked(const void*); > > Why this change? Change log does not say why. I'll add a comment. > > Source/JavaScriptCore/runtime/MarkedBlock.h:112 > > inline bool MarkedBlock::isPossibleCell(const void* p) > > { > > - return isCellAligned(p) && p; > > + return isCellAligned(p); > > } > > Do we even need an isPossibleCell function any more? Maybe calling isCellAligned directly would be better? Fixed in final patch. Committed r77977: <http://trac.webkit.org/changeset/77977> |