Bug 43089

Summary: Cleanup JIT related switched in Platform.h
Product: WebKit Reporter: Gavin Barraclough <barraclough>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: fu, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
The patch oliver: review+

Description Gavin Barraclough 2010-07-27 15:49:18 PDT
The code the enable to JIT checks every permutation of platform & OS individually, but now the JIT is enabled on the majority much all x86/x86-64/ARM/MIPS systems.  It should be cleaner to just enable by default on these platforms, and explicitly disable on configs that don't aren't supported.

Also, rename ENABLE_JIT_OPTIMIZE_MOD to ENABLE_JIT_USE_SOFT_MODULO.  I always find this confusing since enabling this "optimization" would be possible, but would be a regression on x86/x86-64 systems!  I think it's clearer to reserve "JIT_OPTIMIZE" for compiler technologies applicable to all platforms, and make a more optional behaviour like this a "USE".
Comment 1 Gavin Barraclough 2010-07-27 16:07:11 PDT
Created attachment 62764 [details]
The patch
Comment 2 WebKit Review Bot 2010-07-27 16:08:22 PDT
Attachment 62764 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
JavaScriptCore/jit/ExecutableAllocator.h:202:  Missing space after ,  [whitespace/comma] [3]
JavaScriptCore/jit/ExecutableAllocator.h:203:  Missing space after ,  [whitespace/comma] [3]
JavaScriptCore/wtf/Platform.h:923:  Missing space after ,  [whitespace/comma] [3]
JavaScriptCore/wtf/Platform.h:930:  Missing space after ,  [whitespace/comma] [3]
Total errors found: 4 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Gavin Barraclough 2010-07-27 23:05:59 PDT
fixed in r64176.
Comment 4 Chao-ying Fu 2010-08-03 14:02:55 PDT
There is a typo in ExecutableAllocator.h for MIPS.  We need to use ! for the macro to test if GCC is < 4.4.3.  Thanks!

Ex:
Index: ExecutableAllocator.h
===================================================================
--- ExecutableAllocator.h       (revision 64473)
+++ ExecutableAllocator.h       (working copy)
@@ -200,7 +200,7 @@
     static void cacheFlush(void* code, size_t size)
     {
 #if COMPILER(GCC) && GCC_VERSION_AT_LEAST(4,3,0)
-#if WTF_MIPS_ISA_REV(2) && GCC_VERSION_AT_LEAST(4,4,3)
+#if WTF_MIPS_ISA_REV(2) && !GCC_VERSION_AT_LEAST(4,4,3)
         int lineSize;
         asm("rdhwr %0, $1" : "=r" (lineSize));
         //

Regards,
Chao-ying
Comment 5 Gavin Barraclough 2010-08-03 14:05:22 PDT
Ooops, sorry Chao-ying, will fix this.  Thanks! G.
Comment 6 Gavin Barraclough 2010-08-03 20:25:39 PDT
Fix landed in r64619.