Bug 51873

Summary: [Symbian] RVCT fails to compile [U|I]nt[8|16|32]Array.h
Product: WebKit Reporter: Laszlo Gombos <laszlo.gombos>
Component: PlatformAssignee: qi <qi.2.zhang>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, cshu, darin, dbates, ddkilzer, dino, hausmann, kamaji, koshuin, laszlo.gombos, s.mathur, webkit.review.bot
Priority: P3 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: PC   
OS: S60 3rd edition   
Attachments:
Description Flags
patch
none
patch2
none
patch3
none
patch4
none
patch5
none
patch6
none
patch7
laszlo.gombos: review-
patch8 none

Description Laszlo Gombos 2011-01-04 07:51:36 PST
compile    : WebCore\bindings\js\JSDOMWindowCustom.cpp
   "Y:/webkit/WebCore/html/canvas/Int16Array.h", line 41: Error:  #1001: class member designated by a using-declaration must be visible in a direct base class
         using TypedArrayBase<short>::set;
               ^
   "Y:/webkit/WebCore/html/canvas/Int8Array.h", line 42: Error:  #1001: class member designated by a using-declaration must be visible in a direct base class
         using TypedArrayBase<signed char>::set;
               ^
   "Y:/webkit/WebCore/html/canvas/Uint16Array.h", line 42: Error:  #1001: class member designated by a using-declaration must be visible in a direct base class
         using TypedArrayBase<unsigned short>::set;
               ^
   "Y:/webkit/WebCore/html/canvas/Uint32Array.h", line 42: Error:  #1001: class member designated by a using-declaration must be visible in a direct base class
         using TypedArrayBase<unsigned int>::set;
               ^
