Bug 40651 - Use "typedef wchar_t JSChar" when compiled with RVCT
Summary: Use "typedef wchar_t JSChar" when compiled with RVCT
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Other
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 33564
  Show dependency treegraph
 
Reported: 2010-06-15 22:00 PDT by Kwang Yul Seo
Modified: 2010-09-22 15:05 PDT (History)
10 users (show)

See Also:


Attachments
Patch (1.21 KB, patch)
2010-06-15 22:02 PDT, Kwang Yul Seo
no flags Details | Formatted Diff | Diff
Patch (1.22 KB, patch)
2010-06-15 22:08 PDT, Kwang Yul Seo
no flags Details | Formatted Diff | Diff
Patch (1.12 KB, patch)
2010-06-17 17:55 PDT, Kwang Yul Seo
loki: review-
Details | Formatted Diff | Diff
Patch (1.79 KB, patch)
2010-08-27 10:51 PDT, Kwang Yul Seo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kwang Yul Seo 2010-06-15 22:00:00 PDT
Fix Brew MP RVCT build. defined(AEE_STATIC) || defined(DYNAMIC_APP) checks Brew MP.
Comment 1 Kwang Yul Seo 2010-06-15 22:02:01 PDT
Created attachment 58851 [details]
Patch
Comment 2 Early Warning System Bot 2010-06-15 22:07:20 PDT
Attachment 58851 [details] did not build on qt:
Build output: http://webkit-commit-queue.appspot.com/results/3267195
Comment 3 WebKit Review Bot 2010-06-15 22:08:04 PDT
Attachment 58851 [details] did not build on gtk:
Build output: http://webkit-commit-queue.appspot.com/results/3331220
Comment 4 Kwang Yul Seo 2010-06-15 22:08:46 PDT
Created attachment 58852 [details]
Patch

Oops. ')' was missing.
Comment 5 Laszlo Gombos 2010-06-16 18:36:18 PDT
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.
Comment 6 Kwang Yul Seo 2010-06-16 18:54:49 PDT
(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?
Comment 7 Laszlo Gombos 2010-06-17 01:07:18 PDT
How about this ? 

-    && !((defined(__CC_ARM) || defined(__ARMCC__)) && defined(__SYMBIAN32__)) 
+    && !((defined(__CC_ARM) || defined(__ARMCC__)))
Comment 8 Kwang Yul Seo 2010-06-17 17:46:37 PDT
(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.
Comment 9 Kwang Yul Seo 2010-06-17 17:55:54 PDT
Created attachment 59054 [details]
Patch
Comment 10 Kwang Yul Seo 2010-06-23 23:41:15 PDT
Ping, Laszlo!
Comment 11 Gabor Loki 2010-06-24 01:20:14 PDT
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.
Comment 12 Kwang Yul Seo 2010-08-27 09:49:19 PDT
(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.
Comment 13 Kwang Yul Seo 2010-08-27 10:51:22 PDT
Created attachment 65732 [details]
Patch
Comment 14 Gabor Loki 2010-08-31 14:36:48 PDT
> 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 15 Adam Barth 2010-08-31 19:38:26 PDT
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...
Comment 16 Kwang Yul Seo 2010-08-31 21:41:56 PDT
(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.
Comment 17 Gabor Loki 2010-09-01 00:35:46 PDT
> > -#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 18 Kwang Yul Seo 2010-09-01 09:19:10 PDT
Comment on attachment 65732 [details]
Patch

r?, q? again for review.
Comment 19 Kwang Yul Seo 2010-09-06 13:51:18 PDT
(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?
Comment 20 Gabor Loki 2010-09-06 14:32:01 PDT
> 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 21 Laszlo Gombos 2010-09-22 13:28:05 PDT
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 22 WebKit Commit Bot 2010-09-22 15:05:44 PDT
Comment on attachment 65732 [details]
Patch

Clearing flags on attachment: 65732

Committed r68087: <http://trac.webkit.org/changeset/68087>
Comment 23 WebKit Commit Bot 2010-09-22 15:05:51 PDT
All reviewed patches have been landed.  Closing bug.