diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog index 31a436e85149d6dc8a3258070256b8492e0fcb45..20ddbfeaba1ad5cb47107fb03fd408ea36fe343e 100644 --- a/JavaScriptCore/ChangeLog +++ b/JavaScriptCore/ChangeLog @@ -1,3 +1,21 @@ +2008-10-16 Maciej Stachowiak + + Reviewed by Geoff Garen. + + - fixed 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 Reviewed by Oliver Hunt. diff --git a/JavaScriptCore/Configurations/DebugRelease.xcconfig b/JavaScriptCore/Configurations/DebugRelease.xcconfig index 4f5699a5be65804e39654bfa9520e21c9b541113..1c052dba22b4431908cf6d9706b268f2ae80297f 100644 --- a/JavaScriptCore/Configurations/DebugRelease.xcconfig +++ b/JavaScriptCore/Configurations/DebugRelease.xcconfig @@ -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; diff --git a/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj index 6b01da7e2baec10966c6ae5d308890d7a1a74acd..fedea4340aa034830577514434bb7d7429ade1b8 100644 --- a/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj +++ b/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj @@ -302,73 +302,6 @@ 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; @@ -1620,8 +1553,6 @@ 144005C70A5338C60005F061 /* Headers */, ); buildRules = ( - 5DAD97A80B39B88E0014FEFF /* PBXBuildRule */, - 5DAD97A80B39B88E0014FFFF /* PBXBuildRule */, ); dependencies = ( 141211360A48796100480255 /* PBXTargetDependency */, @@ -1640,8 +1571,6 @@ 14BD59BD0A3E8F9000BAF59C /* Frameworks */, ); buildRules = ( - 5DAD97A80B39B88F0014FEFF /* PBXBuildRule */, - 5DAD97A80B39B88F0014FFFF /* PBXBuildRule */, ); dependencies = ( 14270B080A451DA10080EEEA /* PBXTargetDependency */, @@ -1664,8 +1593,6 @@ 1C395CBC0C6BCC16000D1E52 /* Generate 64-bit Export File */, ); buildRules = ( - 1CFE4BF10B0BA22200CC444D /* PBXBuildRule */, - 1CFE4BEC0B0BA1EB00CC444D /* PBXBuildRule */, ); dependencies = ( 65FB3F7E09D11EF300F49DEB /* PBXTargetDependency */, @@ -1686,8 +1613,6 @@ 5D5D8ABF0E0D0B0300F9C692 /* Fix Framework Reference */, ); buildRules = ( - 5DAD97A80B39B89F0014FEFF /* PBXBuildRule */, - 5DAD97A80B39B89F0014FFFF /* PBXBuildRule */, ); dependencies = ( 14270B0C0A451DA40080EEEA /* PBXTargetDependency */, @@ -2098,7 +2023,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 1C9051440BA9E8A70081E9D0 /* DebugRelease.xcconfig */; buildSettings = { - GCC_VERSION = 4.0; STRIP_INSTALLED_PRODUCT = NO; }; name = Release; diff --git a/JavaScriptCore/VM/CTI.cpp b/JavaScriptCore/VM/CTI.cpp index 83b82e7559c239c8205c44b40bbba1ca2b52f89d..024da2a54e9090582ef518d99e8fc4ae72783c7e 100644 --- a/JavaScriptCore/VM/CTI.cpp +++ b/JavaScriptCore/VM/CTI.cpp @@ -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" diff --git a/JavaScriptCore/VM/Machine.h b/JavaScriptCore/VM/Machine.h index e8729995da19369cafb1d09d6082a672248303a3..73bdb8897947ad22da993be09f1c162b3fdb7039 100644 --- a/JavaScriptCore/VM/Machine.h +++ b/JavaScriptCore/VM/Machine.h @@ -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 diff --git a/JavaScriptCore/wtf/Platform.h b/JavaScriptCore/wtf/Platform.h index 69cefe311ab86c8fb8f48b5a6be69d3ab1d74825..1b5dbd52383c6c94ca0f3b2070c5921ebfe49463 100644 --- a/JavaScriptCore/wtf/Platform.h +++ b/JavaScriptCore/wtf/Platform.h @@ -368,12 +368,9 @@ #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