Change introduced by bug 47187 (http://trac.webkit.org/changeset/69122) is probably not a solution and it might have to be reverted. At the moment BLOB and 3D_CANVAS are the only two features that require compilation of these files so disabling these features are a temporary workaround. However it is expected that more and more WebCore feature will rely on these files.
Comment 1 Janne Koskinen 2011-01-10 01:24:02 PST
Haven't tested but from previous experience the using declaration won't compile on WINSCW either.
Comment 2 Laszlo Gombos 2011-01-11 07:47:04 PST
There is a related problem introduced in http://trac.webkit.org/changeset/74775. Using declaration in WebCore/rendering/RenderInline.h seems to be ignored by RVCT, which results in the following build error:

   "Y:\webkit\Source\WebCore\rendering\RenderInline.cpp", line 245: Error:  #410
-D: protected function "WebCore::RenderBoxModelObject::setContinuation" is not a
ccessible through a "WebCore::RenderBlock" pointer or object
         middleBlock->setContinuation(clone);
                      ^
   Y:\webkit\Source\WebCore\rendering\RenderInline.cpp: 0 warnings, 1 error

Temporary workaround is to make setContinuation() public in RenderBoxModelObject.h.
Comment 3 qi 2011-01-17 11:59:37 PST
Created attachment 79200 [details]
patch

In RVCT 4, only Array(comment #1) has the compile issue, RenderInline (comment #2) is OK. In RVCT 2.2, RenderInline has the same issue as Comment #2 talked about. This fix only fixed RVCT 4 issue, since RVCT 4 will replace RVCT 2.2 soon. And I test this patch in RVCT 2.2 enviroment, it didn't generate any problem.
Comment 4 WebKit Review Bot 2011-01-17 12:02:41 PST
Attachment 79200 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/html/canvas/Int32Array.h:45:  Tab found; better to use spaces  [whitespace/tab] [1]
Source/WebCore/html/canvas/Int8Array.h:47:  Tab found; better to use spaces  [whitespace/tab] [1]
Total errors found: 2 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 qi 2011-01-17 12:13:34 PST
Created attachment 79203 [details]
patch2

Fixed the "Tab" issue.
Comment 6 Laszlo Gombos 2011-01-20 21:25:13 PST
Adding Darin and Daniel to get their input. An other option would be - which would make the code less cluttered but perhaps less efficient is to always take the RVCT path for all ports (and remove the other path).
Comment 7 Darin Adler 2011-01-21 11:38:33 PST
Comment on attachment 79203 [details]
patch2

At a certain point, dealing where certain C++ features don’t work, it’s unpleasant for the project to have to dumb down the code for that compiler.

I do think it would be slightly better to do this without the #if and with a comment explaining that we can’t use “using” here due to a bug in the RVCT compiler.
Comment 8 Daniel Bates 2011-01-21 12:34:47 PST
What version of RVCT are you using?
Comment 9 qi 2011-01-24 06:16:14 PST
(In reply to comment #8)
> What version of RVCT are you using?

RVCT 4, but it also happen in RVCT 2.2
Comment 10 qi 2011-01-24 12:43:59 PST
Created attachment 79957 [details]
patch3

Based on comments to change a little bit.
Comment 11 WebKit Review Bot 2011-01-24 12:45:18 PST
Attachment 79957 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/html/canvas/Int32Array.h:42:  Tab found; better to use spaces  [whitespace/tab] [1]
Source/WebCore/html/canvas/Int8Array.h:44:  Tab found; better to use spaces  [whitespace/tab] [1]
Total errors found: 2 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 12 qi 2011-01-24 12:48:01 PST
Created attachment 79958 [details]
patch4

fix style issue.
Comment 13 WebKit Review Bot 2011-01-24 12:50:00 PST
Attachment 79958 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/html/canvas/Int32Array.h:42:  Tab found; better to use spaces  [whitespace/tab] [1]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 14 qi 2011-01-24 12:52:33 PST
Created attachment 79960 [details]
patch5

Sorry, again.
Comment 15 Laszlo Gombos 2011-01-24 13:13:43 PST
Qi, I think we should use something more explanatory as a comment - I like Darin's wording here 

// Can’t use “using” here due to a bug in the RVCT compiler.

In the ChangeLog please mention that there are no new tests as there is no new functionality introduced.
Comment 16 qi 2011-01-24 13:22:03 PST
Created attachment 79964 [details]
patch6

Little change based on comments. :)
Comment 17 qi 2011-01-24 13:35:26 PST
Created attachment 79967 [details]
patch7

Modify ChangeLog.
Comment 18 Keith Kyzivat 2011-01-24 13:48:49 PST
I think the setter functions should be inside a platform conditionalized section --

#if COMPILER(RVCT)
    // Can’t use “using” here due to a bug in the RVCT compiler.
    void set(unsigned index, double value) { return IntegralTypedArrayBase<int>::set(index, value); }
    void set(TypedArrayBase<int>* array, unsigned offset, ExceptionCode& ec) { return TypedArrayBase<int>::set(array, offset, ec); }
#else
    using TypedArrayBase<int>::set;
    using IntegralTypedArrayBase<int>::set;
#endif

..

Also, I think non-ascii characters are against style guidelines.  (though if they are, it obviously isn't caught by check-webkit-style)
I know some compilers don't like non-ascii characters.
Comment 19 Keith Kyzivat 2011-01-24 13:54:21 PST
(In reply to comment #18)
> I think the setter functions should be inside a platform conditionalized 

NVM -- Laszlo jogged my memory -- we want to get rid of #if COMPILER(x) code as much as we can (for maintenance reasons)...

However, non-ascii characters I believe are still an issue.
Comment 20 Laszlo Gombos 2011-01-24 14:27:32 PST
Comment on attachment 79967 [details]
patch7

Almost there. 

I think the ChangeLog should explain why the change is made and that we're not special-casing for RVCT. 

You can also replace the non-ascii quotation marks with ascii onces, although the try-bots seems to be ok.

Is there any reason you changed the order of the two functions ?
Comment 21 qi 2011-01-25 05:49:17 PST
Created attachment 80054 [details]
patch8

Comments and style change.
Comment 22 Laszlo Gombos 2011-01-25 06:57:18 PST
Comment on attachment 80054 [details]
patch8

LGTM now, r+.
Comment 23 WebKit Commit Bot 2011-01-25 07:24:51 PST
Comment on attachment 80054 [details]
patch8

Clearing flags on attachment: 80054

Committed r76592: <http://trac.webkit.org/changeset/76592>
Comment 24 WebKit Commit Bot 2011-01-25 07:24:58 PST
All reviewed patches have been landed.  Closing bug.