Bug 121238

Summary: Bitmap's WordType should be a template parameter
Product: WebKit Reporter: Mark Hahnenberg <mhahnenberg>
Component: JavaScriptCoreAssignee: Mark Hahnenberg <mhahnenberg>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cmarcelo, commit-queue, ggaren
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 121074    
Attachments:
Description Flags
Patch darin: review+

Mark Hahnenberg
Reported 2013-09-12 10:52:15 PDT
The code is written as if it already is. We just need to lift it out of the class.
Attachments
Patch (7.22 KB, patch)
2013-09-12 11:18 PDT, Mark Hahnenberg
darin: review+
Mark Hahnenberg
Comment 1 2013-09-12 11:18:25 PDT
Darin Adler
Comment 2 2013-09-12 12:34:28 PDT
Comment on attachment 211449 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=211449&action=review > Source/WTF/ChangeLog:26 > + (WTF::::Bitmap): > + (WTF::::get): > + (WTF::::set): > + (WTF::::testAndSet): > + (WTF::::testAndClear): > + (WTF::::concurrentTestAndSet): > + (WTF::::concurrentTestAndClear): > + (WTF::::clear): > + (WTF::::clearAll): > + (WTF::::nextPossiblyUnset): > + (WTF::::findRunOfZeros): > + (WTF::::count): > + (WTF::::isEmpty): > + (WTF::::isFull): The prepare-ChangeLog script made a mess here. I suggest inserting the class name Bitmap into these function names.
Mark Hahnenberg
Comment 3 2013-09-12 12:47:50 PDT
Geoffrey Garen
Comment 4 2013-09-12 15:22:21 PDT
Are you planning to use an 'unsigned char' WordType in the GC? Two thoughts: (1) I wonder if we should just mandate "byte at a time" for bitmap. Why do we need to customize? (2) It's important to preserve some of the "machine word at a time" optimizations even if the client requests a byte word size. For example, nextPossiblyUnset should work a machine word at a time.
Mark Hahnenberg
Comment 5 2013-09-12 15:26:10 PDT
(In reply to comment #4) > Are you planning to use an 'unsigned char' WordType in the GC? > Yep. It allows us to be more accurate when we're checking for mark bits (i.e. there's only 7 other objects that could confuse us into taking the slow path rather than 31). > Two thoughts: > > (1) I wonder if we should just mandate "byte at a time" for bitmap. Why do we need to customize? > I thought it would be better to leave the choice to the client, although I guess before this patch the client didn't have a choice either. > (2) It's important to preserve some of the "machine word at a time" optimizations even if the client requests a byte word size. For example, nextPossiblyUnset should work a machine word at a time. Okay. I filed https://bugs.webkit.org/show_bug.cgi?id=121266.
Note You need to log in before you can comment on or make changes to this bug.