2008-10-16 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Oct 2008 03:24:41 +0000 (03:24 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Oct 2008 03:24:41 +0000 (03:24 +0000)
        Reviewed by Geoff Garen.

        - fixed <rdar://problem/5806316> JavaScriptCore should not force building with gcc 4.0
        - use gcc 4.2 when building with Xcode 3.1 or newer on Leopard, even though this is not the default

        This time there is no performance regression; we can avoid having
        to use the fastcall calling convention for CTI functions by using
        varargs to prevent the compiler from moving things around on the
        stack.

        * Configurations/DebugRelease.xcconfig:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * VM/CTI.cpp:
        * VM/Machine.h:
        * wtf/Platform.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37647 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/Configurations/DebugRelease.xcconfig
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/VM/CTI.cpp
JavaScriptCore/VM/Machine.h
JavaScriptCore/wtf/Platform.h

index 31a436e85149d6dc8a3258070256b8492e0fcb45..20ddbfeaba1ad5cb47107fb03fd408ea36fe343e 100644 (file)
@@ -1,3 +1,21 @@
+2008-10-16  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Geoff Garen.
+
+        - fixed <rdar://problem/5806316> JavaScriptCore should not force building with gcc 4.0
+        - use gcc 4.2 when building with Xcode 3.1 or newer on Leopard, even though this is not the default
+
+        This time there is no performance regression; we can avoid having
+        to use the fastcall calling convention for CTI functions by using
+        varargs to prevent the compiler from moving things around on the
+        stack.
+        
+        * Configurations/DebugRelease.xcconfig:
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * VM/CTI.cpp:
+        * VM/Machine.h:
+        * wtf/Platform.h:
+
 2008-10-16  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Oliver Hunt.
index 4f5699a5be65804e39654bfa9520e21c9b541113..1c052dba22b4431908cf6d9706b268f2ae80297f 100644 (file)
@@ -6,3 +6,7 @@ MACOSX_DEPLOYMENT_TARGET_1050 = 10.5;
 MACOSX_DEPLOYMENT_TARGET_1060 = 10.6;
 
 GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
+
+GCC_VERSION = $(GCC_VERSION_$(XCODE_VERSION_ACTUAL));
+GCC_VERSION_0310 = 4.2;
+GCC_VERSION_0311 = 4.2;
index 6b01da7e2baec10966c6ae5d308890d7a1a74acd..fedea4340aa034830577514434bb7d7429ade1b8 100644 (file)
                E1EF79AA0CE97BA60088D500 /* UTF8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1EF79A80CE97BA60088D500 /* UTF8.cpp */; };
 /* End PBXBuildFile section */
 
