RESOLVED FIXED 69821
Switch RegisterSizedBoolean/dfgConvertJSValueToInt32 return type to size_t
https://bugs.webkit.org/show_bug.cgi?id=69821
Summary Switch RegisterSizedBoolean/dfgConvertJSValueToInt32 return type to size_t
Gavin Barraclough
Reported 2011-10-11 00:13:44 PDT
Operations returning types Z (int32_t) and B (RegisterSizedBoolean - implemented as an intptr_t) are indistinguishable on 32-bit Linux, preventing the DFG JIT from building. dfgConvertJSValueToInt32 would be better returning a value known to be register sized, for JSVALUE64 (we currently zero-extend in JIT code, potentially introducing an unnecessary mov), so by switching all associated operations to return a size_t we can fix the type problem on Linux & make it a small tweak that removes an unnecessary instruction.
Attachments
The patch (23.02 KB, patch)
2011-10-11 00:29 PDT, Gavin Barraclough
no flags
Gavin Barraclough
Comment 1 2011-10-11 00:29:25 PDT
Created attachment 110482 [details] The patch
WebKit Review Bot
Comment 2 2011-10-11 00:34:54 PDT
Attachment 110482 [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/dfg/DFGOperations.h:79: DFG_OPERATION is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Source/JavaScriptCore/dfg/DFGOperations.h:80: DFG_OPERATION is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4] Total errors found: 2 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 3 2011-10-11 00:42:58 PDT
Comment on attachment 110482 [details] The patch Wouldn't it be better to use uintptr_t instead of size_t? size_t implies that you're describing the size of something in memory. uintptr_t implies any unsigned pointer-sized word for holding any kind of integer or pointer, and doesn't imply any meaning (unlike size_t). It might be less confusing in this case, since these operations are pretty much never returning the size of things.
Filip Pizlo
Comment 4 2011-10-11 00:44:24 PDT
Comment on attachment 110482 [details] The patch Eh, r=me to fix the build. Your call if you want size_t or uintptr_t.
WebKit Review Bot
Comment 5 2011-10-11 09:01:58 PDT
Comment on attachment 110482 [details] The patch Clearing flags on attachment: 110482 Committed r97153: <http://trac.webkit.org/changeset/97153>
WebKit Review Bot
Comment 6 2011-10-11 09:02:02 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.