Summary: | Use "typedef wchar_t JSChar" when compiled with RVCT | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kwang Yul Seo <skyul> | ||||||||||
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | beergun, commit-queue, gustavo, joybro201, laszlo.gombos, loki, webkit-ews, webkit.review.bot, xan.lopez, xhiloh | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | Other | ||||||||||||
OS: | Other | ||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 33564 | ||||||||||||
Attachments: |
|
Description
Kwang Yul Seo
2010-06-15 22:00:00 PDT
Created attachment 58851 [details]
Patch
Attachment 58851 [details] did not build on qt: Build output: http://webkit-commit-queue.appspot.com/results/3267195 Attachment 58851 [details] did not build on gtk: Build output: http://webkit-commit-queue.appspot.com/results/3331220 Created attachment 58852 [details]
Patch
Oops. ')' was missing.
Is __CC_ARM or __ARMCC__ defined for BREW ? f it is maybe it is better to remove the "&& defined(__SYMBIAN32__)" test and make this rule generic for all RVCT platforms. (In reply to comment #5) > Is __CC_ARM or __ARMCC__ defined for BREW ? > > f it is maybe it is better to remove the "&& defined(__SYMBIAN32__)" test and make this rule generic for all RVCT platforms. __CC_ARM or __ARMCC__ is defined when RVCT is used. Any suggestion? How about this ? - && !((defined(__CC_ARM) || defined(__ARMCC__)) && defined(__SYMBIAN32__)) + && !((defined(__CC_ARM) || defined(__ARMCC__))) (In reply to comment #7) > How about this ? > > - && !((defined(__CC_ARM) || defined(__ARMCC__)) && defined(__SYMBIAN32__)) > + && !((defined(__CC_ARM) || defined(__ARMCC__))) Okay. I will update the patch as you suggested. Created attachment 59054 [details]
Patch
Ping, Laszlo! Comment on attachment 59054 [details]
Patch
The UChar typedef is different in wtf/unicode/qt4/UnicodeQt4.h in case of RVCT. The same type is required for UChar and JSChar as well.
(In reply to comment #11) > (From update of attachment 59054 [details]) > The UChar typedef is different in wtf/unicode/qt4/UnicodeQt4.h in case of RVCT. The same type is required for UChar and JSChar as well. Why don't we check !defined(__linux__) instead of defined(__SYMBIAN32__)? !defined(__linux__) covers both Symbian and Brew MP. I will modify wtf/unicode/qt4/UnicodeQt4.h as well. Created attachment 65732 [details]
Patch
> Created an attachment (id=65732) [details]
This looks good to me.
Although I do not expect any problem, I will test it on Linux tomorrow.
Comment on attachment 65732 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=65732&action=prettypatch > JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h:59 > -#if defined(Q_OS_WIN) || COMPILER(WINSCW) || (COMPILER(RVCT) && OS(SYMBIAN)) > +#if defined(Q_OS_WIN) || COMPILER(WINSCW) || (COMPILER(RVCT) && !OS(LINUX)) It's unclear to me why we're switching from a whitelist to a blacklist for something that's identified as a hack... (In reply to comment #15) > (From update of attachment 65732 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=65732&action=prettypatch > > > JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h:59 > > -#if defined(Q_OS_WIN) || COMPILER(WINSCW) || (COMPILER(RVCT) && OS(SYMBIAN)) > > +#if defined(Q_OS_WIN) || COMPILER(WINSCW) || (COMPILER(RVCT) && !OS(LINUX)) > It's unclear to me why we're switching from a whitelist to a blacklist for something that's identified as a hack... We can detect Linux with defined(__linux__) and Symbian with defined(__SYMBIAN32__), but there is no such macro in Brew MP. Therefore, it is very hard to check Brew MP in JSStringRef.h. Because Linux is the only exception for now, I think it is okay to switch. > > -#if defined(Q_OS_WIN) || COMPILER(WINSCW) || (COMPILER(RVCT) && OS(SYMBIAN))
> > +#if defined(Q_OS_WIN) || COMPILER(WINSCW) || (COMPILER(RVCT) && !OS(LINUX))
> It's unclear to me why we're switching from a whitelist to a blacklist for something that's identified as a hack...
I see no problem using this formula. As far as I know RVCT is used for the following target platforms: Symbian, Linux, WinCE, Brew MP.
Symbian, WinCE and Brew MP use wchar_t. The only exception is the Linux (which uses uint16_t). Well, it looks like a blacklist, not a whitelist to me.
Comment on attachment 65732 [details]
Patch
r?, q? again for review.
(In reply to comment #14) > > Created an attachment (id=65732) [details] [details] > > This looks good to me. > Although I do not expect any problem, I will test it on Linux tomorrow. Ping. Have you tested the patch on Linux? > Ping. Have you tested the patch on Linux?
Sorry, I forgot to mention that the patch is OK for RVCT and GCC as well. I am sure Laszlo will give an r+ on it.
Comment on attachment 65732 [details]
Patch
r=me.
I agree that we're switching from white-list to blacklist, but I'm not sure if this is really a hack anymore, despite the comment in the source.
Comment on attachment 65732 [details] Patch Clearing flags on attachment: 65732 Committed r68087: <http://trac.webkit.org/changeset/68087> All reviewed patches have been landed. Closing bug. |