-/* Begin PBXBuildRule section */
-               1CFE4BEC0B0BA1EB00CC444D /* PBXBuildRule */ = {
-                       isa = PBXBuildRule;
-                       compilerSpec = com.apple.compilers.gcc.4_0;
-                       fileType = sourcecode.c;
-                       isEditable = 1;
-                       outputFiles = (
-                       );
-               };
-               1CFE4BF10B0BA22200CC444D /* PBXBuildRule */ = {
-                       isa = PBXBuildRule;
-                       compilerSpec = com.apple.compilers.gcc.4_0;
-                       fileType = sourcecode.cpp;
-                       isEditable = 1;
-                       outputFiles = (
-                       );
-               };
-               5DAD97A80B39B88E0014FEFF /* PBXBuildRule */ = {
-                       isa = PBXBuildRule;
-                       compilerSpec = com.apple.compilers.gcc.4_0;
-                       fileType = sourcecode.c;
-                       isEditable = 1;
-                       outputFiles = (
-                       );
-               };
-               5DAD97A80B39B88E0014FFFF /* PBXBuildRule */ = {
-                       isa = PBXBuildRule;
-                       compilerSpec = com.apple.compilers.gcc.4_0;
-                       fileType = sourcecode.cpp;
-                       isEditable = 1;
-                       outputFiles = (
-                       );
-               };
-               5DAD97A80B39B88F0014FEFF /* PBXBuildRule */ = {
-                       isa = PBXBuildRule;
-                       compilerSpec = com.apple.compilers.gcc.4_0;
-                       fileType = sourcecode.c;
-                       isEditable = 1;
-                       outputFiles = (
-                       );
-               };
-               5DAD97A80B39B88F0014FFFF /* PBXBuildRule */ = {
-                       isa = PBXBuildRule;
-                       compilerSpec = com.apple.compilers.gcc.4_0;
-                       fileType = sourcecode.cpp;
-                       isEditable = 1;
-                       outputFiles = (
-                       );
-               };
-               5DAD97A80B39B89F0014FEFF /* PBXBuildRule */ = {
-                       isa = PBXBuildRule;
-                       compilerSpec = com.apple.compilers.gcc.4_0;
-                       fileType = sourcecode.c;
-                       isEditable = 1;
-                       outputFiles = (
-                       );
-               };
-               5DAD97A80B39B89F0014FFFF /* PBXBuildRule */ = {
-                       isa = PBXBuildRule;
-                       compilerSpec = com.apple.compilers.gcc.4_0;
-                       fileType = sourcecode.cpp;
-                       isEditable = 1;
-                       outputFiles = (
-                       );
-               };
-/* End PBXBuildRule section */
-
 /* Begin PBXContainerItemProxy section */
                141211350A48796100480255 /* PBXContainerItemProxy */ = {
                        isa = PBXContainerItemProxy;
                                144005C70A5338C60005F061 /* Headers */,
                        );
                        buildRules = (
-                               5DAD97A80B39B88E0014FEFF /* PBXBuildRule */,
-                               5DAD97A80B39B88E0014FFFF /* PBXBuildRule */,
                        );
                        dependencies = (
                                141211360A48796100480255 /* PBXTargetDependency */,
                                14BD59BD0A3E8F9000BAF59C /* Frameworks */,
                        );
                        buildRules = (
-                               5DAD97A80B39B88F0014FEFF /* PBXBuildRule */,
-                               5DAD97A80B39B88F0014FFFF /* PBXBuildRule */,
                        );
                        dependencies = (
                                14270B080A451DA10080EEEA /* PBXTargetDependency */,
                                1C395CBC0C6BCC16000D1E52 /* Generate 64-bit Export File */,
                        );
                        buildRules = (
-                               1CFE4BF10B0BA22200CC444D /* PBXBuildRule */,
-                               1CFE4BEC0B0BA1EB00CC444D /* PBXBuildRule */,
                        );
                        dependencies = (
                                65FB3F7E09D11EF300F49DEB /* PBXTargetDependency */,
                                5D5D8ABF0E0D0B0300F9C692 /* Fix Framework Reference */,
                        );
                        buildRules = (
-                               5DAD97A80B39B89F0014FEFF /* PBXBuildRule */,
-                               5DAD97A80B39B89F0014FFFF /* PBXBuildRule */,
                        );
                        dependencies = (
                                14270B0C0A451DA40080EEEA /* PBXTargetDependency */,
                        isa = XCBuildConfiguration;
                        baseConfigurationReference = 1C9051440BA9E8A70081E9D0 /* DebugRelease.xcconfig */;
                        buildSettings = {
-                               GCC_VERSION = 4.0;
                                STRIP_INSTALLED_PRODUCT = NO;
                        };
                        name = Release;
index 83b82e7559c239c8205c44b40bbba1ca2b52f89d..024da2a54e9090582ef518d99e8fc4ae72783c7e 100644 (file)
@@ -116,7 +116,7 @@ SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
 #endif
     "call " SYMBOL_STRING(_ZN3JSC7Machine12cti_vm_throwEPPv) "\n"
 #else
-    "call " SYMBOL_STRING(_ZN3JSC7Machine12cti_vm_throwEPv) "\n"
+    "call " SYMBOL_STRING(_ZN3JSC7Machine12cti_vm_throwEPvz) "\n"
 #endif
     "addl $0x24, %esp" "\n"
     "popl %edi" "\n"
index e8729995da19369cafb1d09d6082a672248303a3..73bdb8897947ad22da993be09f1c162b3fdb7039 100644 (file)
@@ -57,7 +57,7 @@ namespace JSC {
 #define CTI_ARGS void** args
 #define ARGS (args)
 #else
-#define CTI_ARGS void* args
+#define CTI_ARGS void* args, ...
 #define ARGS (&args)
 #endif
 
index 69cefe311ab86c8fb8f48b5a6be69d3ab1d74825..1b5dbd52383c6c94ca0f3b2070c5921ebfe49463 100644 (file)
 #endif
 #endif
 
-// Use "fastcall" calling convention on MSVC and GCC > 4.0
-#if COMPILER(MSVC) || (COMPILER(GCC) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 0)))
+// Use "fastcall" calling convention on MSVC
+#if COMPILER(MSVC)
 #define WTF_USE_FAST_CALL_CTI_ARGUMENT 1
-#endif
-
-#if COMPILER(MSVC) || USE(FAST_CALL_CTI_ARGUMENT)
 #define WTF_USE_CTI_ARGUMENT 1
 #endif