Bug 33902 - Opcode.h use const void* for Opcode cause error #1211 for RVCT compiler
Summary: Opcode.h use const void* for Opcode cause error #1211 for RVCT compiler
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-20 07:24 PST by Lyon Chen
Modified: 2010-01-26 20:20 PST (History)
4 users (show)

See Also:


Attachments
Patch for bug 33902 (436 bytes, patch)
2010-01-20 08:03 PST, Lyon Chen
darin: review-
Details | Formatted Diff | Diff
New patch with changelog. (877 bytes, patch)
2010-01-21 09:29 PST, Lyon Chen
no flags Details | Formatted Diff | Diff
New patch with RVCT flag. (913 bytes, patch)
2010-01-21 10:54 PST, Lyon Chen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lyon Chen 2010-01-20 07:24:02 PST
In commit r52231, Opcode is changed from void* to const void* when COMPUTED_GOTO is used, this caused a compiling error #1211 for RVCT 4.0 compilers.

Suggest to change to:

--- a/JavaScriptCore/bytecode/Opcode.h
+++ b/JavaScriptCore/bytecode/Opcode.h
@@ -196,7 +196,11 @@
     #undef VERIFY_OPCODE_ID
 
 #if HAVE(COMPUTED_GOTO)
+#if COMPILER(RVCT)
+    typedef void* Opcode;
+#else
     typedef const void* Opcode;
+#endif
 #else
     typedef OpcodeID Opcode;
 #endif
Comment 1 Lyon Chen 2010-01-20 08:03:26 PST
Created attachment 47035 [details]
Patch for bug 33902
Comment 2 Darin Adler 2010-01-20 08:14:12 PST
Comment on attachment 47035 [details]
Patch for bug 33902

Two problems here:

    1) We don't accept patches without change log entries.

    2) This is probably not something that should be ifdef'd based on compiler. If void* works for the other compilers, then the patch should just switch from const void* to void*.
Comment 3 Lyon Chen 2010-01-20 08:19:09 PST
Darin:

In commit r52231, ggaren@apple.com mentioned the change from void* to const void* is to avoid generating bloated codes in interpreter.cpp, so maybe it's better #ifdef this change?

And maybe RVCT compiler can someday updated to support const void* for computed goto, instead of void*?

Hope to hear from ggaren@apple.com on this matter.
Comment 4 Geoffrey Garen 2010-01-20 11:11:05 PST
> In commit r52231, ggaren@apple.com mentioned the change from void* to const
> void* is to avoid generating bloated codes in interpreter.cpp, so maybe it's
> better #ifdef this change?

I'm not sure if that specific part of the change is required. I guess you'd have to test to find out.
Comment 5 Lyon Chen 2010-01-21 09:29:03 PST
Created attachment 47128 [details]
New patch with changelog.
Comment 6 Geoffrey Garen 2010-01-21 09:57:42 PST
Did you verify that this change doesn't change code generation for non-RVCT
compilers?
Comment 7 Lyon Chen 2010-01-21 10:02:53 PST
No, I didn't, Garen. I thought your comment means this part is not essential to your optimization, and based on Darin's comments, I simply removed the #ifdef for RVCT.

Sorry I don't have the time to verify it for other platforms for now, should I add these #ifdef back?
Comment 8 Yong Li 2010-01-21 10:31:54 PST
+George Staikos
Comment 9 Lyon Chen 2010-01-21 10:54:06 PST
Created attachment 47131 [details]
New patch with RVCT flag.

Add a new patch with code change limited to RVCT compiler.
Comment 10 Darin Adler 2010-01-21 10:55:14 PST
Comment on attachment 47128 [details]
New patch with changelog.

I’ll let Geoff handle reviewing duties on this bug. I’m not sure I know what the issues are and I know he does.
Comment 11 Maciej Stachowiak 2010-01-22 01:52:15 PST
Comment on attachment 47131 [details]
New patch with RVCT flag.

Seems fine to have this scoped to COMPILER(RCVT)
Comment 12 WebKit Commit Bot 2010-01-26 08:54:31 PST
Comment on attachment 47131 [details]
New patch with RVCT flag.

Rejecting patch 47131 from commit-queue.

lyon.chen@torchmobile.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/committers.py.

- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.

- If you have committer rights please correct the error in WebKitTools/Scripts/webkitpy/committers.py by adding yourself to the file (no review needed).  Due to bug 30084 the commit-queue will require a restart after your change.  Please contact eseidel@chromium.org to request a commit-queue restart.  After restart the commit-queue will correctly respect your committer rights.
Comment 13 WebKit Commit Bot 2010-01-26 20:20:44 PST
Comment on attachment 47131 [details]
New patch with RVCT flag.

Clearing flags on attachment: 47131

Committed r53891: <http://trac.webkit.org/changeset/53891>
Comment 14 WebKit Commit Bot 2010-01-26 20:20:50 PST
All reviewed patches have been landed.  Closing bug.